Skip to main content
Glama

smart-document

Premium PIPELINE in a single call: takes an image or PDF, extracts its text (OCR), summarizes it and translates the summary to the target language. For agents that need to 'understand a document' end-to-end (invoices, contracts, letters, papers) without orches [x402: 0.03 USDC on Base, pay-per-use]

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": {
      "file_b64": "<file_b64>"
    },
    "name": "smart-document"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_b64YesFile as base64 (or upload it via multipart)
languageNoTarget language of the translated summary (ISO, default 'en')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • removedInput schema / properties / archivo_b64
      Removed value: -{
      -  "description": "Imagen/PDF en base64 (o subir 'archivo' por multipart)",
      -  "type": "string"
      -}
    • addedInput schema / properties / file_b64
      Added value: +{
      +  "description": "File as base64 (or upload it via multipart)",
      +  "type": "string"
      +}
    • removedInput schema / properties / idioma
      Removed value: -{
      -  "description": "Idioma destino de la traducción (ISO, def 'en')",
      -  "type": "string"
      -}
    • addedInput schema / properties / language
      Added value: +{
      +  "description": "Target language of the translated summary (ISO, default 'en')",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "archivo_b64"
      -]New value: +[
      +  "file_b64"
      +]
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It does add genuinely useful, non-structured context — the x402 pricing model (0.03 USDC on Base, pay-per-use) and the fixed stage order — but it says nothing about file size or page limits, failure modes, or how partial failures in the pipeline are handled, and the closing clause that would have described the alternative is truncated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core capability is front-loaded in the first clause, which is good, and the pricing bracket earns its place. But the definition ends mid-sentence, leaving a dangling fragment, and the example-document parenthetical crowds an already long sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a multi-stage pipeline with no annotations and no output schema, so the description must explain what comes back — and it does not say whether the response contains the extracted text, the summary, and the translation separately or only the final translated summary. Cost is covered; return shape and limits are not.

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% with only two parameters, so the schema already explains file_b64 and language (including the default of 'en'). The description's mention of 'image or PDF' adds a small amount of accepted-format meaning to file_b64, but nothing beyond that — the correct baseline for fully documented params.

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 chain and resource: 'takes an image or PDF, extracts its text (OCR), summarizes it and translates the summary'. This is clearly distinct from a bare 'ocr' sibling because it bundles three stages. It loses a point only because the sentence is cut off mid-word ('without orches'), so the scope statement never finishes.

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 phrase 'For agents that need to "understand a document" end-to-end ... without orches[trating]' implies the tool should be chosen over stitching together separate OCR/summarize/translate calls, and it lists example document types (invoices, contracts, letters, papers). However, no sibling is named and no when-not condition is given, so routing guidance is only implied.

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.