Skip to main content
Glama

roam_search_by_text

Search for blocks containing specific text across all pages or within a given page. Optionally search page titles by namespace prefix for page discovery.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text to search for. When scope is "page_titles", this is the namespace prefix (trailing slash optional).
scopeNoSearch scope: "blocks" for block content (default), "page_titles" for page title namespace prefix matching.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".
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".
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.
offsetNoOptional: The number of results to skip before returning matches. Useful for pagination. Defaults to 0.
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 the burden. It explains pagination, scope behavior, and case-sensitivity, but lacks details on rate limits, authentication, error handling, or return format.

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, front-loaded with core purpose, no wasted words. Efficient and scannable.

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

Completeness2/5

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

Without an output schema, the description should specify the return format (e.g., block UIDs, texts). It does not, leaving a significant gap for an agent to understand what the response looks like.

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 coverage is 100%, so baseline is 3. The description adds value by explaining how scope affects search behavior and pagination, but most parameters are already well-described in the schema.

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 the tool searches for blocks containing text, with a special scope for page titles ('page_titles'). It distinguishes from siblings like roam_search_block_refs and roam_search_by_date by focusing on text content and namespace prefix matching.

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 explains when to use the 'page_titles' scope and mentions pagination. However, it does not explicitly state when not to use this tool (e.g., for date-based search), though sibling names provide 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