Skip to main content
Glama

Duo Data Utilities

Split a money amount into shares with no rounding loss

num_allocate
Read-onlyIdempotent

Split a money amount into shares without losing or inventing a cent. Divide evenly into N parts, or by a list of ratios, and the remainder is distributed one minor unit at a time by a named, deterministic rule — largest-remainder, first-wins or last-wins — so the parts always sum exactly to the original. Uses Unicode CLDR minor-unit digits, so zero- and three-decimal currencies work (CLDR differs from ISO 4217 for a few, e.g. IDR, HUF: 0). Price: $0.05 per successful call, paid over x402 (USDC on Base).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ruleNoRemainder rule: largest-remainder (default), first, last or round-robin. Accepted: largest-remainder, first, last, round-robin.
partsNoNumber of equal parts, 1-1000. One of parts or ratios. Accepted: integer 1-1000.
amountYesDecimal amount, absolute value below 1e12. Accepted: a decimal amount with absolute value below 1e12.
ratiosNoComma-separated non-negative ratios, at most 1000, each with at most 15 integer digits and 15 decimal places. One of parts or ratios. Accepted: comma-separated non-negative numbers, at most 1000.
currencyYesISO 4217 alpha-3 code. Accepted: an ISO 4217 alpha-3 code.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, and closed-world behavior. The description adds substantial context beyond that: exact-sum guarantee, deterministic remainder distribution, CLDR minor-unit handling for zero- and three-decimal currencies, and a clear price/payment model of $0.05 per successful call over x402.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core operation, then layers in remainder behavior, currency nuance, and pricing. It is dense but each sentence adds useful context; only minor tightening would improve it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description should ideally specify the return format. It explains the allocation behavior and exact-sum property but does not state how the shares are returned. Otherwise it is complete enough for an agent to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema by explaining that the remainder rule is deterministic and named, and by clarifying CLDR minor-unit handling for currencies, which is not captured in the parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb-plus-resource operation: split a money amount into shares using equal parts or ratios. It distinguishes itself from all siblings by being an allocation tool, not a numeric conversion, stats, or formatting utility.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool by explaining the two allocation modes, equal parts or ratios, and the remainder rules. However, it does not explicitly state when to prefer this tool over any alternative or name a when-not condition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources