Skip to main content
Glama

roam_import_markdown

Import nested Markdown into Roam under a target block, locating parents by UID or exact string match and creating the parent if it doesn't exist.

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: call roam_get_guidelines for this graph once per session, and load the Roam Markdown Cheatsheet, before using this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graphNoTarget graph key from ROAM_GRAPHS config. Defaults to ROAM_DEFAULT_GRAPH. Only needed in multi-graph mode.
orderNoOptional: Where to add the content under the parent ("first" or "last"). Defaults to "first".first
contentYesNested markdown content to import
page_uidNoOptional: UID of the page containing the parent block (preferred for accuracy).
write_keyNoWrite confirmation key. Required for write operations on non-default graphs when write_key is configured.
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYes
page_uidYes
parent_uidYes
created_blocksYesThe created block tree. Objects, not UID strings.
Behavior4/5

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

Beyond the annotations (write, non-destructive), the description discloses two important behaviors: it auto-creates a missing parent block when `parent_string` is used, and it fetches the full nested structure post-import for verification, adding rate-limit context. This is valuable extra transparency, though it does not detail all side effects (e.g., how existing content is affected).

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 appropriately sized and front-loaded with the main purpose. It uses a clear structure with an API usage note and an important prerequisite. While slightly longer due to the usage warnings, every sentence serves a purpose and there is no fluff.

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?

For an 8-parameter tool with a full output schema, the description covers the core behavior, parameter lookup logic, rate-limit implications, and required preconditions. It does not explicitly cover error cases or edge conditions, but the schema and output schema fill many gaps, making it reasonably complete.

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 meaning by explaining the preference order (parent_uid/page_uid over parent_string) and clarifying that `parent_string` will create a new block if it doesn't exist. This goes beyond the schema definitions and helps agents choose the right parameters.

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 'Import nested markdown content into Roam under a specific block' with a specific verb, resource, and location. It distinguishes itself from siblings by detailing how the parent block is located (UID or exact string match) and refers to the alternative tool `roam_process_batch_actions` for large imports.

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?

It provides explicit usage guidance: UID is preferred over string match, and it names an alternative for large imports or rate-limit concerns. It also instructs to call `roam_get_guidelines` and load the Markdown Cheatsheet before use, covering prerequisites and when-not-to-use scenarios.

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