Sum Money
money.sum
Overview
Sum bounded monetary amounts only when every currency code matches. 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 add a homogeneous list of amounts sharing one ISO currency code with no FX conversion.
When rows mix currency codes; convert first, then sum, or split the batch by currency.
Scope
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
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
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.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| amounts | array | Yes | Required 1 to 10,000 objects {amount, currency}; all currency codes must match and no FX conversion occurs. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| total | string | Yes | Exact homogeneous sum without rounding. |
| currency | string | Yes | The normalized common ISO 4217 code. |
| count | integer | Yes | Number of amounts summed. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"money.sum","input":{"amounts":[{"amount":"10.20","currency":"USD"},{"amount":"-2.10","currency":"USD"}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("money.sum", {"amounts":[{"amount":"10.20","currency":"USD"},{"amount":"-2.10","currency":"USD"},{"amount":"1.90","currency":"USD"}]});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| AMOUNT_INVALID | 400 | No | The request payload failed this skill's input validation. |
| CURRENCY_UNKNOWN | 400 | No | The request payload failed this skill's input validation. |
| CURRENCY_MISMATCH | 400 | No | The request payload failed this skill's input validation. |
| ITEM_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 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 rows mix currency codes; convert first, then sum, or split the batch by currency.
- Do not use when tolerance, scale, or rounding policy is still undecided
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "money.sum",
"input": {
"amounts": [
{
"amount": "10.20",
"currency": "USD"
},
{
"amount": "-2.10",
"currency": "USD"
},
{
"amount": "1.90",
"currency": "USD"
}
]
}
}Examples
Sum three dollar amounts
{
"amounts": [
{
"amount": "10.20",
"currency": "USD"
},
{
"amount": "-2.10",
"currency": "USD"
},
{
"amount": "1.90",
"currency": "USD"
}
]
}{
"currency": "USD",
"count": 3,
"total": "10"
}Preserve exact dinar decimals
{
"amounts": [
{
"amount": "1.001",
"currency": "KWD"
},
{
"amount": "2.002",
"currency": "KWD"
}
]
}{
"currency": "KWD",
"count": 2,
"total": "3.003"
}Recommended use cases
- When you add a homogeneous list of amounts sharing one ISO currency code with no FX conversion.
- Use for auditable ledger arithmetic with explicit monetary units
Avoid for
- When rows mix currency codes; convert first, then sum, or split the batch by currency.
- Do not use when tolerance, scale, or rounding policy is still undecided
Related skills
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.