Skip to main content
Glama
claygeo
by claygeo

Match PO lines to the catalog

distru_match_po_to_catalog
Read-only

Match purchase-order lines to catalog products, returning unambiguous matches and flagging ambiguous or unresolvable lines for human review.

Instructions

Match free-form purchase-order lines against the product catalog and report what could NOT be resolved. Read-only; writes nothing. Returns two buckets: matched (one product, unambiguously) and needs_review (why it stopped, plus every candidate considered). It deliberately does not guess when the catalog is ambiguous - duplicate rows for one product, reissued SKUs, colliding category slugs, and conflicting MSRPs all stop the line and are returned with evidence. Treat needs_review as the point of the tool, not as an error: those lines need a human, and presenting a confident answer for them would be wrong.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linesYesThe PO lines to resolve.
flag_price_mismatchNoStop a line when its price differs from the catalog price. Default true.
include_catalog_warningsNoInclude structural problems found in the catalog itself. Default true.
flag_insufficient_inventoryNoStop a line when on-hand quantity cannot cover it. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, so 'Read-only; writes nothing' only reinforces them. The description goes well beyond annotations by disclosing the two-bucket return shape, the deliberate no-guess policy on ambiguity, the concrete stop conditions (duplicate rows, reissued SKUs, colliding category slugs, conflicting MSRPs), and — most importantly — that needs_review is the tool's point, not a failure signal. That last point prevents an agent from misreading results and retrying.

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?

Five sentences, roughly 100 words, with the core purpose front-loaded. Each sentence earns its place: purpose, safety, output shape, no-guess policy with concrete triggers, and interpretation guidance. There is no repetition of schema content and no filler.

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?

Even without an output schema, the description compensates by specifying the two return buckets and their contents. All four parameters are fully documented in the input schema, annotations cover the safety profile, and the description supplies the interpretation rules an agent needs to act correctly on results. Nothing required to invoke the tool correctly is missing.

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 coverage is 100%, so the baseline is 3. The description adds value on top by supplying the domain model behind the flags: conflicting MSRPs motivate flag_price_mismatch, duplicate rows and colliding slugs motivate include_catalog_warnings, and the 'why it stopped' bucket connects to all three toggles. It also frames lines as 'free-form,' which contextualizes the raw field example in the schema.

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 pair — 'match free-form purchase-order lines against the product catalog' — and immediately clarifies its distinguishing scope: it reports what could NOT be resolved. This clearly separates it from siblings like distru_list_products, distru_get_product, and distru_get_inventory, which list or fetch records rather than resolve them.

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

Usage Guidelines4/5

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

The description establishes clear context: use this when you hold free-form PO lines that need resolution against the catalog. It does not, however, explicitly name when-not-to-use cases or point at alternatives, so it falls just short of the explicit routing standard.

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