MCP Tools
Every command of OpenReader's six MCP tools.
help lists a tool's commands, and --help after a command describes its flags. No two tools share a command.
Arguments are quoted as in a shell. After -- every word is an argument, so folders create -- --drafts names a folder --drafts.
openreader
Scope: documents:read
docs list [--search <value>] [--limit <n>] [--cursor <value>] [--folder <value>]List documents in the library, newest first.
--searchstring- Text to find in document names.
--limitinteger- How many to list, 1 to 200. Default 50.
--cursorstring- nextCursor from an earlier page.
--folderstring- Only documents in this folder, or "-" for those in no folder.
docs view <doc>Show one document and whether it is ready to read.
docs chapters <doc>List the reader contents with titles, depth, ordinals, segmentKey and webUrl. Jump with reader goto <doc> --at <segmentKey>. Preparing a new document uses compute limits; retry after retryAfterMs if it is still preparing.
docs search <doc> <query...> [--limit <n>]Find text inside a document. Matching ignores case and accents. Each match has a snippet, the PDF page it is on, and a webUrl that opens the reader there. A document never opened before is prepared first, which uses the user's compute limits; if it is still being prepared, search again after retryAfterMs.
--limitinteger- How many matches, 1 to 200. Default 20.
folders list [--cursor <value>]List the folders in the library, in their sidebar order.
--cursorstring- nextCursor from an earlier page.
voices list [--provider <value>] [--model <value>]List speech providers and their models, then the voices of one provider and model: the saved ones unless you name others.
--providerstring- A provider ID from this list.
--modelstring- A model ID of that provider. Default: its default model.
voices cached <doc>List the voices this document already has audio for. Creating an audiobook with one of them, and its model speed, reuses that audio.
audiobook list <doc> [--cursor <value>]List the audiobooks requested for a document, most recently requested first.
--cursorstring- nextCursor from an earlier page.
audiobook view <id>Show an audiobook's status and progress, what to do next, and its download link once it is ready.
openreader_docs
Scope: documents:write
docs add <source> [--name <value>] [--folder <value>]Add a document from a public URL, "-" to save the text sent in input, or an upload ID from "docs upload" once its file is sent. A link to a PDF, EPUB, DOCX, Markdown or text file keeps that file, up to this instance's upload limit; a web page becomes Markdown, and text is limited to 2 MB.
--namestring- Document name. Text documents need a .txt or .md extension; a linked file keeps its own.
--folderstring- ID of the folder to add it to.
docs upload [--name <value>] [--size <n>] [--folder <value>]Get a link where the user can upload a file from their device. With --name and --size, also prepare a one-time upload URL that a shell can send the file to; then run "docs add <uploadId>".
--namestring- File name with its extension: .pdf, .epub, .docx, .txt or .md.
--sizeinteger- File size in bytes.
--folderstring- ID of the folder to add it to.
docs rename <doc> <name>Rename a document. It keeps its file extension.
docs move <doc> <folder>Move a document into a folder, or "-" to take it out of its folder.
folders create <name>Create a folder.
folders rename <folder> <name>Rename a folder.
openreader_delete
Scope: documents:write. Marked destructive.
docs delete <doc>Delete a document for good, with its generated audio and audiobooks. It cannot be undone.
folders delete <folder>Delete a folder. Its documents are kept and move to the top of the library.
audiobook delete <id>Delete one audiobook and its file. The document and its generated audio stay, so creating it again reuses the speech already generated. A file still being built cannot be deleted yet.
openreader_audio
Scope: audio:generate
audiobook create <doc> [--voice <value>] [--model-speed <n>] [--speed <n>] [--chapter <n>] [--format <value>]Start an audiobook of a document, or of one chapter, in the background. It uses the saved speech settings unless you name a voice. The same request returns the same audiobook (created is false) and resumes it if it was cancelled or interrupted; reusedCachedAudio says whether audio already generated was used.
--voicestring- A voice ID from "voices list" or "voices cached". Default: the saved voice.
--model-speednumber- Speaking rate the model generates at, 0.5 to 3, where the model has one. It changes the audio, so it must match a cached voice to reuse it. Default: the saved speed.
--speednumber- Playback speed of the finished file, 0.5 to 3. It reuses generated audio. Default 1.
--chapterinteger- Zero-based chapter. Default: the whole document.
--formatstring- mp3 or m4b. Default mp3.
audiobook cancel <id>Stop generating a whole-book audiobook. It stays listed as cancelled, and the audio generated so far stays cached: "audiobook create" with the same settings (its next field gives the command) resumes it. To remove it, use "audiobook delete" in openreader_delete.
openreader_reader
Scope: reader:read
reader viewShow what the user is reading. With a reader open and shared (source "live"): the document, the sentence being read, the PDF page, any text the user has selected, and whether it is playing. Otherwise (source "saved"): the last document opened and where the user left off. webUrl opens the reader there. Until the user has chosen whether to share their reader with apps, the call asks them in OpenReader and waits up to a minute; READER_NEEDS_APPROVAL means they have not answered: ask them to, then try again.
openreader_control
Scope: reader:control. reader play also needs audio:generate.
reader goto <doc> [--at <value>] [--page <n>]Move the open reader to a document, or to a sentence or PDF page in it. --at takes a segmentKey from "docs search" or "reader view". outcome not_open means no reader view is sharing: give the user webUrl instead. DOCUMENT_NOT_SHARED means the user keeps that document from connected apps.
--atstring- A sentence key (segmentKey).
--pageinteger- A PDF page, used when --at is absent or not found.
reader playStart reading aloud in the open reader. Needs the audio:generate scope. outcome needs_user_gesture means the browser blocks audio until the user clicks the page: ask them to press play.
reader pausePause reading aloud in the open reader.
Read the commands from a client
Each tool lists its commands in _meta.cli, so a client can send a command line to the tool that runs it without reading descriptions.
{
"cli": {
"commands": [
{
"name": "docs add",
"usage": "docs add <source> [--name <value>] [--folder <value>]",
"summary": "Add a document from a public URL, \"-\" to save the text sent in input, ...",
"args": ["source"],
"flags": {
"name": { "type": "string", "description": "Document name. ..." },
"folder": { "type": "string", "description": "ID of the folder to add it to." }
}
}
],
"input": "input"
}
}| Field | Meaning |
|---|---|
args | Positional arguments in order. One ending in ... takes the rest of the line. |
flags | Each flag's type is string, number or integer. |
input | openreader_docs only. The tool argument that takes a command's text, such as the Markdown for docs add -. |