# roam_update_page_markdown

Update an existing page with new markdown content using smart diff. Preserves block UIDs where possible and generates minimal changes. This is ideal for:\n- Syncing external markdown files to Roam\n- AI-assisted content updates that preserve references\n- Batch content modifications without losing block references\n\nHow it works:\n1. Fetches existing page blocks\n2. Matches new content to existing blocks by text similarity\n3. Generates minimal create/update/move/delete operations\n4. Preserves UIDs for matched blocks (keeping references intact)\n\nIMPORTANT: Before using this tool, ensure that you have loaded into context the \

Agent View of the PolicyLayer registry record for `roam_update_page_markdown`. HTML page: https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-update-page-markdown

## Facts

- Tool: `roam_update_page_markdown`
- Server: Roam Research (`2b3pro/roam-research-mcp`) — https://policylayer.com/tools/2b3pro-roam-research-mcp.md
- Homepage: https://github.com/2b3pro/roam-research-mcp
- Risk category: Write (Medium risk)
- Registry record: grade D, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "roam_update_page_markdown",
    "arguments": {}
  }
}
```

## Why roam_update_page_markdown is rated Medium

This tool creates or modifies data reversibly by updating page content in Roam Research. While it performs delete operations as part of its diff logic, the primary function is content modification (Write category). The high severity reflects the risk that an AI agent could maliciously overwrite significant portions of a user's knowledge graph.

From the tool's own definition: "Tool description explicitly states it 'Update[s] an existing page' and 'Batch content modifications' to Roam Research pages."

## Use case

AI agents use roam_update_page_markdown to create or update resources in Roam Research, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Roam Research environment.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Roam Research:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "roam_update_page_markdown": {
      "limits": [
        {
          "counter": "roam_update_page_markdown_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Roam Research (21)

- `roam_datomic_query` — Execute — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-datomic-query.md
- `roam_fetch_block` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-fetch-block.md
- `roam_fetch_page_by_title` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-fetch-page-by-title.md
- `roam_fetch_page_full_view` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-fetch-page-full-view.md
- `roam_find_pages_modified_today` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-find-pages-modified-today.md
- `roam_get_subpages` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-get-subpages.md
- `roam_markdown_cheatsheet` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-markdown-cheatsheet.md
- `roam_recall` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-recall.md
- `roam_search_block_refs` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-search-block-refs.md
- `roam_search_by_date` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-search-by-date.md
- `roam_search_by_status` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-search-by-status.md
- `roam_search_by_text` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-search-by-text.md
- `roam_search_for_tag` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-search-for-tag.md
- `roam_search_hierarchy` — Read — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-search-hierarchy.md
- `roam_add_todo` — Write — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-add-todo.md
- `roam_create_outline` — Write — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-create-outline.md
- `roam_create_page` — Write — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-create-page.md
- `roam_import_markdown` — Write — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-import-markdown.md
- `roam_move_block` — Write — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-move-block.md
- `roam_remember` — Write — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-remember.md
- `roam_rename_page` — Write — https://policylayer.com/tools/2b3pro-roam-research-mcp/roam-rename-page.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=2b3pro-roam-research-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/2b3pro-roam-research-mcp
