Skip to main content
Glama

Extract fields by regex, Jev picks the right match

jev_extract

Extract structured fields from documents: regex finds candidate values, AI selects the true one, and the result is returned verbatim. Ambiguous picks are flagged; no matches means no API call.

Instructions

Extract structured fields from a document with TypeSafe Jev as the picker, not the generator: your regex finds candidate substrings in code, Jev chooses which candidate is the field's true value, and the result is returned verbatim — never model-generated text. Fields with zero regex matches never reach the model (not_found); if no field has matches, no API call is made. Ambiguous picks are flagged for review. Use for prices, dates, version numbers, IDs, and anything with a recognizable shape; keep documents bounded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYesFields to extract. Up to 32 per call, all judged in one request.
purposeNoWhat the extraction is for; shared across fields.
documentYesThe document to extract from. Rejected above 50,000 characters.
auto_acceptNoMinimum top probability for auto. Default 0.85.
minimum_marginNoMinimum winner-to-runner-up gap for auto. Default 0.5.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly discloses that results are returned verbatim, that fields with zero matches become 'not_found', that no API call is made if no field has matches, and that ambiguous picks are flagged for review. This is unusually rich behavioral context for a tool without 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?

Every sentence earns its place: the first explains the core behavior, the second covers failure modes, the third covers ambiguity handling, and the last gives practical usage guidance. The description is front-loaded and contains 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 description plus full schema coverage gives an agent enough to call the tool correctly. It explains the input semantics, failure behavior, and output philosophy. It does not specify the exact response JSON structure, but since there is no output schema, slightly more precision about the returned shape would be helpful; overall this is still strong.

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 description coverage is 100%, so the schema already documents each parameter. The description goes beyond that by explaining how the parameters interact: the regex finds candidate substrings, Jev picks the true value using the field description, and zero-match fields never reach the model. It also explains that ambiguity causes review, which adds meaning to auto_accept and minimum_margin.

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 names a specific verb ('Extract'), a specific resource ('structured fields from a document'), and the core mechanism ('TypeSafe Jev as the picker, not the generator'). It also differentiates from sibling tools by emphasizing verbatim, non-model-generated results.

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 gives clear use cases: 'prices, dates, version numbers, IDs, and anything with a recognizable shape.' It also advises to 'keep documents bounded.' It does not explicitly name which sibling to use instead for other operations, but the extraction-versus-classification/decision framing makes the intended context fairly clear.

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