Skip to main content
Glama

Get the data extracted from a document

get_document_data
Read-onlyIdempotent

The structured fields Trackberry read from one document: for a bill of lading the parties, ports, vessel and containers; for an invoice the amounts and terms; and so on. type and schema say what kind of document it is. fields is empty when nothing could be extracted. Use it for "what is the invoice total on doc_45" or "who is the consignee on the B/L". Get document ids from list_documents.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYesA document id such as "doc_45", as returned by list_documents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds a genuinely useful edge case not in annotations or schema: `fields` is empty when nothing could be extracted. It does not discuss error behavior or extraction latency.

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?

Front-loads the core purpose, then layers document-type examples, the return-shape keys, and the empty-fields caveat. Every sentence earns its place; 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?

There is no output schema, so the description carries the return-value burden and does so by naming `type`, `schema`, and `fields` and noting when `fields` is empty. For a single-param read tool this is complete.

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% and there is a single parameter, so the baseline is 3. The description goes beyond by cross-referencing the source of the id (list_documents), which orients the agent on how to obtain a valid value.

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 (retrieve structured fields extracted from one document) and concretely enumerates what those fields are per document type (parties/ports/vessel for a B/L, amounts/terms for an invoice). This distinguishes it from siblings like get_document_file (raw file) and list_documents (ids only).

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?

Gives concrete example queries ('what is the invoice total on doc_45', 'who is the consignee on the B/L') and tells the agent where to source ids (list_documents). It lacks an explicit when-not/alternative statement (e.g. vs get_document_file), but the routing context is clear.

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