Skip to main content
Glama
reciprocal-ruler-mcp
by hwcho310

Reciprocal Ruler - arithmetic check ($0.01 x402 paid)

ruler_verify_math
Read-only

Verify settlement arithmetic by comparing expected and actual amounts, returning MATCHED, SHORTFALL, or OVERPAID and an x402 payment challenge when payment is required.

Instructions

Ultra-low-cost ($0.01 USDC on Base) deterministic arithmetic verification (MATCHED / SHORTFALL / OVERPAID). Without payment_header it returns the HTTP 402 challenge; pass the signed x402 payload to complete.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "expected_amount": "<expected_amount>",
      "actual_amount": "<actual_amount>"
    },
    "name": "ruler_verify_math"
  }
}

Input Schema

NameRequiredDescriptionDefault
currencyNoCurrency code, e.g. KRW or USD.KRW
toleranceNoAllowed rounding/fee tolerance.
actual_amountYesActual settled or charged amount.
payment_headerNoSigned x402 payment payload (X-PAYMENT).
expected_amountYesExpected settlement or invoice amount.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description's disclosure of the x402 payment handshake, the exact cost, and the deterministic three-way verdict adds real behavioral context an agent cannot get elsewhere. It stops short of saying whether the 402 call is free or what happens if payment is invalid.

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

Conciseness5/5

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

Two tightly packed sentences: cost and capability first, then the payment mechanics. Every clause carries information (price, chain, determinism, verdict set, 402 behavior) with no filler.

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 five parameters, no output schema, and only two annotations, the description carries weight and mostly does so by naming the returned verdicts and explaining the payment precondition. Minor gaps remain around failure modes when the signed payload is rejected, but nothing essential to a correct call is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so expected_amount, actual_amount, tolerance, and currency are already fully documented in the schema. The description only echoes the role of payment_header (already described in the schema as the signed x402 payload), adding the flow-level detail that omitting it yields a 402 — useful but marginal over the schema.

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

Purpose4/5

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

The description names a specific verb+resource ('deterministic arithmetic verification') and even enumerates the possible verdicts (MATCHED / SHORTFALL / OVERPAID), so an agent knows exactly what it produces. The '$0.01 USDC on Base' framing implicitly distinguishes it from the free 'ruler_trial_verify_math' sibling, but it never states that contrast explicitly.

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?

It gives clear invocation guidance for the paid flow: call without payment_header to get the 402 challenge, then pass the signed x402 payload. What it does not do is say when to choose this over ruler_trial_verify_math or when verification is preferable to ruler_reconcile — usage is implied by the price rather than stated.

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