Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
block_uidYesThe UID of the block to fetch.
depthNoOptional: The number of levels deep to fetch children. Defaults to 4. Set to 0 to skip children.
include_ancestorsNoOptional: Include the ancestor chain from the block up to the page root. Each ancestor includes uid, string/title, and depth. Defaults to false.
graphNoTarget graph key from ROAM_GRAPHS config. Defaults to ROAM_DEFAULT_GRAPH. Only needed in multi-graph mode.
write_keyNoWrite confirmation key. Required for write operations on non-default graphs when write_key is configured.
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses returned fields (UID, text, order, children, optional ancestors) and optional parameters, but omits error behavior, auth requirements (write_key mentioned but not explained), or performance characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, each earning its place. First sentence states action and resource; second details return values. No redundant or filler text. Front-loaded with key info.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description provides essential info but lacks details on error handling, rate limits, or the role of write_key in a fetch operation. It covers core functionality but not edge cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by explaining the purpose of depth and include_ancestors, including default values and meaning of deduced data (e.g., 'chain to the page root'). This goes beyond the schema's plain field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Fetch a block by its UID' with optional children/ancestors, which is a specific verb+resource combination. It distinguishes from sibling tools like roam_fetch_page_by_title and roam_fetch_page_full_view by focusing on blocks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor any when-not-to-use conditions. Sibling tool names suggest differentiation, but the description itself lacks explicit usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/2b3pro/roam-research-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server