file-to-markdown is a Jean2 tool that converts PDFs, Office documents, and archives to Markdown. Agents can now process files they couldn't handle before.
It wraps the filetomarkdown npm package by Josef Nobach (jojomondag), inspired by Microsoft's markitdown Python tool. I built the Jean2 layer around it: JSON API, caching, runtime support, and workspace boundaries.
The new ability
Models like GLM-5.1, Minimax, and many more have zero file handling. Their only input is text, not files. This tool changes that. The agent converts the file to markdown and feeds it as text. The model doesn't need file support anymore.
Even for models that already handle files, this saves real tokens. Feed a 4.7 MB book directly to the model and ask for a summary of the last chapter. You're spending above 100k tokens. With file-to-markdown, the agent converts the entire PDF once to markdown, then uses paginated read-file and grep to pull only the relevant sections into context. Same task, roughly 30k tokens. You also get visibility into whether the model actually read those sections or is just inferring from it's own training data.
Supported formats
.pdf, .docx, .xlsx, .pptx, .odt, .ods, .odp, .zip, .7z
How it works
Standard Jean2 Tools API. JSON in via stdin, JSON out via stdout. Nothing else to learn if you've used other Jean2 tools.
Session-based caching. The tool generates a checksum from file path, size, and modification time. Same file, same result. No re-conversion on subsequent reads. Matters when you're running agents on large document sets.
Pagination. Offset and limit parameters for large documents. This prevents unwanted truncation or context overflow.
Lines truncated at 2000 characters. Keeps the context window from blowing up on data-heavy files.
50MB max file size.
Workspace boundaries and security. Blocks system directories, flags sensitive files, respects the workspace root.
Bun and Node
Both runtimes supported. Pick whichever you're already running. The tool doesn't care.
Where to get it
jean2 tools install file-to-markdown
Then add it to your preconfig of choice in the configuration menu (In your client). No restart needed. Drag and drop file to chat, give task / ask question, profit!
If something breaks or a format doesn't work, open an issue or hit me at @danielbilekq0.