Build an MCP server that analyzes a local Git repository and identifies risky commits. Provide tools to fetch recent commits with diff stat…
Server has 9 tools with schemas and descriptions present, but quality is inconsistent. Most tools have adequate naming (verb-noun pattern) and descriptions (100-200 chars), but parameter descriptions are sparse or missing. Schemas use Zod with type definitions, but output schemas are not formally documented. Error handling exists but lacks recovery guidance. No tool annotations (readOnlyHint, destructiveHint). Examples provided in some tools but not all. Overall execution is functional but falls short of production-grade quality.
Analyze a GitHub Pull Request and provide a precise risk score and summary without using the GitHub API
Compare two branches in a Git repository and provide diff analysis with risk scoring
Connect to a Git repository and validate it. Returns repository metadata including name, current branch, and connection status.
Provide contributor-level repository insights including commit count, average risk score, and riskiest commits
Fetch recent commits from a Git repository with diff statistics
Generate a comprehensive risk report for a Git repository, highlighting the top 10 highest-risk commits
Output schemas not formally documented. Tools return structured objects (e.g., list-risky-commits returns commits array with hash, message, author, date, risk_score, reasoning), but no explicit output schema definitions are visible in code. LLMs cannot plan downstream operations without knowing return structure.
Missing tool annotations. No readOnlyHint, destructiveHint, or idempotentHint decorators visible. All 9 tools are READ_ONLY (safe), but this is not declared in the tool definition via annotations. Agents cannot infer safety properties.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 48 | 2025-06-18+ | v2 |
List all commits from a repository that exceed a risk threshold, ranked by risk score
Calculate an overall health score for a repository based on commit frequency, code quality, contributor diversity, and risk metrics
Calculate risk score for a specific commit based on message quality, diff size, and sensitive file changes
Parameter descriptions incomplete or missing. 'repo_path' appears in 7 tools with identical description '(optional; uses fixture data if omitted)' but lacks format guidance (absolute path? relative? must exist?). 'sortBy' enum in contributor-stats lacks description of what each value means. 'threshold' in list-risky-commits lacks range explanation (0-100 scale not stated in param description).
Error handling lacks recovery guidance. Catch blocks in reporter.tools.ts and contributors.tools.ts throw generic errors like 'Failed to list risky commits: <message>' without suggesting next steps. Per pattern:recovery-guide, errors should tell LLM what to do: 'No risky commits found. Try lowering threshold or checking repo_path.'
No pagination support. Tools like list-risky-commits and contributor-stats return arrays (commits, contributors) without limit/offset or cursor parameters. If a repo has 1000 risky commits, returning all wastes tokens and risks context window exhaustion.