How MCP Commands Behave
Adding files, searching, steering the reader and making audiobooks.
Add documents
docs add <url> keeps a PDF, EPUB, DOCX, Markdown or text file as it is, up to the instance's upload limit. A web page becomes Markdown.
--folder adds the document to a folder in each case.
Organize and delete
docs renamekeeps the document's file extension.docs move <doc> <folder>files a document.-in place of a folder takes it out, anddocs list --folderfilters the same way.docs deleteremoves a document with its generated audio and audiobooks, and cannot be undone.folders deleteremoves only the folder. Its documents move to the top of the library.
Search and chapters
docs search <doc> <query> ignores case and accents. Each match has a snippet, its segmentKey, the PDF page and a webUrl that opens the reader at that sentence.
docs chapters <doc> lists the reader's contents with titles, nesting depth, inclusive ordinal ranges, segmentKey, PDF page and webUrl. Audiobooks use these titles while keeping their own chapter boundaries.
A document never opened before is prepared first, which counts toward the user's compute limits. If it is still preparing, the error says when to try again.
The reader
reader view shows what the user is reading. With a reader open and sharing, that is the document, the sentence, the PDF page, any selected text and whether it is playing. Otherwise it is the last document opened and where the user left off. Documents kept from connected apps never appear.
The first reader call waits up to a minute while OpenReader asks the user whether to share. READER_NEEDS_APPROVAL means they have not answered yet.
reader goto <doc> --at <segmentKey> moves the open reader to a sentence from docs search, docs chapters or reader view, and --page to a PDF page. It works whether or not audio is playing; from the library it opens the document.
outcome | What to do |
|---|---|
not_open | No reader is sharing. Give the user webUrl. |
needs_user_gesture | The browser is waiting for the user to press play. |
Reader control has every outcome.
Voices
A voice ID names its provider, model and voice, as provider/model/voice.
| Command | Lists |
|---|---|
voices list | The providers and models the user can use, then the voices of the saved ones, or of --provider and --model |
voices cached <doc> | Voices the document already has audio for, with the model speed it was made at |
Creating an audiobook with a cached voice and its --model-speed reuses that audio. Voices whose audio no longer matches the reading settings, or whose provider is disabled, are left out.
If the provider does not answer, voices are left out with a PROVIDER_UNAVAILABLE error. The providers stay listed so you can pick another.
Audiobooks
audiobook create uses the saved speech settings for anything you leave out, and returns at once with a status and the voice ID.
| To | Run |
|---|---|
| Check on it | audiobook view <id> |
| Stop it, keeping its audio | audiobook cancel <id> |
| Resume it | The same audiobook create command |
| Delete the file, keeping its audio | audiobook delete <id> |
--model-speedis the rate the model speaks at, so it changes the audio.--speedonly speeds up the finished file.- Repeating a command returns the same audiobook with
created: false.reusedCachedAudiosays whether audio was already there. audiobook listandaudiobook viewonly report; they never start or resume generation. Theirnextfield says what to do: follow progress, give the user the download link, or run the command it spells out to resume.- A file still being built cannot be deleted until it is ready.
Links and errors
Results include a webUrl that opens the document. A ready audiobook also has a webDownloadUrl, a page that starts the download. These links and uploadPageUrl need the user to be signed in to the owning account, and offer to sign in or switch account otherwise.
Tools never return audio files, API file addresses or storage links, apart from the one-time upload URL.
A failed command returns a code, a message and, when it applies, retryAfterMs. A command line it cannot read returns its usage.