Skip to main content
Glama

roam_import_markdown

Import nested markdown content into Roam Research by adding it under a specific parent block, creating the parent if needed.

Instructions

Import nested markdown content into Roam under a specific block. Can locate the parent block by UID (preferred) or by exact string match within a specific page. If a parent_string is provided and the block does not exist, it will be created. Returns a nested structure of the created blocks. API Usage Note: This tool fetches the full nested structure after import for verification. For large imports or when rate limits are a concern, consider using roam_process_batch_actions with pre-structured actions instead. IMPORTANT: Before using this tool, ensure that you have loaded into context the 'Roam Markdown Cheatsheet' resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesNested markdown content to import
page_uidNoOptional: UID of the page containing the parent block (preferred for accuracy).
page_titleNoOptional: Title of the page containing the parent block (used if page_uid is not provided).
parent_uidNoOptional: UID of the parent block to add content under (preferred for accuracy).
parent_stringNoOptional: Exact string content of an existing parent block to add content under (used if parent_uid is not provided; requires page_uid or page_title). If the block does not exist, it will be created.
orderNoOptional: Where to add the content undeIs this tr the parent ("first" or "last")first
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.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: the tool creates blocks if they don't exist ('If a parent_string is provided and the block does not exist, it will be created'), returns verification data ('fetches the full nested structure after import for verification'), and mentions rate limits as a concern. However, it doesn't explicitly state whether this is a read-only or write operation, though 'import' implies mutation.

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

Conciseness4/5

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

The description is well-structured and front-loaded with the core functionality, followed by important notes. Each sentence adds value, such as API usage considerations and prerequisites. It could be slightly more concise by integrating some details, but overall it's efficient with minimal waste.

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 complexity (8 parameters, no annotations, no output schema), the description does a good job of covering essential context like behavior, alternatives, and prerequisites. It explains the return value ('Returns a nested structure of the created blocks') and operational notes. The main gap is the lack of explicit mutation disclosure, but it's largely complete for the tool's scope.

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%, so the schema already documents all 8 parameters thoroughly. The description adds some context (e.g., parent_uid is 'preferred for accuracy', parent_string behavior if block doesn't exist), but doesn't provide significant additional semantic meaning beyond what the schema offers. This meets the baseline for high schema coverage.

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 specific action ('Import nested markdown content') and target resource ('into Roam under a specific block'), distinguishing it from siblings like roam_create_page or roam_update_page_markdown. It specifies the import mechanism and the nested structure of the content, making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use alternatives (e.g., 'For large imports or when rate limits are a concern, consider using roam_process_batch_actions'), prerequisites ('ensure that you have loaded into context the 'Roam Markdown Cheatsheet' resource'), and context for parameter choices (e.g., parent_uid is 'preferred for accuracy'). This comprehensive guidance helps the agent select this tool appropriately.

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