# get_git_diff

Get the full unified diff between two refs (default: HEAD~1..HEAD). Returns diff text, file list, and addition/deletion counts. Use to review changes before logging them to the ledger.

Agent View of the PolicyLayer registry record for `get_git_diff`. HTML page: https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/get-git-diff

## Facts

- Tool: `get_git_diff`
- Server: Mcp Dev (`2loch-ness6/mempalace-mcp-dev`) — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev.md
- Homepage: https://github.com/2loch-ness6/mempalace-mcp-dev
- Risk category: Read (Low risk)
- Registry record: grade D, 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": "get_git_diff",
    "arguments": {}
  }
}
```

## Why get_git_diff is rated Low

This tool retrieves and displays git diff information between two references without making any changes to the codebase, files, or git state. It is purely informational and read-only, fitting the 'Read' category for retrieval/query operations with no side effects.

From the tool's own definition: "Tool description states it 'Get[s] the full unified diff' and 'Returns diff text, file list, and addition/deletion counts.' The phrase 'Use to review changes before logging' indicates this is for inspection/querying purposes only."

## Use case

AI agents call get_git_diff to retrieve information from Mcp Dev 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 Mcp Dev:

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

## Other tools on Mcp Dev (18)

- `run_tests` — Execute — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/run-tests.md
- `run_typecheck` — Execute — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/run-typecheck.md
- `get_all_changes` — Read — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/get-all-changes.md
- `get_branch_context` — Read — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/get-branch-context.md
- `get_changed_files` — Read — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/get-changed-files.md
- `get_file_ledger` — Read — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/get-file-ledger.md
- `get_session_changes` — Read — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/get-session-changes.md
- `get_track_index` — Read — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/get-track-index.md
- `get_track_plan` — Read — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/get-track-plan.md
- `get_track_spec` — Read — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/get-track-spec.md
- `list_tracks` — Read — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/list-tracks.md
- `search_code` — Read — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/search-code.md
- `create_track` — Write — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/create-track.md
- `log_change` — Write — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/log-change.md
- `mine_changed_files` — Write — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/mine-changed-files.md
- `update_track_index` — Write — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/update-track-index.md
- `update_track_plan` — Write — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/update-track-plan.md
- `update_track_spec` — Write — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/update-track-spec.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=2loch-ness6-mempalace-mcp-dev · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/2loch-ness6-mempalace-mcp-dev
