# save_document

Writes the current editor content back to the file on disk.

Agent View of the PolicyLayer registry record for `save_document`. HTML page: https://policylayer.com/tools/0xmd/save-document

## Facts

- Tool: `save_document`
- Server: 0xMD (`0xstillb/0xMD`) — https://policylayer.com/tools/0xmd.md
- Homepage: https://github.com/0xstillb/0xMD
- Risk category: Write (Medium risk)
- Registry record: grade B, 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": "save_document",
    "arguments": {}
  }
}
```

## Why save_document is rated Medium

An AI agent can call save_document faster than any human can review: one bad instruction and it creates or modifies resources in 0xMD by the hundred, each call as confident as the last.

## Use case

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

## Recommended policy (PolicyLayer)

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

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

## Other tools on 0xMD (19)

- `check_updates` — Read — https://policylayer.com/tools/0xmd/check-updates.md
- `get_app_info` — Read — https://policylayer.com/tools/0xmd/get-app-info.md
- `get_outline` — Read — https://policylayer.com/tools/0xmd/get-outline.md
- `get_settings` — Read — https://policylayer.com/tools/0xmd/get-settings.md
- `list_documents` — Read — https://policylayer.com/tools/0xmd/list-documents.md
- `read_document` — Read — https://policylayer.com/tools/0xmd/read-document.md
- `read_file` — Read — https://policylayer.com/tools/0xmd/read-file.md
- `search_documents` — Read — https://policylayer.com/tools/0xmd/search-documents.md
- `toggle_sidebar` — Read — https://policylayer.com/tools/0xmd/toggle-sidebar.md
- `append_text` — Write — https://policylayer.com/tools/0xmd/append-text.md
- `configure_mcp` — Write — https://policylayer.com/tools/0xmd/configure-mcp.md
- `export_document` — Write — https://policylayer.com/tools/0xmd/export-document.md
- `insert_text` — Write — https://policylayer.com/tools/0xmd/insert-text.md
- `open_about` — Write — https://policylayer.com/tools/0xmd/open-about.md
- `open_document` — Write — https://policylayer.com/tools/0xmd/open-document.md
- `open_find` — Write — https://policylayer.com/tools/0xmd/open-find.md
- `open_preferences` — Write — https://policylayer.com/tools/0xmd/open-preferences.md
- `replace_selection` — Write — https://policylayer.com/tools/0xmd/replace-selection.md
- `set_theme` — Write — https://policylayer.com/tools/0xmd/set-theme.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=0xmd · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/0xmd
