Skip to main content
Glama

Document Extraction

documents
Read-only

Extract structured data from URLs or content. Returns the extracted data as JSON (shaped by your schema when you pass one), with the source URL and whether long content was truncated. Use to turn a page or a text into structured fields. For a page's full text use scrape; for invoices and receipts use invoice-parse. Pass url or content; extraction_prompt says what to extract, and schema fixes the shape of the JSON you get back. Cost: 3 credits, charged only when a call succeeds.

Input Schema

NameRequiredDescriptionDefault
urlNoURL to scrape and extract from.
schemaNoJSON schema for extraction.
contentNoPre-scraped text content.
extraction_promptYesWhat to extract (required unless schema is provided).

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 cover the safety profile (readOnlyHint, openWorldHint), but the description adds real behavioral context: JSON output shaped by the schema, inclusion of the source URL and a truncation flag, and a cost model (3 credits, charged only on success). It stops short of describing failure behavior or rate limits, so 4 rather than 5.

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?

Front-loads the purpose, then usage/routing, then parameters and cost. Dense and mostly waste-free, though the final two sentences could be tightened into one without losing information.

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?

With no output schema, the description carries the return-value burden and does so by naming the JSON payload, the source URL, and the truncation indicator. Combined with the cost disclosure, an agent has enough to call it correctly; only error/auth behavior is unaddressed.

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 semantic relationships: 'Pass url or content' implies the source alternatives, and it explains that extraction_prompt defines what to extract while schema fixes the output shape. This clarifies the interplay of the parameters beyond their individual schema descriptions.

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 (extract) and resource (structured data from URLs or content), and explicitly differentiates from siblings 'scrape' and 'invoice-parse' by naming their use cases. An agent can select this tool without opening any schema.

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

Usage Guidelines5/5

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

Names alternatives and the exact conditions that route to them: full page text to scrape, invoices/receipts to invoice-parse. Also states the positive case ('turn a page or a text into structured fields'). No inference required.

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.