Skip to main content
Glama

Document Pipeline

document_pipeline
Idempotent

One call: PDF invoice to parse (hallucination-guarded OCR) + field extraction + arithmetic verification (+optional issuer enrich). Flat $0.05/document; inputs validated before payment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesAbsolute http(s) URL of the input (web page or PDF, per tool)
enrichNoAlso run issuer enrichment on the parsed invoice
x_paymentNoOptional: base64 X-PAYMENT header value (x402 exact scheme, USDC on Base mainnet). Omit it to receive the payment requirements (accepts[] + docs) for this call without being charged.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / enrich / description
      Added value: +"Also run issuer enrichment on the parsed invoice"
    • addedInput schema / properties / url / description
      Added value: +"Absolute http(s) URL of the input (web page or PDF, per tool)"
  2. Added

TDQS

A4.2/5.0
Behavior5/5

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

Despite annotations carrying readOnlyHint/openWorldHint/idempotentHint/destructiveHint, the description adds substantial non-obvious behavior: a flat $0.05 charge per document, hallucination-guarded OCR (an accuracy guarantee), input validation occurring before any payment, and the x402/USDC payment scheme details. This goes well beyond what the annotations disclose and is genuinely actionable for an agent deciding whether and how to call.

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?

A single dense sentence front-loads the core value proposition ('One call:') and then delivers each distinct fact — pipeline stages, optional enrichment, pricing, and the validation-before-payment guarantee — without any filler. Every clause earns its place and nothing is redundant with the schema.

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?

For a paid, side-effecting pipeline with full schema coverage, the description covers the essential operational facts: what the call performs, the cost model, and the payment-requirement discovery flow. The main gap is the absence of output/return-value documentation (no output schema exists), though the 'field extraction + arithmetic verification' phrasing lets an agent reasonably infer the result shape.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema already documents url, enrich, and x_payment thoroughly (including the omit-to-get-requirements behavior). The description reinforces the enrich parameter ('optional issuer enrich') and the input type (PDF/web page) but adds no new parameter-level meaning beyond the schema. Baseline 3 is appropriate.

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?

The description states a precise verb+resource ('parse PDF invoice') and enumerates the full pipeline: hallucination-guarded OCR, field extraction, arithmetic verification, and optional issuer enrichment. This distinguishes it from the individual siblings (parse_document, verify_invoice, ocr_image, structured_extract) by signaling it is the consolidated one-call version of those stages.

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

Usage Guidelines3/5

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

The 'One call:' framing implies this is the full pipeline, hinting an agent should use individual siblings when only a single stage is needed, and the x_payment semantics describe how to discover payment requirements without charge. However, no sibling or alternative is named explicitly and there are no when-not conditions, leaving routing to inference.

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