# workspace_write_file

Write content to a file inside the container workspace (overwrites if exists).

Agent View of the PolicyLayer registry record for `workspace_write_file`. HTML page: https://policylayer.com/tools/0xmihirk-hercules-mcp/workspace-write-file

## Facts

- Tool: `workspace_write_file`
- Server: Hercules MCP (`0xmihirk/hercules-mcp`) — https://policylayer.com/tools/0xmihirk-hercules-mcp.md
- Homepage: https://github.com/0xMihirK/hercules-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": "workspace_write_file",
    "arguments": {}
  }
}
```

## Why workspace_write_file is rated Medium

This tool creates or modifies files within a containerized penetration testing environment. While it modifies data (Write category), the severity is high rather than critical because: (1) it operates within an isolated container rather than the host system; (2) the blast radius is limited to the workspace scope; (3) file overwrites are reversible within the container lifecycle.

From the tool's own definition: "Tool description explicitly states 'Write content to a file inside the container workspace (overwrites if exists).' The verb 'write' and mention of overwriting indicate file modification capability."

## Use case

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

## Recommended policy (PolicyLayer)

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

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

## Other tools on Hercules MCP (44)

- `browser_act` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-act.md
- `browser_cmd` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-cmd.md
- `browser_eval` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-eval.md
- `browser_open` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-open.md
- `browser_session` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-session.md
- `browser_wait` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-wait.md
- `bruteforce_hydra` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/bruteforce-hydra.md
- `crack_john` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/crack-john.md
- `ctf_binwalk` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/ctf-binwalk.md
- `ctf_steghide` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/ctf-steghide.md
- `fuzz_dirs` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/fuzz-dirs.md
- `metasploit_generate_payload` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-generate-payload.md
- `metasploit_manage` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-manage.md
- `metasploit_run_module` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-run-module.md
- `metasploit_start_listener` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-start-listener.md
- `ncat` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/ncat.md
- `network_curl` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/network-curl.md
- `network_hping3` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/network-hping3.md
- `nmap_run_nse_script` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nmap-run-nse-script.md
- `nmap_scan` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nmap-scan.md
- `nmap_write_nse_script` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nmap-write-nse-script.md
- `nuclei_run` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nuclei-run.md
- `recon_amass` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/recon-amass.md
- `recon_dns` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/recon-dns.md
- `searchsploit` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/searchsploit.md
- `shell_exec` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/shell-exec.md
- `shell_exec_background` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/shell-exec-background.md
- `shell_kill_job` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/shell-kill-job.md
- `sqlmap_run` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/sqlmap-run.md
- `system_start_new_session` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/system-start-new-session.md
- …and 14 more: https://policylayer.com/tools/0xmihirk-hercules-mcp.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=0xmihirk-hercules-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/0xmihirk-hercules-mcp
