Skip to main content
Glama

Agent Data Tools: Full list (every tool as its own definition)

Extract data from a document: invoice, receipt, contract fields as JSON

document_extract
Read-only

Extract named fields from a document as JSON: give a PDF, Word, Excel or PowerPoint file, a scan or a photo (PNG, JPEG, WebP) by URL or in a POST body (up to 10 MB; images 3 MB) and the field names you want, such as invoice_number, total, due_date. An AI model reads the file, scans by OCR, and returns one JSON object, with null where a value is not stated. Use to turn invoices, receipts, orders and contracts into rows. Price $0.03/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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": {
      "url": "<url>",
      "fields": "<fields>"
    },
    "name": "document_extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute public http(s) URL of the file (or send the file in a POST body instead)
fieldsYesComma-separated field names to extract (1-30). For rows, give the row keys in brackets: line_items[description,quantity,amount]. Or one word, invoice or receipt, for the usual fields of that document with its line items

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Well beyond the annotations, it discloses 10 MB file / 3 MB image limits, the fact that an AI model plus OCR is used, that missing values come back as null, and that each call is billed ($0.03 via x402 USDC or card key, first 25 free, failed calls free). The "reads or computes only and changes nothing" line and "repeats are not free" are consistent with readOnlyHint=true and idempotentHint=false, so annotations and prose reinforce each other.

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 core capability and inputs are front-loaded, and the pricing/behavioral sentence is separated rather than buried. The first sentence is long and packs formats, delivery modes, and size limits into nested parentheses, which costs some scannability.

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?

For a two-parameter extraction tool with no output schema, the description covers what the agent needs: accepted inputs, size limits, what the return value is, how missing values appear, and what the call costs. Nothing required to invoke it correctly is missing.

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%, so the baseline is 3, but the description adds real constraint detail the schema lacks: which file formats are accepted for the url/body input and the size ceilings. It also illustrates field names (invoice_number, total, due_date), though the bracket row syntax is already documented in the schema.

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?

It names a specific verb and resource ("Extract named fields from a document as JSON") and spells out the accepted input formats (PDF, Word, Excel, PowerPoint, scans, PNG/JPEG/WebP) and the output shape (one JSON object). The gap is sibling differentiation: extract, document_text, pdf_extract, and pdf_text all sit nearby, and the description never says how this differs from plain text extraction.

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?

Usage context is concrete: "Use to turn invoices, receipts, orders and contracts into rows," which tells an agent the task shape this serves. It stops short of explicit exclusions or naming an alternative for the case where raw text rather than structured fields is wanted.

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.