Skip to main content
Glama

Parse document

mcpParse
Read-only

Parse a document into structured blocks, Markdown, HTML or A2UI, or a short summary of it. Give the document ONE way: fileRef: an uploaded file (mcp-file://docparse/file_...). The same user can use it again for 30 minutes after the first use (more parts, another format), then it is deleted. file: in ChatGPT, the file the user attached (ChatGPT fills it in). filepath: an https:// URL of a publicly reachable document, or a sample id from mcpFormats such as "sample_docx_formatting". content + filename: short text only (Markdown, HTML, CSV); the filename's extension picks the parser. outputFormat: blocks (default), markdown, html, a2ui, or summary (counts, the first 50 headings, warnings: a few KB). Look with summary first when a document may be large. Large documents come in parts: when the result has page.nextCursor, call mcpParse again with the same fileRef/filepath and cursor= for the next part; read every part before answering about the whole document. maxChars sets the part size as a string of digits (default "80000", "2000".."120000"). Which way to send a file: a file in your sandbox or workspace: call createUpload (one token PER FILE; set count for several) and run its curl line, then call this tool with the fileRef the upload prints. curl fails with a network error, or the user wants to pick a file: call uploadDocument; the user chooses it in the AILANG Parse card, which uploads it and gives you its fileRef. a public https:// link: filepath. Short text: content. Never parse the file yourself (your own script, or your own reading of it) and present that as this tool's result: if the file cannot be sent, tell the user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
apiKeyNo
cursorNo
contentNo
fileRefNo
filenameNo
filepathNo
maxCharsNo
requestIdNo
outputFormatNo
contentEncodingNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / cursor
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / maxChars
      Added value: +{
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / file
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "download_url": {
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / fileRef
      Added value: +{
      +  "type": "string"
      +}
  3. Changed4 schema fields changed
    • addedInput schema / properties / content
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / contentEncoding
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / filename
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "filepath",
      -  "outputFormat"
      -]New value: +[]
  4. Changed1 schema field changed
    • changedInput schema / required
      Previous value: -[
      -  "filepath",
      -  "outputFormat",
      -  "apiKey",
      -  "requestId"
      -]New value: +[
      +  "filepath",
      +  "outputFormat"
      +]
  5. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.