# git_diff

Show Git diff for working tree or staged changes.

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

## Facts

- Tool: `git_diff`
- 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": "git_diff",
    "arguments": {}
  }
}
```

## Why git_diff is rated Low

git_diff is a read-only operation that displays differences between Git revisions without creating, modifying, deleting, or executing anything. It retrieves and presents existing version control metadata. The tool operates within a sandboxed terminal environment with multi-layer risk analysis, further reducing risk. Severity is low because the output is informational only and cannot alter system state or data.

From the tool's own definition: "Tool name 'git_diff' and description 'Show Git diff for working tree or staged changes' indicate pure data retrieval with no modifications or side effects."

## Use case

AI agents call git_diff 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": {
    "git_diff": {}
  }
}
```

## 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_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
- `read_file` — Read — https://policylayer.com/tools/7majesty-m-terminal-guardian-mcp/read-file.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
