# fs_apply_diff

A write tool on the Container-MCP MCP server.

Agent View of the PolicyLayer registry record for `fs_apply_diff`. HTML page: https://policylayer.com/tools/54rt1n-container-mcp/fs-apply-diff

## Facts

- Tool: `fs_apply_diff`
- Server: Container-MCP (`54rt1n/container-mcp`) — https://policylayer.com/tools/54rt1n-container-mcp.md
- Homepage: https://github.com/54rt1n/container-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, 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": "fs_apply_diff",
    "arguments": {}
  }
}
```

## Why fs_apply_diff is rated Medium

The tool modifies files by applying diffs—a reversible write operation. While diffs can theoretically delete content, without explicit description indicating irreversible destruction (unlike fs_delete), it is classified as Write. Severity is high because unvetted diff application could corrupt critical files or introduce malicious code into the system.

From the tool's own definition: "Tool name 'fs_apply_diff' indicates application of filesystem diffs/patches. Sibling tools include fs_read, fs_write, fs_delete, fs_move, confirming filesystem manipulation context. Description is empty, limiting specificity."

## Use case

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

## Recommended policy (PolicyLayer)

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

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

## Other tools on Container-MCP (26)

- `fs_delete` — Destructive — https://policylayer.com/tools/54rt1n-container-mcp/fs-delete.md
- `list_delete` — Destructive — https://policylayer.com/tools/54rt1n-container-mcp/list-delete.md
- `system_run_command` — Execute — https://policylayer.com/tools/54rt1n-container-mcp/system-run-command.md
- `system_run_python` — Execute — https://policylayer.com/tools/54rt1n-container-mcp/system-run-python.md
- `web_browse` — Execute — https://policylayer.com/tools/54rt1n-container-mcp/web-browse.md
- `fs_list` — Read — https://policylayer.com/tools/54rt1n-container-mcp/fs-list.md
- `fs_read` — Read — https://policylayer.com/tools/54rt1n-container-mcp/fs-read.md
- `health_check` — Read — https://policylayer.com/tools/54rt1n-container-mcp/health-check.md
- `kb_read` — Read — https://policylayer.com/tools/54rt1n-container-mcp/kb-read.md
- `kb_search` — Read — https://policylayer.com/tools/54rt1n-container-mcp/kb-search.md
- `list_get` — Read — https://policylayer.com/tools/54rt1n-container-mcp/list-get.md
- `list_search` — Read — https://policylayer.com/tools/54rt1n-container-mcp/list-search.md
- `market_query` — Read — https://policylayer.com/tools/54rt1n-container-mcp/market-query.md
- `rss_fetch` — Read — https://policylayer.com/tools/54rt1n-container-mcp/rss-fetch.md
- `system_env_var` — Read — https://policylayer.com/tools/54rt1n-container-mcp/system-env-var.md
- `web_scrape` — Read — https://policylayer.com/tools/54rt1n-container-mcp/web-scrape.md
- `web_search` — Read — https://policylayer.com/tools/54rt1n-container-mcp/web-search.md
- `fs_move` — Write — https://policylayer.com/tools/54rt1n-container-mcp/fs-move.md
- `fs_write` — Write — https://policylayer.com/tools/54rt1n-container-mcp/fs-write.md
- `kb_create_document` — Write — https://policylayer.com/tools/54rt1n-container-mcp/kb-create-document.md
- `kb_manage` — Write — https://policylayer.com/tools/54rt1n-container-mcp/kb-manage.md
- `kb_update_triples` — Write — https://policylayer.com/tools/54rt1n-container-mcp/kb-update-triples.md
- `kb_write_content` — Write — https://policylayer.com/tools/54rt1n-container-mcp/kb-write-content.md
- `list_create` — Write — https://policylayer.com/tools/54rt1n-container-mcp/list-create.md
- `list_modify` — Write — https://policylayer.com/tools/54rt1n-container-mcp/list-modify.md
- `list_update` — Write — https://policylayer.com/tools/54rt1n-container-mcp/list-update.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=54rt1n-container-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/54rt1n-container-mcp
