Skip to main content
Glama

roam_import_markdown

Import nested markdown into Roam under a specific block. Locate parent by UID or exact string; missing parent blocks are created. Returns the created nested block structure.

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 under the parent ("first" or "last"). Defaults to "first".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.
Behavior5/5

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

Despite no annotations, the description discloses key behaviors: creation of blocks if parent_string not found, verification by fetching full structure after import (which impacts rate limits), and the return of a nested structure. This fully informs the agent of side effects and performance considerations.

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?

Description is concise with three short paragraphs, using bold for the API usage note and important prerequisite. Every sentence adds value: core function, alternative suggestion, prerequisite. No wasted text.

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?

Given the complexity of importing markdown with parent location and creation, the description is complete: covers location methods, creation, verification, alternative tool, and prerequisite. No output schema needed as return is described.

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% with detailed parameter descriptions. The description adds workflow semantics: explains the two-location method (UID vs string), creation behavior of parent_string, and ordering default. This enhances understanding beyond the schema, earning a 4.

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's function: 'Import nested markdown content into Roam under a specific block.' It distinguishes from sibling roam_process_batch_actions by suggesting that alternative for large imports. The use of UID vs string matching is explained.

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?

Explicit usage guidance: suggests using roam_process_batch_actions for large imports or rate limit concerns. Also instructs to load the 'Roam Markdown Cheatsheet' resource before use. Provides clear context on when to prefer UID vs string matching.

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