Skip to main content
Glama

WritersLogic developer agents

doc-to-markdown

Document to Markdown with per-page hashes and offsets — Converts a PDF (text layer), DOCX, XLSX or PPTX file, or normalizes an HTML, Markdown, text, CSV or JSON file, into Markdown (or plain text) for an agent that must read or cite a document. Give an https URL or up to 4 MB as base64. Returns the content plus one unit per page, sheet or slide with its exact character range in the content and a SHA-256 of that unit's text, so later quote and citation

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "doc-to-markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNohttps URL of the document. Provide this or content_base64.
pagesNoPage, sheet or slide selection such as "1-5,8", at most 200 pages. Default: the first 200.
formatNomarkdown (default) or text (Markdown syntax removed).
describeNoAlso suggest a file name, tags and a summary with a language model. Default false.
filenameNoOriginal file name; helps format detection and is kept as the extension of the suggested name.
max_charsNoOutput cap in characters, cut at a unit boundary. Default 120000.
content_base64NoStandard padded base64 of the file, at most 4 MB decoded. Provide this or url.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources