Get comprehensive repository statistics for a user within a time frame. Aggregates all activity metrics in a single call: PRs authored (with state breakdown: merged/open/closed), comments (total with review/issue breakdown), PR reviews (total with state breakdown: approved/changesRequested/commen...
AI agents call github.getUserRepoStats to retrieve information from GitHub MCP Server without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
This tool performs data retrieval and aggregation only. It queries existing GitHub activity data (PR counts, comment counts, review states, file change metrics) and returns statistics without creating, modifying, deleting, or executing any operations. The comprehensive nature of the aggregation does not elevate it beyond Read category.
From the tool's definition Tool retrieves and aggregates repository statistics including 'PRs authored', 'comments', 'PR reviews', and 'code changes' metrics.
Attacks that exploit this kind of access
Get comprehensive repository statistics for a user within a time frame. Aggregates all activity metrics in a single call: PRs authored (with state breakdown: merged/open/closed), comments (total with review/issue breakdown), PR reviews (total with state breakdown: approved/changesRequested/commented, plus unique PRs reviewed), and code changes (files changed, additions, deletions, net change). This is the most efficient tool for getting a complete overview of user activity in a repository. Combines data from multiple sources internally. Example use cases: - Get complete activity overview for performance reviews - Generate comprehensive developer metrics reports - Compare user activity across different repositories - Track overall contribution metrics in a single call Returns: Object with stats containing username, repo, timeRange, prs (count, merged, open, closed), comments (total, review, issue), reviews (total, totalPRsReviewed, approved, changesRequested, commented), codeChanges (filesChanged, additions, deletions, netChange). It is categorised as a Read tool in the GitHub MCP Server MCP Server, which means it retrieves data without modifying state.
Register the GitHub MCP Server MCP server in PolicyLayer and add a rule for github.getUserRepoStats: 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 GitHub MCP Server. Nothing to install.
github.getUserRepoStats is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the github.getUserRepoStats 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.
Set action: deny in the PolicyLayer policy for github.getUserRepoStats. 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.
github.getUserRepoStats is provided by the GitHub MCP Server MCP server (radireddy/github-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the 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 →