# get_branch_context

Get the current git branch, HEAD SHA, and recent commits. Always call this first to anchor your context to the correct branch.

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

## Facts

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

## Why get_branch_context is rated Low

This tool only queries version control metadata without creating, modifying, executing, or deleting anything. It retrieves information to establish context, which is a safe read operation with minimal security risk. The blast radius of misuse is negligible since an agent cannot cause harm by reading commit history.

From the tool's own definition: "Tool retrieves git branch information, HEAD SHA, and recent commits with no modification capability. Description states 'Get the current git branch, HEAD SHA, and recent commits' indicating read-only operations."

## Use case

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

## 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_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_git_diff` — Read — https://policylayer.com/tools/2loch-ness6-mempalace-mcp-dev/get-git-diff.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
