convert_to_markdown turns a document into clean, structured Markdown. PDF, Word, Excel, EPUB, MOBI, CHM, TXT and 20+ more formats go in; a .md file comes out, with the layout, headings, lists, and tables preserved. Example prompt: “Convert handbook.pdf to Markdown for my knowledge base.”
Tool description (as the AI agent sees it):
Converts a document to clean, structured Markdown (.md). Supports PDF, DOCX/DOC/RTF/ODT, XLSX/XLS/ODS/CSV/TSV, EPUB, MOBI, TXT, CHM and 20+ more formats. By default, images are embedded as base64 data URIs so the output is fully self-contained. Use ‘images’ to control image handling: ‘base64’ (default), ‘file’ (save images alongside the .md and reference by path), or ‘skip’ (omit images — text-only). Use ‘pages’ to limit output to specific 1-based pages or worksheets. The generated Markdown is saved to storage AND the content is returned inline. Returns the saved file path followed by the Markdown content (long output is truncated inline — the saved .md holds the full text). Call this tool immediately whenever the user asks to convert a document to Markdown, export as MD, or extract as Markdown. Do NOT pre-check whether files exist — just pass the filename the user provided. The tool resolves files from storage and returns an error with available files if a name is not found. On failure, the response text starts with ‘Conversion to Markdown failed for’ followed by the underlying exception type, message, and inner chain.