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
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | Nested markdown content to import | |
| page_uid | No | Optional: UID of the page containing the parent block (preferred for accuracy). | |
| page_title | No | Optional: Title of the page containing the parent block (used if page_uid is not provided). | |
| parent_uid | No | Optional: UID of the parent block to add content under (preferred for accuracy). | |
| parent_string | No | Optional: 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. | |
| order | No | Optional: Where to add the content undeIs this tr the parent ("first" or "last") | first |
| graph | No | Target graph key from ROAM_GRAPHS config. Defaults to ROAM_DEFAULT_GRAPH. Only needed in multi-graph mode. | |
| write_key | No | Write confirmation key. Required for write operations on non-default graphs when write_key is configured. |