Skip to Content

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.

--search string
Text to find in document names.
--limit integer
How many to list, 1 to 200. Default 50.
--cursor string
nextCursor from an earlier page.
--folder string
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.

--limit integer
How many matches, 1 to 200. Default 20.
folders list [--cursor <value>]

List the folders in the library, in their sidebar order.

--cursor string
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.

--provider string
A provider ID from this list.
--model string
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.

--cursor string
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.

--name string
Document name. Text documents need a .txt or .md extension; a linked file keeps its own.
--folder string
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>".

--name string
File name with its extension: .pdf, .epub, .docx, .txt or .md.
--size integer
File size in bytes.
--folder string
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.

--voice string
A voice ID from "voices list" or "voices cached". Default: the saved voice.
--model-speed number
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.
--speed number
Playback speed of the finished file, 0.5 to 3. It reuses generated audio. Default 1.
--chapter integer
Zero-based chapter. Default: the whole document.
--format string
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 view

Show 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.

--at string
A sentence key (segmentKey).
--page integer
A PDF page, used when --at is absent or not found.
reader play

Start 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 pause

Pause 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.

Part of openreader_docs
{
  "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"
  }
}
FieldMeaning
argsPositional arguments in order. One ending in ... takes the rest of the line.
flagsEach flag's type is string, number or integer.
inputopenreader_docs only. The tool argument that takes a command's text, such as the Markdown for docs add -.

On this page

Edit this page