How-to guides
Upload files from your machine
Add local documents — PDFs, scans, Office files, audio — to your library directly from your coding agent.
When the document lives on your disk (not on the web), your agent can upload it straight from your working directory. There are three paths, and your agent picks the right one automatically — but here's what's happening so you know what to expect.
Text you already have → save_note
If it's a text file your agent can already read — a README, a spec, a PRD, any .md —
the fastest path is no conversion at all:
Add this README to my LLMtoMD library.
The agent reads the file and calls save_note, storing it instantly. Use this for
anything plain-text; it doesn't cost a conversion.
Small files → convert_file
For a small binary file (≤ 8 MB) — a short PDF, an image, a scan, a .docx — the agent
reads the bytes, base64-encodes them, and sends them inline:
Convert ./invoice.pdf in this folder and store it.
The agent calls convert_file, the conversion runs, and you get Markdown plus a
document_id. For scans, mention the language so OCR is accurate:
Convert ./contract-scan.pdf with OCR for English.
Large or binary files → upload_file + convert_upload
For big PDFs, audio, or video, pushing bytes through the model is wasteful. Instead the agent gets a one-time upload URL and sends the file straight to storage:
Upload ./podcast.mp3 to LLMtoMD and convert it to a transcript.
What happens:
upload_filereturns anupload_id, a presignedupload_url, and a ready-to-runcurlcommand.- The agent PUTs the file to that URL (the bytes never enter the model's context).
convert_uploadruns the conversion and returns the Markdown.
If you're in a shell-capable agent like Claude Code, all three steps happen for you. The
curl looks like this:
curl -X PUT --upload-file "podcast.mp3" \
-H "Content-Type: audio/mpeg" \
"https://…presigned-upload-url…"
Which path will my agent use?
| Your file | Path | Why |
|---|---|---|
.md, .txt, README, spec | save_note | Already text — no conversion, instant. |
Small PDF / image / .docx (≤ 8 MB) | convert_file | Inline base64 is simplest. |
| Large PDF, audio, video | upload_file → convert_upload | Bytes bypass the model — cheaper, no size limit. |
You don't have to choose — just ask your agent to "add this file" and it routes correctly. Your plan's file-size limit is enforced when the upload is reserved.
Related
- Tools reference — the underlying commands.
- Convert a web page — for files already on the web.