Skip to main content
Glama

extract_document

Extracts structured data from a single insurance certificate or loss run, stores the normalized result, and reports validation issues with review status.

Instructions

Extract structured data from one document and store the result.

Returns the document id, detected type, status (accepted, needs_review or
rejected), the normalized data, and any validation issues.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "document_name": "<document_name>"
    },
    "name": "extract_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
document_nameYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the outcome states (accepted, needs_review, rejected) and validation issues, which is real behavioral context. However, it omits whether the call is synchronous or long-running, whether re-extracting the same document overwrites or duplicates prior results, and what happens on failure.

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?

Two short paragraphs, front-loaded with the action, with zero filler. The enumerated return list is somewhat redundant given an output schema exists, which keeps it from a 5.

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?

Because an output schema exists, the return description is a bonus rather than a necessity, so the real gaps are prerequisites and mutation semantics: what identifies a valid document and what happens to existing extraction results. For a write-and-store operation with no annotations, that leaves the definition only minimally adequate.

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?

There is one parameter at 0% schema description coverage, and the description only says 'one document' without clarifying whether document_name is an id, filename, or path, or how to obtain a valid value. It does not compensate for the documentation gap.

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 and resource: 'Extract structured data from one document and store the result.' The 'store the result' part usefully distinguishes it from read-only siblings like get_extraction and list_documents, though it never names those alternatives explicitly.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance. An agent must infer that this is the trigger that produces the extraction that get_extraction later reads, and nothing says whether the document must already be registered, whether it can be re-run, or how it differs from the sibling tools.

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