Parse document
mcpParseParse 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"). pdfBackend: leave empty for PDFs with a text layer. Set "ai" when the result is PDF_TEXT_LAYER_SPARSE (a scanned PDF): each page is read by an AI model, about 5 seconds a page, and the call counts as an AI request. Pass the same pdfBackend with every cursor call. 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.
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": "mcpParse"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | ||
| apiKey | No | ||
| cursor | No | ||
| content | No | ||
| fileRef | No | ||
| filename | No | ||
| filepath | No | ||
| maxChars | No | ||
| requestId | No | ||
| pdfBackend | No | ||
| outputFormat | No | ||
| contentEncoding | No |