Skip to main content
Glama

Check one extracted record

check_extraction

Validate extracted data against a gold standard record: check schema, field accuracy, and fabrication. Returns pass/fail with detailed per-field issues, using the same logic as CI gates.

Instructions

Deterministically check a structured extraction against its hand-labelled gold record: schema validity (nullable fields are the abstention contract), field accuracy with per-field normalisers (dates → ISO, money → minor units) and aliases, and fabrication — a non-null value in a field whose gold is null (a guessed date of birth the document never stated). Same logic as the CI gate — no model, no network. Returns pass/fail with named issues and a per-field verdict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goldYesThe hand-labelled gold record; null means THE DOCUMENT DOES NOT STATE IT — gold's keys define which fields are compared
recordYesThe record the system extracted ({ field: value | null })
schemaNoThe JSON Schema the record must validate against (type a must-find field non-nullable, a may-be-absent field nullable)
aliasesNoPer-field acceptable alternative gold values (matched after normalisation)
normalizeNoPer-field normaliser applied to both sides before comparing

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses that it is deterministic, performs no network/model call, and explains the fabrication logic (null gold vs non-null value). It also states the return format ('pass/fail with named issues and a per-field verdict'). It does not mention error conditions or performance, but for a stateless deterministic check this is sufficient.

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 two sentences, with the first sentence packing the purpose and main checks, and the second noting determinism and output. It is concise and front-loaded, though the first sentence is dense and technically heavy, which slightly impacts readability. Overall it earns its place 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?

The tool has 5 parameters, nested objects, and no output schema, so the description must compensate. It covers the validation logic (schema, accuracy, fabrication), the normalisation and alias handling, and the return structure. It omits potential error cases or size limits, but for a deterministic check these are minor. It gives the agent everything needed to call it and interpret results.

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?

Although the schema provides 100% coverage with descriptions for each parameter, the tool description adds meaningful semantics beyond the schema: it explains that gold's null means 'the document does not state it' and that gold's keys define which fields are compared, clarifies that aliases are matched after normalisation, and elaborates on the normaliser types. This enriches the parameter understanding well past the schema baseline.

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 ('check') and a precise resource ('a structured extraction against its hand-labelled gold record'), then enumerates the exact checks performed: schema validity, field accuracy with normalisers/aliases, and fabrication. This distinguishes it clearly from sibling tools like check_answer_grounding or check_readiness, which address different evaluation concerns.

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 explicitly says 'Same logic as the CI gate — no model, no network', which communicates the deterministic, offline nature and implies it is the authoritative extraction validator. It does not explicitly list when NOT to use it or name an alternative, but the CI gate reference provides strong contextual guidance. A borderline 5, but the lack of explicit 'use this instead of X' keeps it at 4.

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