Skip to main content
Glama
blackgirlbytes

GitHub Calendar MCP Server

get_person_schedule

Retrieve a team member's upcoming GitHub work schedule to track tasks and manage team availability.

Instructions

Get the schedule and upcoming work for a specific team member

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
loginYesGitHub username of the team member
daysNoNumber of days to look ahead (default: 7)

Implementation Reference

  • Core handler logic: fetches GitHub issues assigned to the person, enriches with due date calculations, sorts by urgency (due date then recency), and constructs PersonSchedule object.
    async getPersonSchedule(login: string): Promise<PersonSchedule> {
      try {
        // Get open issues assigned to this person
        const issues = await this.githubClient.getIssuesByAssignee(login);
        
        // Get avatar URL from first issue
        const avatarUrl = issues[0]?.assignees.find(a => a.login === login)?.avatar_url || '';
        
        // Build upcoming issues with due date info
        const upcomingIssues = issues.map(issue => {
          const dueDate = issue.milestone?.due_on || null;
          const daysUntilDue = dueDate ? differenceInDays(parseISO(dueDate), new Date()) : null;
          
          return {
            issue,
            dueDate,
            daysUntilDue
          };
        });
    
        // Sort by due date (soonest first, then by creation date)
        upcomingIssues.sort((a, b) => {
          // Items with due dates come first
          if (a.daysUntilDue !== null && b.daysUntilDue === null) return -1;
          if (a.daysUntilDue === null && b.daysUntilDue !== null) return 1;
          
          // Both have due dates, sort by days until due
          if (a.daysUntilDue !== null && b.daysUntilDue !== null) {
            return a.daysUntilDue - b.daysUntilDue;
          }
          
          // Neither has due date, sort by creation date (newest first)
          return new Date(b.issue.created_at).getTime() - new Date(a.issue.created_at).getTime();
        });
    
        return {
          login,
          avatar_url: avatarUrl,
          upcomingIssues
        };
      } catch (error) {
        console.error(`Error getting schedule for ${login}:`, error);
        throw error;
      }
    }
  • Tool-specific handler: fetches full schedule and filters upcoming issues to those due within the requested number of days (or no due date).
    async getPersonScheduleForDateRange(login: string, days: number = 7): Promise<PersonSchedule> {
      const schedule = await this.getPersonSchedule(login);
      
      // Filter to only include issues due within the specified number of days
      const filteredIssues = schedule.upcomingIssues.filter(item => {
        if (item.daysUntilDue === null) return true; // Include items without due dates
        return item.daysUntilDue <= days; // Include items due within the range
      });
    
      return {
        ...schedule,
        upcomingIssues: filteredIssues
      };
    }
  • MCP dispatch handler: parses tool arguments, invokes PersonScheduleTool.getPersonScheduleForDateRange, formats output, and returns MCP tool response.
    case 'get_person_schedule': {
      const { login, days = 7 } = args as { login: string; days?: number };
      const schedule = await this.personScheduleTool.getPersonScheduleForDateRange(login, days);
      return {
        content: [
          {
            type: 'text',
            text: this.formatPersonSchedule(schedule, days),
          },
        ],
      };
    }
  • src/index.ts:101-119 (registration)
    Tool registration in MCP listTools handler: defines name, description, and input schema (login required, days optional).
    {
      name: 'get_person_schedule',
      description: 'Get the schedule and upcoming work for a specific team member',
      inputSchema: {
        type: 'object',
        properties: {
          login: {
            type: 'string',
            description: 'GitHub username of the team member',
          },
          days: {
            type: 'number',
            description: 'Number of days to look ahead (default: 7)',
            default: 7,
          },
        },
        required: ['login'],
      },
    },
  • Helper function to format the PersonSchedule into a human-readable markdown string, including issue titles, due status, and links.
    private formatPersonSchedule(schedule: any, days: number): string {
      const { login, upcomingIssues } = schedule;
      
      let output = `## ${login}'s Schedule (next ${days} days)\n\n`;
      
      if (upcomingIssues.length === 0) {
        output += 'No upcoming issues assigned.\n';
        return output;
      }
    
      output += '**Upcoming Work:**\n';
      for (const item of upcomingIssues) {
        const { issue, daysUntilDue } = item;
        output += `- **${issue.title}**`;
        
        if (daysUntilDue !== null) {
          if (daysUntilDue < 0) {
            output += ` (overdue by ${Math.abs(daysUntilDue)} days)`;
          } else if (daysUntilDue === 0) {
            output += ` (due today)`;
          } else {
            output += ` (due in ${daysUntilDue} days)`;
          }
        }
        
        output += `\n  - Issue #${issue.number}: ${issue.html_url}\n`;
      }
    
      return output;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves data ('Get'), implying a read-only operation, but doesn't clarify aspects like authentication needs, rate limits, error handling, or the format of returned data. For a tool with zero annotation coverage, this leaves significant gaps in understanding its operational behavior.

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, clear sentence that efficiently conveys the core purpose without unnecessary words. It is front-loaded with the main action and resource, making it easy to parse and understand quickly, with no wasted information.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details on behavioral traits, usage context, and output format. Without annotations or an output schema, the agent must rely on the description alone, which is incomplete for fully informed tool selection and invocation.

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

Parameters3/5

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

The input schema has 100% description coverage, clearly documenting both parameters ('login' as GitHub username and 'days' with a default). The description adds no additional semantic details beyond what the schema provides, such as explaining what 'schedule and upcoming work' entails or how the 'days' parameter affects the output. This meets the baseline score when schema coverage is high.

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 with a specific verb ('Get') and resource ('schedule and upcoming work for a specific team member'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_calendar_events' or 'get_team_status', which might also involve scheduling or team-related data, leaving some ambiguity about its unique scope.

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. It doesn't mention when to choose it over sibling tools like 'analyze_workload' or 'find_best_assignee', nor does it specify any prerequisites or exclusions for usage, leaving the agent to infer context without explicit direction.

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