doc_read
Read-only queries on the open document (a file whose kind is DOC). No data is modified. Safe to auto-approve. Open the document first with files_write(open_file). Call as {"action": "", "params": {...}}.
Blocks are named by a path "." (e.g. "0.3") and carry a hash; doc_write needs the hash to change or delete a block.
Actions: • doc_outline() — Headings with their paths and hashes, plus block count, word count and block types. Start here for long documents. • read_doc(format?, from?, limit?) — Blocks in order, each {path, hash, type, content}. format: "markdown" (default) or "json" (ProseMirror JSON). Paginate with from (default 0) and limit (default 200, max 1000); next_from is null on the last page. • search_doc(query, limit?, case_sensitive?, whole_word?, regex?) — Text matches, each with the block's path and hash and a snippet. • context() — The full guide to documents: block model, Markdown support, placeholders, batches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform: read_doc, doc_outline, or search_doc | |
| params | No | Parameters for the action (see tool description) |