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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions analysis and identification but fails to describe how the tool behaves: e.g., what data sources it uses, whether it's read-only or has side effects, if it requires specific permissions, or what the output format looks like. For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded with the core function and avoids redundancy, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of workload analysis and the lack of annotations or output schema, the description is incomplete. It doesn't explain what the analysis entails, how results are returned, or any behavioral traits. For a tool that likely involves data processing and decision-making, more context is needed to guide the agent effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, meaning there are no parameters to document. The description appropriately doesn't discuss parameters, which aligns with the schema. Since there are no parameters, the baseline is 4, as the description doesn't need to compensate for any gaps in parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: analyzing team workload distribution and identifying capacity for new tasks. It uses specific verbs ('analyze', 'identify') and resources ('team workload distribution', 'who can take on new tasks'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_team_status' or 'find_best_assignee', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'find_best_assignee' and 'get_team_status' that might overlap in functionality, there's no indication of when this analysis is preferred, what prerequisites exist, or any exclusions. This leaves the agent without contextual usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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