health_check
Verifies that the Git Metrics MCP server is operational and ready to handle requests for repository analysis.
Instructions
Verify server is operational
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/git-metrics.ts:253-254 (handler)Handler logic for the health_check tool - returns status, version, and timestamp. Takes no arguments.
if (request.params.name === "health_check") { result = { status: "ok", version: VERSION, timestamp: new Date().toISOString() }; - src/git-metrics.ts:88-93 (schema)Input schema for health_check tool - no parameters required, empty object properties.
name: "health_check", description: "Verify server is operational", inputSchema: { type: "object", properties: {}, }, - src/git-metrics.ts:85-241 (registration)Registration of the health_check tool via ListToolsRequestSchema handler.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ { name: "health_check", description: "Verify server is operational", inputSchema: { type: "object", properties: {}, }, }, { name: "get_commit_stats", description: "Get commit statistics for a repository", inputSchema: { type: "object", properties: { repo_path: { type: "string", description: "Path to git repository" }, since: { type: "string", description: "Start date (YYYY-MM-DD)" }, until: { type: "string", description: "End date (YYYY-MM-DD), optional" }, author: { type: "string", description: "Filter by author email/name, optional" }, }, required: ["repo_path", "since"], }, }, { name: "get_author_metrics", description: "Get detailed metrics per author", inputSchema: { type: "object", properties: { repo_path: { type: "string", description: "Path to git repository" }, since: { type: "string", description: "Start date (YYYY-MM-DD)" }, until: { type: "string", description: "End date (YYYY-MM-DD), optional" }, }, required: ["repo_path", "since"], }, }, { name: "get_file_churn", description: "Get files with most changes (churn)", inputSchema: { type: "object", properties: { repo_path: { type: "string", description: "Path to git repository" }, since: { type: "string", description: "Start date (YYYY-MM-DD)" }, until: { type: "string", description: "End date (YYYY-MM-DD), optional" }, limit: { type: "number", description: "Number of files to return, default 10" }, }, required: ["repo_path", "since"], }, }, { name: "get_team_summary", description: "Get comprehensive team performance summary", inputSchema: { type: "object", properties: { repo_path: { type: "string", description: "Path to git repository" }, since: { type: "string", description: "Start date (YYYY-MM-DD)" }, until: { type: "string", description: "End date (YYYY-MM-DD), optional" }, }, required: ["repo_path", "since"], }, }, { name: "get_commit_patterns", description: "Analyze commit frequency patterns by day and hour", inputSchema: { type: "object", properties: { repo_path: { type: "string", description: "Path to git repository" }, since: { type: "string", description: "Start date (YYYY-MM-DD)" }, until: { type: "string", description: "End date (YYYY-MM-DD), optional" }, }, required: ["repo_path", "since"], }, }, { name: "get_code_ownership", description: "Analyze code ownership and bus factor", inputSchema: { type: "object", properties: { repo_path: { type: "string", description: "Path to git repository" }, since: { type: "string", description: "Start date (YYYY-MM-DD)" }, until: { type: "string", description: "End date (YYYY-MM-DD), optional" }, }, required: ["repo_path", "since"], }, }, { name: "get_velocity_trends", description: "Track velocity trends over time", inputSchema: { type: "object", properties: { repo_path: { type: "string", description: "Path to git repository" }, since: { type: "string", description: "Start date (YYYY-MM-DD)" }, until: { type: "string", description: "End date (YYYY-MM-DD), optional" }, interval: { type: "string", description: "week or month, default week" }, }, required: ["repo_path", "since"], }, }, { name: "get_collaboration_metrics", description: "Analyze team collaboration patterns", inputSchema: { type: "object", properties: { repo_path: { type: "string", description: "Path to git repository" }, since: { type: "string", description: "Start date (YYYY-MM-DD)" }, until: { type: "string", description: "End date (YYYY-MM-DD), optional" }, }, required: ["repo_path", "since"], }, }, { name: "get_quality_metrics", description: "Code quality indicators (commit size, reverts, etc)", inputSchema: { type: "object", properties: { repo_path: { type: "string", description: "Path to git repository" }, since: { type: "string", description: "Start date (YYYY-MM-DD)" }, until: { type: "string", description: "End date (YYYY-MM-DD), optional" }, }, required: ["repo_path", "since"], }, }, { name: "get_technical_debt", description: "Identify technical debt indicators", inputSchema: { type: "object", properties: { repo_path: { type: "string", description: "Path to git repository" }, stale_days: { type: "number", description: "Days without changes to consider stale, default 90" }, }, required: ["repo_path"], }, }, { name: "get_conventional_commits", description: "Analyze conventional commit usage and release patterns", inputSchema: { type: "object", properties: { repo_path: { type: "string", description: "Path to git repository" }, since: { type: "string", description: "Start date (YYYY-MM-DD)" }, until: { type: "string", description: "End date (YYYY-MM-DD), optional" }, }, required: ["repo_path", "since"], }, }, ], }));