Skip to main content
Glama

roam_search_by_text

Read-onlyIdempotent

Find blocks containing specific text across your Roam Research graph or within a selected page. Use page title namespace search and pagination to locate content.

Instructions

Search for blocks containing specific text across all pages or within a specific page. Use scope: "page_titles" to search for pages by namespace prefix (e.g., "Convention/" finds all pages starting with that prefix). This tool supports pagination via the limit and offset parameters.

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
textYesThe text to search for. When scope is "page_titles", this is the namespace prefix (trailing slash optional).
graphNoTarget graph key from ROAM_GRAPHS config. Defaults to ROAM_DEFAULT_GRAPH. Only needed in multi-graph mode.
limitNoOptional: The maximum number of results to return. Defaults to 50. Use -1 for no limit, but be aware that very large results sets can impact performance.
scopeNoSearch scope: "blocks" for block content (default), "page_titles" for page title namespace prefix matching.blocks
offsetNoOptional: The number of results to skip before returning matches. Useful for pagination. Defaults to 0.
write_keyNoWrite confirmation key. Required for write operations on non-default graphs when write_key is configured.
case_sensitiveNoOptional: Whether the search should be case-sensitive. If false, it will search for the provided text, capitalized versions, and first word capitalized versions. Only used when scope is "blocks".
page_title_uidNoOptional: Title or UID of the page to search in (UID is preferred for accuracy). If not provided, searches across all pages. Only used when scope is "blocks".
Behavior4/5

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

Annotations already declare the tool read-only, idempotent, and non-destructive, lowering the bar. The description adds a meaningful behavioral note: graph conventions affect how results are read, not just written, implying results can vary between graphs. It also mentions pagination support, though the schema already documents limit/offset.

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 compact: two sentences covering core functionality and a one-sentence important note. It front-loads the primary purpose, explains the alternate scope, then delivers the essential prerequisite. Every sentence earns its place without fluff or redundancy.

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

Completeness5/5

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

With 8 parameters but only 1 required, full schema coverage, and complete annotations, the description adds the crucial missing context: a session-level prerequisite to call roam_get_guidelines because conventions affect reads. The namespace prefix example clarifies a non-obvious mode. No output schema exists, but the return value for a block/page search tool is self-evident.

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?

Schema description coverage is 100% for all 8 parameters, so the baseline is 3. The description's mentions of `scope: 'page_titles'`, the namespace prefix example, and pagination via `limit`/`offset` all reinforce but do not add substantive meaning beyond what the parameter descriptions already provide.

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 opens with 'Search for blocks containing specific text across all pages or within a specific page,' a specific verb and resource. It clearly distinguishes the free-text blocks search from the namespace-prefix page_titles mode, and the availability of these two modes helps set it apart from sibling search tools like roam_search_for_tag or roam_search_by_status.

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 gives clear usage context: it tells the agent to use scope 'page_titles' for namespace prefix searches and includes an 'IMPORTANT' instruction to call roam_get_guidelines once per session because conventions change how results are read. It lacks explicit exclusions or direct references to sibling alternatives, but the context is strong enough to guide appropriate selection.

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