Skip to main content
Glama

Match amounts (FX drift)

match_amounts_with_fx_drift
Read-onlyIdempotent

Determines whether two amounts in different currencies match by converting one at the supplied FX rate and checking if the percentage difference falls within tolerance. Uses exact decimal arithmetic.

Instructions

Compare two amounts in different currencies, converting one via a supplied FX rate and matching if the percentage difference is within tolerance. Uses exact decimal arithmetic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fx_rateYesUnits of currency_a per one unit of currency_b (e.g. an EUR/USD quote of 1.08 is USD per EUR).
amount_aYesAmount denominated in currency_a.
amount_bYesAmount denominated in currency_b.
currency_aYesISO 4217 code of amount_a.
currency_bYesISO 4217 code of amount_b.
tolerance_pctNoMax percentage difference still counted as a match.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.0.5

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds meaningful behavioral detail by disclosing exact decimal arithmetic, the conversion direction, and that matching is percentage-difference based—useful context beyond the annotations.

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 concise sentences front-load the core purpose and then add the important precision detail. Every sentence earns its place with no repetition of schema or annotation information.

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

Completeness5/5

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

Given the detailed input schema, an output schema, and annotations covering safety and side-effect behavior, the description is complete for an agent to select and correctly invoke the tool. The matching logic and decimal arithmetic caveat are the only missing pieces, and both are supplied.

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?

The schema already provides 100% parameter coverage with clear descriptions. The description adds value by explaining how the parameters interact algorithmically: one amount is converted via fx_rate and compared by percentage difference, which is not fully captured in individual parameter docs.

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 uses a specific verb ('Compare') and identifies the exact resource and operation: two amounts in different currencies, converted via an FX rate and matched within tolerance. This clearly distinguishes the tool from siblings like match_names_probabilistic or reconcile_many_to_many.

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 the use case: matching currency amounts with FX conversion and tolerance. However, it does not explicitly state when to prefer this tool over related siblings such as reconcile, reconcile_many_to_many, or explain_match, nor does it mention any exclusions.

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