# read_file

Read the contents of a file within the workspace. Access is restricted to allowed paths and file size limits.

Agent View of the PolicyLayer registry record for `read_file`. HTML page: https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/read-file

## Facts

- Tool: `read_file`
- Server: Terminal Guardian (`7majesty-m/terminal-guardian-mcp`) — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp.md
- Homepage: https://github.com/7Majesty-M/terminal-guardian-mcp
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

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

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

## Why read_file is rated Low

This tool retrieves file contents without side effects. It is clearly a Read operation. Severity is low because file reading alone poses minimal risk in a sandboxed environment, though confidence is not perfect (0.95 rather than 1.0) because the actual risk depends on what files are in the 'allowed paths' list—if sensitive credentials or private keys are accessible, severity could increase, but based on the…

From the tool's own definition: "Tool name is 'read_file' and description states it 'Read[s] the contents of a file' with no mention of modification, deletion, or execution. Access restrictions and file size limits further indicate this is a bounded read operation."

## Use case

AI agents call read_file to retrieve information from Terminal Guardian without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Terminal Guardian:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "read_file": {}
  }
}
```

## Other tools on Terminal Guardian (24)

- `kill_process` — Destructive — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/kill-process.md
- `docker_exec` — Execute — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/docker-exec.md
- `ping` — Execute — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/ping.md
- `run_command` — Execute — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/run-command.md
- `ssh_exec` — Execute — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/ssh-exec.md
- `ssh_test` — Execute — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/ssh-test.md
- `hello` — Other — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/hello.md
- `analyze_command` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/analyze-command.md
- `dns_lookup` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/dns-lookup.md
- `docker_logs` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/docker-logs.md
- `docker_ps` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/docker-ps.md
- `docker_stats` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/docker-stats.md
- `get_env` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/get-env.md
- `git_diff` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/git-diff.md
- `git_log` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/git-log.md
- `git_status` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/git-status.md
- `git_suggest_commit` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/git-suggest-commit.md
- `http_request` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/http-request.md
- `list_files` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/list-files.md
- `list_processes` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/list-processes.md
- `list_templates` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/list-templates.md
- `search_files` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/search-files.md
- `ssh_list_profiles` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/ssh-list-profiles.md
- `apply_template` — Write — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/apply-template.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=7majesty-m-terminal-guardian-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/7majesty-m-terminal-guardian-mcp
