Skip to main content
Glama

Document Structured Extractor

document_structured_extractor
Read-onlyIdempotent

Extract structured fields and source evidence from supported documents using task-specific profiles such as tenders, invoices, contract dates, and privacy policies. Returns schema-validated JSON with confidence and page/source references. Use when you need named fields extracted from an invoice or other document with evidence. Price: $0.05 per document.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNo
sourceYes
profileYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYes
profileYes
warningsYes
evidenceRequiredYes
truncatedByBudgetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare read-only, open-world, idempotent, and non-destructive behavior. The description adds meaningful context: output is schema-validated JSON with confidence scores and page/source references, and there is a per-document price. This goes beyond what annotations provide and does not contradict 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences with no padding; the core action and output behavior are front-loaded. The price and usage guidance add useful information rather than fluff. Minor vagueness like 'supported documents' prevents a perfect score.

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

Completeness3/5

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

The detailed JSON schema covers parameter shapes and an output schema exists, so return-value explanation is unnecessary. However, with zero parameter descriptions in the schema and the description omitting how to specify source and fields, key input semantics are left to inference. The tool remains callable using just the schema, but the description alone is not fully self-sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate by explaining parameters. It mentions task-specific profiles and source evidence, but it doesn't name the three parameters, explain the source accepted types (url/text/base64), or describe the optional 'fields' array. The profile enum is only partially illustrated with examples, leaving meaning for the agent to infer.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb 'Extract' plus resource: 'structured fields and source evidence' from supported documents using task-specific profiles. Lists representative profiles (tenders, invoices, contract dates, privacy policies) and mentions schema-validated output, so an agent can identify the tool's role. It doesn't explicitly differentiate from sibling tools like document_table_extractor, but the profile-based extraction concept is clear enough.

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?

Explicitly instructs 'Use when you need named fields extracted from an invoice or other document with evidence.' This provides a clear trigger condition. It doesn't specify when not to use the tool or direct to alternatives among siblings, so it stops short of full guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources