Skip to main content
Glama

Agent Data Tools: Web, documents and search

Document to text: Word, Excel, PowerPoint, PDF

document_text
Read-only

Convert a document to text or Markdown: Word (.docx), Excel (.xlsx), PowerPoint (.pptx), PDF, plain UTF-8 text (.txt/.md/.csv/.json), and scans or images (PNG, JPEG, WebP) by OCR. Give a public URL or POST the file (10 MB default; 10-20 MB URLs retry once at 20 MB; images 3 MB). Old formats and protected files fail uncharged. Use for attachments, scans and spreadsheets in an agent, RAG or workflow. Example: url=https://calibre-ebook.com/downloads/demos/demo.docx. Price $0.005/call via x402 USDC or a card key (/credits); 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>"
    },
    "name": "document_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute public http(s) URL of the file (or send the file in a POST body instead)
formatNomarkdown (default: headings, lists and tables kept) or text
maxBytesNoMaximum file size in MB for a URL read (10 default, up to 20). If omitted, a file over 10 MB is retried once at 20 MB; an explicit value is respected
maxCharsNoMaximum characters of text returned (1000-200000, default 50000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / maxBytes / description
      Previous value: -"Maximum file size in MB for a URL read (10 default, up to 20 for large scans and decks); the default stays small because the whole file is held in memory"New value: +"Maximum file size in MB for a URL read (10 default, up to 20). If omitted, a file over 10 MB is retried once at 20 MB; an explicit value is respected"
  2. Changed1 schema field changed
    • addedInput schema / properties / maxBytes
      Added value: +{
      +  "description": "Maximum file size in MB for a URL read (10 default, up to 20 for large scans and decks); the default stays small because the whole file is held in memory",
      +  "maximum": 1000000000000,
      +  "minimum": -1000000000000,
      +  "type": "integer"
      +}
  3. Changed2 schema fields changed
    • changedInput schema / properties / maxChars / maximum
      Previous value: -9007199254740991New value: +200000
    • changedInput schema / properties / maxChars / minimum
      Previous value: --9007199254740991New value: +1000
  4. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well past the annotations: discloses size ceilings (10 MB default, one retry at 20 MB, images 3 MB), that legacy formats and protected files fail without charge, pricing at $0.005/call, and that repeated calls are billed. That the tool 'reads or computes only and changes nothing' reinforces rather than contradicts readOnlyHint/destructiveHint, and the per-call billing note is consistent with idempotentHint=false.

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-loaded with capability and formats, then constraints, then cost, then the worked example — easy to scan. Some redundancy creeps in: 'Old formats and protected files fail uncharged' and 'failed calls free' say the same thing, and the closing charge clause repeats the pricing sentence.

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 four-parameter conversion tool with no output schema, everything an agent needs is present: supported inputs, both transport modes, size limits and retry behavior, failure modes, cost implications, and a runnable example URL. The only gap is the exact shape of the returned text, which the format enum and maxChars largely settle.

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 one fact not in the schema: an image-specific 3 MB limit alongside the URL retry ladder. Format and character-cap semantics are left entirely to the schema, which is acceptable given how thorough it is.

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 and resource ('Convert a document to text or Markdown') and enumerates the accepted formats including OCR for images. It is immediately clear what the tool does, though it never distinguishes itself from the sibling pdf_text despite overlapping PDF coverage.

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?

Gives concrete invocation context ('Use for attachments, scans and spreadsheets in an agent, RAG or workflow') and explains the two input paths (public URL or POST body) plus how to size the request. It stops short of saying when to prefer this over pdf_text or document_extract, so no explicit exclusions or alternatives are offered.

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.