analyze_git_changes

Analyze the current git repository state and changes. Provides context for generating commit messages and PR content. Returns: - Repository info (branch, base branch) - Ticket extracted from branch name - Branch prefix (task/, bug/, feature/, etc.) - Staged changes with file list and suggested co...

Server Pr Narrator mhaviv/pr-narrator-mcp
Category Read
Risk class Low
Parameters 00 required

What analyze_git_changes does on Pr Narrator

AI agents call analyze_git_changes to retrieve information from Pr Narrator without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

Why analyze_git_changes needs a policy

This tool exclusively queries and retrieves git repository state and metadata without side effects. It gathers information to inform other tools but does not create, modify, delete, or execute anything. This is a pure Read operation with minimal risk—an AI agent cannot cause harm by misusing it beyond potentially analyzing unintended repositories.

From the tool's definition Tool provides 'context for generating commit messages and PR content' by analyzing and returning repository information, staged changes, commit history, and file status. Key verbs indicate retrieval: 'Analyze', 'Provides', 'Returns'.

Questions about analyze_git_changes

What does the analyze_git_changes tool do? +

Analyze the current git repository state and changes. Provides context for generating commit messages and PR content. Returns: - Repository info (branch, base branch) - Ticket extracted from branch name - Branch prefix (task/, bug/, feature/, etc.) - Staged changes with file list and suggested commit type/scope - Branch changes since base branch with commit history - Working tree status (unstaged modified, untracked, and deleted files) - All tickets found in branch name and commits Use this before generating commits or PRs to understand the changes. It is categorised as a Read tool in the Pr Narrator MCP Server, which means it retrieves data without modifying state.

How do I enforce a policy on analyze_git_changes? +

Register the Pr Narrator MCP server in PolicyLayer and add a rule for analyze_git_changes: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Pr Narrator. Nothing to install.

What risk level is analyze_git_changes? +

analyze_git_changes is a Read tool with low risk. Read-only tools are generally safe to allow by default.

Can I rate-limit analyze_git_changes? +

Yes. Add a rate_limit block to the analyze_git_changes rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block analyze_git_changes completely? +

Set action: deny in the PolicyLayer policy for analyze_git_changes. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides analyze_git_changes? +

analyze_git_changes is provided by the Pr Narrator MCP server (mhaviv/pr-narrator-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.