# container_exec

Run a command in a container and return the results from stdout. If necessary, set a timeout. To debug, stream back standard error. If you

Agent View of the PolicyLayer registry record for `container_exec`. HTML page: https://policylayer.com/tools/cloudflare/container-exec

## Facts

- Tool: `container_exec`
- Server: Cloudflare (`https://builds.mcp.cloudflare.com/sse`) — https://policylayer.com/tools/cloudflare.md
- Homepage: https://github.com/cloudflare/mcp-server-cloudflare
- Risk category: Execute (High risk)
- Registry record: grade D, identity verified
- Server auth posture: gated
- 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": "container_exec",
    "arguments": {}
  }
}
```

## Why container_exec is rated High

The tool permits running arbitrary commands in a container, which can have unpredictable and severe side effects depending on what commands an AI agent chooses to execute. This is classic Execute category behavior. The critical severity reflects the ability to invoke any command (potentially destructive, exfiltrating data, or launching further attacks) without inherent safeguards mentioned in the description.

From the tool's own definition: "Tool description states 'Run a command in a container and return the results from stdout.' This directly indicates execution of arbitrary commands within a container environment."

## Use case

AI agents invoke container_exec to trigger actions in Cloudflare. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

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

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "container_exec": {
      "limits": [
        {
          "counter": "container_exec_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Cloudflare (91)

- `container_file_delete` — Destructive — https://policylayer.com/tools/cloudflare/container-file-delete.md
- `container_initialize` — Execute — https://policylayer.com/tools/cloudflare/container-initialize.md
- `dex_create_remote_pcap` — Execute — https://policylayer.com/tools/cloudflare/dex-create-remote-pcap.md
- `dex_create_remote_warp_diag` — Execute — https://policylayer.com/tools/cloudflare/dex-create-remote-warp-diag.md
- `container_file_read` — Read — https://policylayer.com/tools/cloudflare/container-file-read.md
- `container_files_list` — Read — https://policylayer.com/tools/cloudflare/container-files-list.md
- `container_ping` — Read — https://policylayer.com/tools/cloudflare/container-ping.md
- `dex_analyze_warp_diag` — Read — https://policylayer.com/tools/cloudflare/dex-analyze-warp-diag.md
- `dex_explore_remote_warp_diag_output` — Read — https://policylayer.com/tools/cloudflare/dex-explore-remote-warp-diag-output.md
- `dex_fleet_status_live` — Read — https://policylayer.com/tools/cloudflare/dex-fleet-status-live.md
- `dex_fleet_status_logs` — Read — https://policylayer.com/tools/cloudflare/dex-fleet-status-logs.md
- `dex_fleet_status_over_time` — Read — https://policylayer.com/tools/cloudflare/dex-fleet-status-over-time.md
- `dex_http_test_details` — Read — https://policylayer.com/tools/cloudflare/dex-http-test-details.md
- `dex_list_colos` — Read — https://policylayer.com/tools/cloudflare/dex-list-colos.md
- `dex_list_remote_capture_eligible_devices` — Read — https://policylayer.com/tools/cloudflare/dex-list-remote-capture-eligible-devices.md
- `dex_list_remote_captures` — Read — https://policylayer.com/tools/cloudflare/dex-list-remote-captures.md
- `dex_list_remote_warp_diag_contents` — Read — https://policylayer.com/tools/cloudflare/dex-list-remote-warp-diag-contents.md
- `dex_list_tests` — Read — https://policylayer.com/tools/cloudflare/dex-list-tests.md
- `dex_list_warp_change_events` — Read — https://policylayer.com/tools/cloudflare/dex-list-warp-change-events.md
- `dex_test_statistics` — Read — https://policylayer.com/tools/cloudflare/dex-test-statistics.md
- `dex_traceroute_test_details` — Read — https://policylayer.com/tools/cloudflare/dex-traceroute-test-details.md
- `dex_traceroute_test_network_path` — Read — https://policylayer.com/tools/cloudflare/dex-traceroute-test-network-path.md
- `dex_traceroute_test_result_network_path` — Read — https://policylayer.com/tools/cloudflare/dex-traceroute-test-result-network-path.md
- `dns_report` — Read — https://policylayer.com/tools/cloudflare/dns-report.md
- `get_ai_data` — Read — https://policylayer.com/tools/cloudflare/get-ai-data.md
- `get_annotations` — Read — https://policylayer.com/tools/cloudflare/get-annotations.md
- `get_as_details` — Read — https://policylayer.com/tools/cloudflare/get-as-details.md
- `get_as_relationships` — Read — https://policylayer.com/tools/cloudflare/get-as-relationships.md
- `get_as_set` — Read — https://policylayer.com/tools/cloudflare/get-as-set.md
- `get_as112_data` — Read — https://policylayer.com/tools/cloudflare/get-as112-data.md
- …and 61 more: https://policylayer.com/tools/cloudflare.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=cloudflare · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/cloudflare
