roam_fetch_block
Fetch a block from your Roam graph by its UID, optionally including nested children up to a specified depth and the ancestor chain to the page root. Returns block details like text and order.
Instructions
Fetch a block by its UID with optional children (down to a specified depth) and/or ancestors (up to page root). Returns the block's UID, text, order, children array, and optionally an ancestors array with the chain to the page root.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| block_uid | Yes | The UID of the block to fetch. | |
| depth | No | Optional: The number of levels deep to fetch children. Defaults to 4. Set to 0 to skip children. | |
| include_ancestors | No | Optional: Include the ancestor chain from the block up to the page root. Each ancestor includes uid, string/title, and depth. Defaults to false. | |
| graph | No | Target graph key from ROAM_GRAPHS config. Defaults to ROAM_DEFAULT_GRAPH. Only needed in multi-graph mode. | |
| write_key | No | Write confirmation key. Required for write operations on non-default graphs when write_key is configured. |