Skip to main content
Glama
agent-examples.json12.2 kB
{ "description": "Real-world agent usage examples for GitHub MCP Server", "examples": [ { "name": "Performance Review Data Collection - Complete Overview", "description": "Get comprehensive metrics for a developer in a single call. This data can be used for performance reviews.", "workflow": [ { "step": 1, "tool": "github.getUserRepoStats", "purpose": "Get all activity metrics in one call", "request": { "username": "developer-name", "repo": "company/main-repo", "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" }, "expectedResponse": { "stats": { "username": "developer-name", "repo": "company/main-repo", "timeRange": { "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" }, "prs": { "count": 15, "merged": 12, "open": 2, "closed": 1 }, "comments": { "total": 45, "review": 30, "issue": 15 }, "reviews": { "total": 20, "totalPRsReviewed": 15, "approved": 12, "changesRequested": 5, "commented": 3 }, "codeChanges": { "filesChanged": 120, "additions": 3500, "deletions": 800, "netChange": 2700 } } } } ], "useCase": "Data collection for performance reviews, quarterly assessments, developer metrics dashboards" }, { "name": "Code Contribution Analysis", "description": "Analyze PRs authored with detailed code statistics", "workflow": [ { "step": 1, "tool": "github.getAuthoredPRs", "purpose": "Get all PRs authored by developer", "request": { "username": "developer-name", "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z", "repos": ["company/main-repo"] }, "expectedResponse": { "prs": [ { "id": "PR_kwDOABC123", "repo": "company/main-repo", "title": "Add new feature", "createdAt": "2024-06-15T10:30:00Z", "mergedAt": "2024-06-16T14:20:00Z", "state": "MERGED", "filesChanged": 5, "additions": 120, "deletions": 45 } ] } } ], "useCase": "Code contribution tracking, PR quality analysis, file-level change analysis" }, { "name": "Code Review Quality Assessment", "description": "Assess review participation and effectiveness", "workflow": [ { "step": 1, "tool": "github.getPRReviews", "purpose": "Get review activity and states", "request": { "username": "reviewer-name", "repo": "company/main-repo", "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" }, "expectedResponse": { "reviews": [ { "id": "PRR_kwDO...", "state": "APPROVED", "prId": "PR_kwDO...", "prNumber": 123, "prTitle": "Add feature X", "prRepo": "company/main-repo", "submittedAt": "2024-06-20T09:15:00Z" } ] } }, { "step": 2, "tool": "github.getReviewComments", "purpose": "Get review comment content and counts", "request": { "username": "reviewer-name", "repo": "company/main-repo", "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" }, "expectedResponse": { "userId": "reviewer-name", "dateRange": { "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" }, "totalPRsReviewed": 5, "totalComments": 12, "prs": [ { "prId": "PR_kwDO...", "prNumber": 123, "prTitle": "Add feature X", "prRepo": "company/main-repo", "prUrl": "https://github.com/company/main-repo/pull/123", "prCreatedAt": "2024-06-15T10:30:00Z", "comments": [ "Consider using a constant here", "This looks good!" ], "totalComments": 2 } ] } }, { "step": 3, "tool": "github.getCommentImpact", "purpose": "Measure if reviews led to code changes", "request": { "username": "reviewer-name", "repo": "company/main-repo", "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" }, "expectedResponse": { "impacts": [ { "commentId": "PRRC_kwDO...", "prId": "PR_kwDO...", "hadImpact": true, "confidence": 0.7, "evidence": [ "Commit abc1234 modified files after comment (3 files)" ] } ], "stats": { "totalComments": 25, "totalPRsReviewed": 10, "totalImpacts": 8 } } } ], "useCase": "Review quality metrics, review effectiveness analysis, reviewer performance assessment", "metrics": { "reviewParticipation": "reviews.length", "commentQuality": "comments.totalComments / reviews.length", "reviewEffectiveness": "impact.stats.totalImpacts / impact.stats.totalComments" } }, { "name": "Comment Analysis", "description": "Get all comments (review + issue) by a user", "workflow": [ { "step": 1, "tool": "github.getUserComments", "purpose": "Get all comments in a repository", "request": { "username": "developer-name", "repo": "company/main-repo", "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" }, "expectedResponse": { "comments": [ { "id": "PRRC_kwDO...", "body": "Consider using a constant here", "createdAt": "2024-06-20T09:15:00Z", "author": "developer-name", "prId": "PR_kwDO...", "prNumber": 123, "prTitle": "Add feature X", "prRepo": "company/main-repo", "commentType": "review", "filePath": "src/utils/helper.ts", "lineNumber": 42, "reviewId": "PRR_kwDO..." }, { "id": "IC_kwDO...", "body": "Great work! This looks good to me.", "createdAt": "2024-06-21T14:30:00Z", "author": "developer-name", "prId": "PR_kwDO...", "prNumber": 123, "prTitle": "Add feature X", "prRepo": "company/main-repo", "commentType": "issue", "filePath": null, "lineNumber": null, "reviewId": null } ] } } ], "useCase": "Comment sentiment analysis, engagement tracking, communication analysis" }, { "name": "Multi-Repository Analysis", "description": "Compare activity across multiple repositories", "workflow": [ { "step": 1, "tool": "github.getUserRepoStats", "purpose": "Get stats for repository 1", "request": { "username": "developer-name", "repo": "company/repo1", "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" } }, { "step": 2, "tool": "github.getUserRepoStats", "purpose": "Get stats for repository 2", "request": { "username": "developer-name", "repo": "company/repo2", "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" } }, { "step": 3, "tool": "github.getUserRepoStats", "purpose": "Get stats for repository 3", "request": { "username": "developer-name", "repo": "company/repo3", "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" } } ], "useCase": "Cross-repository activity comparison, portfolio analysis, team contribution tracking", "note": "These calls can be made in parallel for better performance" }, { "name": "Quarterly Sprint Analysis", "description": "Analyze activity for a specific quarter", "workflow": [ { "step": 1, "tool": "github.getUserRepoStats", "purpose": "Get Q1 2024 stats", "request": { "username": "developer-name", "repo": "company/main-repo", "from": "2024-01-01T00:00:00Z", "to": "2024-03-31T23:59:59Z" } }, { "step": 2, "tool": "github.getUserRepoStats", "purpose": "Get Q2 2024 stats", "request": { "username": "developer-name", "repo": "company/main-repo", "from": "2024-04-01T00:00:00Z", "to": "2024-06-30T23:59:59Z" } } ], "useCase": "Quarterly reviews, trend analysis, period-over-period comparisons" }, { "name": "Top Contributors Analysis", "description": "Identify top contributors across multiple developers", "workflow": [ { "step": 1, "tool": "github.getUserRepoStats", "purpose": "Get stats for developer 1", "request": { "username": "developer1", "repo": "company/main-repo", "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" } }, { "step": 2, "tool": "github.getUserRepoStats", "purpose": "Get stats for developer 2", "request": { "username": "developer2", "repo": "company/main-repo", "from": "2024-01-01T00:00:00Z", "to": "2024-12-31T23:59:59Z" } } ], "useCase": "Team leaderboards, contribution rankings, recognition programs", "note": "Compare stats.prs.count, stats.codeChanges.netChange, stats.reviews.totalPRsReviewed across developers" } ], "bestPractices": { "startWithOverview": "Use github.getUserRepoStats for initial analysis", "filterByRepository": "Always specify repo parameter for consistent data", "useAppropriateTimeRanges": { "quarterly": "3-month ranges", "annual": "Full year ranges", "sprint": "2-week ranges" }, "handleRateLimits": "Server handles rate limits automatically, but consider shorter time ranges for large datasets", "combineToolsStrategically": "Use getUserRepoStats for overview, specific tools for detailed analysis" }, "commonMetrics": { "productivity": "stats.prs.count, stats.prs.merged", "codeContribution": "stats.codeChanges.additions, stats.codeChanges.netChange", "reviewParticipation": "stats.reviews.totalPRsReviewed, stats.reviews.total", "reviewQuality": "stats.comments.total / stats.reviews.total", "reviewEffectiveness": "impact.stats.totalImpacts / impact.stats.totalComments", "engagement": "stats.comments.total, stats.reviews.total" } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/radireddy/github-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server