Skip to main content
Glama

Clean-Room Web & Proof

Extract Clean Text and Tables from Document

cleanroom_parse_safe_document
Read-onlyIdempotent

Parse structured text and tables from an invoice, receipt, menu, or document image with hidden instructions stripped and a source file hash ($0.04).

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": {
      "image_b64": "<image_b64>"
    },
    "name": "cleanroom_parse_safe_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
image_b64YesDocument image payload encoded as text for table and layout extraction.
spend_keyNoOptional prepaid API key for paid lookups. Can also be sent in the x-atlas-spend-key or Authorization header.
builder_codeNoOptional partner referral code for revenue sharing.
document_typeNoOptional document type hint.
extract_tablesNoSet to true (default) to extract structured table rows and columns.
idempotency_keyNoOptional unique request ID to prevent duplicate billing on retries.
payment_signatureNoOptional direct payment header when paying per request without a prepaid API key.

Output Schema

NameRequiredDescriptionDefault
okNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and a closed-world profile, so the safety bar is met. The description adds real value beyond that: hidden instructions are stripped (prompt-injection sanitization), a source file hash is returned, and the call costs $0.04 — all behaviors an agent needs and none of which appear in the structured fields.

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?

A single dense sentence with the action and scope front-loaded, followed by the two distinguishing behaviors (instruction stripping, resulting hash) and the price. Nothing is wasted, though the parenthetical pricing tacked onto the end reads slightly bolted-on.

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 an output schema present, return-value documentation is not the description's job, and schema coverage is complete for all 7 parameters. The remaining gap is procedural: how the paid path (spend_key vs payment_signature) is expected to be used is left entirely to the schema, but overall the definition is sufficient to invoke the tool correctly.

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 every parameter (image_b64, spend_key, builder_code, document_type, extract_tables, idempotency_key, payment_signature) is already self-documenting. The description adds only the $0.04 price point, which gives implicit motivation for the payment/spend-key parameters but does not explain how payment or idempotency actually behave beyond 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?

States a specific verb (parse) and resource (structured text and tables from a document image) and enumerates the input domains it covers: invoice, receipt, menu, or generic document. It does not differentiate itself from the closest sibling, cleanroom_redact_and_parse_document, so an agent cannot tell from this text alone which of the two to pick when redaction is not needed.

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?

Usage is only implied through the document-type scoping; there is no explicit when-to-use, when-not-to-use, or named alternative. Given siblings like cleanroom_redact_and_parse_document and cleanroom_preview_paid_tool, a sentence routing between them (e.g., use preview first, or use redact variant if you also need PII removal) would materially help.

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