get_doc
Read a document's metadata, outline, or a single section without loading the whole body into context. Use body=true for the full page and the returned version as the base for updates.
Instructions
Read a document. By DEFAULT returns metadata plus the outline (headings) and NOT the body — a document is far larger than a task, and a body you read stays in your context for the rest of the session. The outline lists headings; section="" returns just that part; body=true returns the whole page. The returned version is what update_doc takes as base_version. If you addressed the document by an old path or a bare slug, the reply carries moved_to (its current path); a bare slug shared by several documents fails with 409 and the list of full paths.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"doc": "<doc>"
},
"name": "get_doc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc | Yes | Document UUID, or a slug path like 'architecture/adr/adr-004' (a path also needs project_id). A path survives the document being moved: the old path still resolves, and so does a bare slug ('adr-004') when exactly one live document in the project has it. When the reference was not the live path, the reply carries moved_to — the document's current path; use that from now on. A bare slug shared by several documents is a 409 ('Ambiguous document slug') listing the full paths: pick one and repeat the call with the full path or the UUID. The UUID never changes. | |
| body | No | Return the full markdown body. Prefer section= when you need one part. | |
| section | No | Return only this section: a heading's text, or its anchor from the outline. | |
| project_id | No | Project UUID. Required only when doc is a slug path. | |
| version_only | No | Return just the version — the cheap 'has this changed since I read it?' check before a write. | |
| outline_depth | No | Limit the outline to headings at this level or shallower (e.g. '2' for chapters, not every subsection). Default: all levels. |