Skip to main content
Glama

roam_update_page_markdown

Update Roam Research pages with new markdown content while preserving block references and minimizing changes through smart diff matching.

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?

With no annotations provided, the description carries full burden and does well by explaining the smart diff mechanism (preserves block UIDs, generates minimal changes) and operational steps. It mentions the dry_run parameter for previewing changes, which is useful behavioral context. However, it doesn't cover error conditions, rate limits, or authentication needs beyond the write_key parameter.

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 with a clear opening sentence, bullet points for use cases, numbered steps for mechanics, and an important note. It's appropriately sized for a complex tool, though the 'How it works' section could be slightly condensed as it partially reiterates the opening.

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 a mutation tool with no annotations and no output schema, the description does a good job covering purpose, usage, and behavior. It explains the smart diff approach and prerequisites. However, it lacks details on return values or error handling, which would be helpful given the absence of an output schema.

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 5 parameters thoroughly. The description adds minimal value beyond the schema—it mentions 'smart diff' which relates to the markdown parameter, and 'dry_run' for previewing, but doesn't provide additional syntax or format details. Baseline 3 is appropriate given 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 ('Update an existing page with new markdown content using smart diff') and distinguishes it from siblings like roam_create_page (creates new) and roam_import_markdown (imports rather than updates existing). It specifies the resource ('existing page') and method ('smart diff'), 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 this tool ('ideal for syncing external markdown files, AI-assisted content updates, batch modifications') and includes a critical prerequisite ('ensure you have loaded the Roam Markdown Cheatsheet resource'). It implicitly distinguishes from alternatives like roam_create_page for new pages, though it doesn't explicitly name them.

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