# read_file

Read the contents of a file within the project directory.

Agent View of the PolicyLayer registry record for `read_file`. HTML page: https://policylayer.com/tools/54yyyu-code-mcp/read-file

## Facts

- Tool: `read_file`
- Server: Code (`54yyyu/code-mcp`) — https://policylayer.com/tools/54yyyu-code-mcp.md
- Homepage: https://github.com/54yyyu/code-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 data without side effects, aligning with the Read category definition. The low severity reflects that data retrieval alone poses minimal risk compared to write, execute, or destructive operations. High confidence is warranted due to explicit naming and clear functional description.

From the tool's own definition: "Tool name is 'read_file' and description states 'Read the contents of a file within the project directory.' The verb 'read' and the explicit statement of reading file contents with no modification capability clearly indicate a read-only operation."

## Use case

AI agents call read_file to retrieve information from Code 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 Code:

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

## Other tools on Code (8)

- `delete_path` — Destructive — https://policylayer.com/tools/54yyyu-code-mcp/delete-path.md
- `git_operation` — Execute — https://policylayer.com/tools/54yyyu-code-mcp/git-operation.md
- `run_command` — Execute — https://policylayer.com/tools/54yyyu-code-mcp/run-command.md
- `list_directory` — Read — https://policylayer.com/tools/54yyyu-code-mcp/list-directory.md
- `create_directory` — Write — https://policylayer.com/tools/54yyyu-code-mcp/create-directory.md
- `edit_block` — Write — https://policylayer.com/tools/54yyyu-code-mcp/edit-block.md
- `edit_file` — Write — https://policylayer.com/tools/54yyyu-code-mcp/edit-file.md
- `smart_edit` — Write — https://policylayer.com/tools/54yyyu-code-mcp/smart-edit.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=54yyyu-code-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/54yyyu-code-mcp
