Skip to main content
Glama
blackgirlbytes

GitHub Calendar MCP Server

analyze_workload

Analyze team workload distribution to identify available capacity for new tasks using GitHub project board data.

Instructions

Analyze team workload distribution and identify who can take on new tasks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that fetches team issues via GitHub client, computes workload metrics for each assignee, categorizes workload levels, generates recommendations, sorts members, and returns structured analysis including least and most busy members.
    async analyzeWorkload(): Promise<WorkloadAnalysis> { try { // Get all open issues const issues = await this.githubClient.getAllTeamIssues(); // Get unique assignees const assigneeLogins = this.githubClient.getUniqueAssignees(issues); // Calculate workload for each member const members = assigneeLogins.map(login => { const memberIssues = issues.filter(issue => issue.assignees.some(assignee => assignee.login === login) ); const activeIssues = memberIssues.length; const workloadLevel = this.categorizeWorkload(activeIssues); const recommendation = this.getRecommendation(workloadLevel, activeIssues); return { login, activeIssues, workloadLevel, recommendation }; }); // Sort by active issues count members.sort((a, b) => a.activeIssues - b.activeIssues); // Find least and most busy members const leastBusy = members .filter(m => m.workloadLevel === 'light') .map(m => m.login); const mostBusy = members .filter(m => m.workloadLevel === 'overloaded' || m.workloadLevel === 'heavy') .map(m => m.login); return { members, leastBusy, mostBusy }; } catch (error) { console.error('Error analyzing workload:', error); throw error; } }
  • src/index.ts:120-128 (registration)
    Registers the 'analyze_workload' tool in the MCP server's listTools handler, providing name, description, and empty input schema (no parameters required).
    { name: 'analyze_workload', description: 'Analyze team workload distribution and identify who can take on new tasks', inputSchema: { type: 'object', properties: {}, required: [], }, },
  • MCP tool call dispatch handler that invokes the WorkloadAnalysisTool's analyzeWorkload method and formats the response as MCP content.
    case 'analyze_workload': { const analysis = await this.workloadAnalysisTool.analyzeWorkload(); return { content: [ { type: 'text', text: this.formatWorkloadAnalysis(analysis), }, ], }; }
  • TypeScript interface defining the structure of the workload analysis output, used as the return type for the tool handler.
    export interface WorkloadAnalysis { members: Array<{ login: string; activeIssues: number; workloadLevel: 'light' | 'moderate' | 'heavy' | 'overloaded'; recommendation: string; }>; leastBusy: string[]; mostBusy: string[]; }
  • Helper function to format the workload analysis results into a human-readable Markdown string with emojis for workload levels and highlights for available/busy members.
    private formatWorkloadAnalysis(analysis: any): string { const { members, leastBusy, mostBusy } = analysis; let output = '## Workload Analysis\n\n'; output += '**Team Workload Distribution:**\n'; for (const member of members) { const { login, activeIssues, workloadLevel, recommendation } = member; const levelEmojiMap: Record<string, string> = { light: '🟒', moderate: '🟑', heavy: '🟠', overloaded: 'πŸ”΄' }; const levelEmoji = levelEmojiMap[workloadLevel] || 'βšͺ'; output += `- ${levelEmoji} **${login}**: ${activeIssues} issues (${workloadLevel}) - ${recommendation}\n`; } if (leastBusy.length > 0) { output += `\n**Available for new work:** ${leastBusy.join(', ')}\n`; } if (mostBusy.length > 0) { output += `\n**At capacity:** ${mostBusy.join(', ')}\n`; } return output; }

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/blackgirlbytes/github-calendar-mcp-server'

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