Skip to main content
Glama

roam_update_page_markdown

Update existing Roam pages with new markdown content using smart diff, preserving block UIDs and minimizing changes. Ideal for syncing external files, AI-assisted updates, and batch modifications without losing references.

Instructions

Update an existing page with new markdown content using smart diff. Preserves block UIDs where possible and generates minimal changes. This is ideal for:

  • Syncing external markdown files to Roam

  • AI-assisted content updates that preserve references

  • Batch content modifications without losing block references

How it works:

  1. Fetches existing page blocks

  2. Matches new content to existing blocks by text similarity

  3. Generates minimal create/update/move/delete operations

  4. Preserves UIDs for matched blocks (keeping references intact)

IMPORTANT: Before using this tool, ensure that you have loaded into context the 'Roam Markdown Cheatsheet' resource.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the page to update
markdownYesNew GFM markdown content for the page
dry_runNoIf true, returns the planned actions without executing them. Useful for previewing changes.
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?

The description explains the algorithm in 4 steps (fetch, match, generate ops, preserve UIDs) and states that it generates minimal changes and preserves references. Since no annotations are provided, the description carries the full burden. It does not disclose error handling or rollback behavior, but the core behavioral traits are well-covered.

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?

The description is well-structured with a clear summary, bullet-pointed use cases, and a numbered algorithm. It is concise (no unnecessary words) and front-loads the core purpose. Every sentence adds value.

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

Completeness3/5

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

The description explains the process thoroughly but does not document the return value or output schema. Given the complexity and the lack of output schema, the agent might need to know what the tool returns (e.g., success status or diff preview). The prerequisite warning is helpful but does not fully compensate for the missing output documentation.

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 description coverage is 100%, so the baseline is 3. The description adds value by explaining how dry_run works ('returns the planned actions without executing them') and how graph and write_key are used in multi-graph mode. This extra context justifies 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 'Update an existing page with new markdown content using smart diff' which is a specific verb+resource combination. It distinguishes from siblings like roam_create_page (create) and roam_import_markdown (import) by emphasizing preservation of block UIDs and minimal changes.

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 provides explicit use cases ('Syncing external markdown files to Roam', 'AI-assisted content updates that preserve references', 'Batch content modifications without losing block references') and includes a critical prerequisite ('ensure that you have loaded into context the 'Roam Markdown Cheatsheet' resource'). However, it does not explicitly list when not to use this tool or mention alternatives like roam_import_markdown for fresh imports.

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