Skip to main content
Glama

roam_search_hierarchy

Read-onlyIdempotent

Search up or down the block hierarchy to locate parent or child blocks from a given block.

Instructions

Search for parent or child blocks in the block hierarchy. Can search up or down the hierarchy from a given block.

IMPORTANT: call roam_get_guidelines for this graph once per session before using this tool, reads included — conventions change how results are read, not just written.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graphNoTarget graph key from ROAM_GRAPHS config. Defaults to ROAM_DEFAULT_GRAPH. Only needed in multi-graph mode.
child_uidNoOptional: UID of the block to find parents of
max_depthNoOptional: How many levels deep to search (default: 1)
write_keyNoWrite confirmation key. Required for write operations on non-default graphs when write_key is configured.
parent_uidNoOptional: UID of the block to find children of
page_title_uidNoOptional: Title or UID of the page to search in (UID is preferred for accuracy).
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering safety. The description adds valuable behavioral context: the ability to search both up and down, and the critical caveat that per-graph conventions affect how results are read. This goes beyond the annotations without contradicting them.

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?

The description is two short paragraphs: the first front-loads the core purpose, the second delivers an essential prerequisite note. No filler words, every sentence earns its place, and the structure is easy to scan.

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

Completeness4/5

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

Given the tool's moderate complexity (6 optional params, no output schema), the description covers the essential behavioral scope and a critical prerequisite. It does not explain edge cases like providing both parent_uid and child_uid, or default behavior when neither is given, but the annotations and schema fill many gaps, making the description reasonably complete for a read-only search tool.

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

Parameters3/5

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

The input schema provides 100% coverage with descriptions for all six parameters, so the baseline is 3. The description adds minimal extra meaning beyond the schema, mainly correlating 'from a given block' with parent/child UID parameters. It does not elaborate on parameter interactions (e.g., mutual exclusivity), but the schema already handles the basics.

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 states a specific action ('Search for parent or child blocks') on a specific resource ('block hierarchy'), and clarifies the directional capability ('up or down') from a given block. This clearly distinguishes it from sibling search tools like roam_search_by_text or roam_search_by_status, which operate on content or status rather than hierarchy.

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

Usage Guidelines4/5

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

The description makes it obvious when to use this tool: when you need to traverse parent/child relationships in the block hierarchy. It also provides a mandatory prerequisite instruction to call roam_get_guidelines once per session, which is concrete usage guidance. However, it does not explicitly mention alternatives or when not to use this tool, so it falls short of the strongest 'when-not' clarity.

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