Skip to main content
Glama

explain_match

Read-onlyIdempotent

Break down a single expected-versus-observed record match score by reference, amount, date, and name signals for tuning weights or reviewing match confidence.

Instructions

Explain the match score between one expected and one observed record.

Purpose: Scores a single transaction pair across reference, amount, date, and name signals, returning individual signal weights and an explanation even for pairs below threshold.

When to use:

  • When tuning scoring weights, tolerances, or debugging match decisions.

  • When explaining match confidence for human review or exception handling.

When NOT to use:

  • Do NOT use for entire batches; use reconcile instead.

  • Do NOT use for cross-currency conversions without a known FX rate; use match_amounts_with_fx_drift.

Behavioral transparency: Pure, deterministic, side-effect-free, read-only calculation without external dependencies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optionsNoOptional tuning object: 'abs_tol'/'rel_tol' (amount tolerance), 'date_window_days', 'high_threshold', 'review_threshold', 'currency_strict', 'enable_one_to_many', 'max_combination'.
expectedYesOne expected record.
observedYesOne observed record.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds genuine value by noting it returns individual signal weights and an explanation even for below-threshold pairs, plus that it is pure and dependency-free. Some phrases ('side-effect-free, read-only') restate annotations rather than extend them.

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 purpose sentence is front-loaded and the labeled sections (Purpose, When to use, When NOT to use, Behavioral transparency) make it scannable. Slightly verbose with some redundancy between the purpose line and the purpose section, but nothing is wasted.

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?

An output schema exists, so return values need not be described, and annotations carry the safety profile. The description covers purpose, routing, and determinism fully, leaving nothing an agent needs in order to invoke it correctly.

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% and the options object already enumerates its tuning keys (abs_tol/rel_tol, date_window_days, thresholds, etc.). The description mentions tuning weights and tolerances but adds no syntax or format detail beyond what the schema provides, so baseline 3 applies.

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?

States a specific verb and resource ('Explain the match score between one expected and one observed record') and elaborates on what signals are scored (reference, amount, date, name). This clearly distinguishes it from siblings like reconcile and match_amounts_with_fx_drift.

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

Usage Guidelines5/5

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

Provides explicit 'When to use' and 'When NOT to use' sections, naming concrete alternatives (reconcile for batches, match_amounts_with_fx_drift for cross-currency without FX rate). The routing guidance is unambiguous.

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