Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Compare Money with Tolerance

money.compare_with_tolerance

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

Overview

Compare two decimals under an explicit absolute, relative, or basis-point tolerance. The skill uses exact decimal arithmetic, reports the resolved policy, rejects unknown properties, and never fetches a rate or infers accounting policy.

Money arithmetic needs explicit currency, scale, tolerance, and rounding semantics; an LLM cannot guarantee those constraints or reproduce residuals.

Reliability

STRICT and stateless. AMOUNT_INVALID means a malformed or over-limit decimal; fix it. CURRENCY_UNKNOWN means the code is outside the documented allowlist; send a supported code. CURRENCY_MISMATCH is triggered when one sum contains different currency codes; retry only after converting first or splitting the rows by currency. TOLERANCE_INVALID means a negative or unsupported tolerance; correct its type and value. ROUNDING_INVALID means mode or scale is unsupported; choose a documented value. ITEM_LIMIT_EXCEEDED means more than 10,000 rows; split them.

Context footprint

One call returns normalized money strings and the resolved policy. A successful call costs 1 execution credit.

When to use it

When you judge two amounts on the same unit basis inside an explicit absolute, relative, or basis-point band.

When the amounts are in different currencies, or the tolerance type has not been chosen.

Scope

Note
Compare two decimals under an explicit absolute, relative, or basis-point tolerance

Non-goals

  • Does not fetch FX rates or convert currencies
  • Does not infer materiality, accounting policy, cash rounding, or locale
  • Does not accept unbounded lists or binary floating-point semantics

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

data-transformationmath

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input64 KB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
leftstringYesRequired plain decimal on the same unit basis as right.
rightstringYesRequired plain decimal on the same unit basis as left.
toleranceTypestringYesRequired absolute, relative, or basis_points.
tolerancestringYesRequired non-negative plain decimal; relative is a ratio and basis_points is divided by 10,000.
referenceSidestringNoOptional left, right, or max absolute value; omitted means max. Ignored for absolute tolerance.

Output schema

FieldTypeRequiredDescription
withinTolerancebooleanYesWhether absolute difference is at most the resolved limit.
differencestringYesAbsolute left-right difference.
limitstringYesResolved absolute comparison limit.
toleranceTypestringYesApplied tolerance type.
referenceSidestringYesResolved reference side.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"money.compare_with_tolerance","input":{"left":"100.00","right":"100.01","toleranceType":"absolute","tolerance":"0.02"}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("money.compare_with_tolerance", {"right":"100.01","tolerance":"0.02","left":"100.00","toleranceType":"absolute"});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
AMOUNT_INVALID400NoThe request payload failed this skill's input validation.
TOLERANCE_INVALID400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not fetch FX rates or convert currencies
  • Does not infer materiality, accounting policy, cash rounding, or locale
  • Does not accept unbounded lists or binary floating-point semantics
  • When the amounts are in different currencies, or the tolerance type has not been chosen.
  • Do not use when tolerance, scale, or rounding policy is still undecided

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "money.compare_with_tolerance",
  "input": {
    "right": "100.01",
    "tolerance": "0.02",
    "left": "100.00",
    "toleranceType": "absolute"
  }
}

Examples

Compare with a two-cent absolute tolerance

Inputjson
{
  "right": "100.01",
  "tolerance": "0.02",
  "left": "100.00",
  "toleranceType": "absolute"
}
Expected outputjson
{
  "referenceSide": "max",
  "difference": "0.01",
  "withinTolerance": true,
  "toleranceType": "absolute",
  "limit": "0.02"
}

Compare with ten basis points of the larger magnitude

Inputjson
{
  "right": "100.05",
  "tolerance": "10",
  "left": "100",
  "toleranceType": "basis_points"
}
Expected outputjson
{
  "referenceSide": "max",
  "difference": "0.05",
  "withinTolerance": true,
  "toleranceType": "basis_points",
  "limit": "0.10005"
}
  • When you judge two amounts on the same unit basis inside an explicit absolute, relative, or basis-point band.
  • Use for auditable ledger arithmetic with explicit monetary units

Avoid for

  • When the amounts are in different currencies, or the tolerance type has not been chosen.
  • Do not use when tolerance, scale, or rounding policy is still undecided

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

currencytransformationmath