Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

get_iteration_by_date

Identify which GitHub project iteration contains a specific date by providing the project ID and target date. This tool helps with sprint planning and timeline management in GitHub Projects V2.

Instructions

Find which iteration contains a specific date

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes
dateYes
fieldNameNo

Implementation Reference

  • The main handler function that implements the get_iteration_by_date tool logic. It retrieves the iteration configuration for the project and finds which iteration contains the specified date by comparing date ranges.
    async getIterationByDate(data: {
      projectId: string;
      date: string;
      fieldName?: string;
    }): Promise<{
      id: string;
      title: string;
      startDate: string;
      endDate: string;
      duration: number;
    } | null> {
      try {
        const config = await this.getIterationConfiguration(data);
        const targetDate = new Date(data.date);
    
        for (const iteration of config.iterations) {
          const start = new Date(iteration.startDate);
          const end = new Date(start);
          end.setDate(end.getDate() + iteration.duration);
    
          if (targetDate >= start && targetDate < end) {
            return {
              id: iteration.id,
              title: iteration.title,
              startDate: iteration.startDate,
              endDate: end.toISOString(),
              duration: iteration.duration
            };
          }
        }
    
        return null;
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • ToolDefinition object including the Zod input schema, description, and examples for the get_iteration_by_date tool.
    export const getIterationByDateTool: ToolDefinition<GetIterationByDateArgs> = {
      name: "get_iteration_by_date",
      description: "Find which iteration contains a specific date",
      schema: getIterationByDateSchema as unknown as ToolSchema<GetIterationByDateArgs>,
      examples: [
        {
          name: "Find iteration",
          description: "Find which iteration contains a specific date",
          args: {
            projectId: "PVT_kwDOLhQ7gc4AOEbH",
            date: "2025-01-15T00:00:00Z"
          }
        }
      ]
    };
  • Registers the getIterationByDateTool in the central ToolRegistry singleton.
    this.registerTool(getIterationConfigurationTool);
    this.registerTool(getCurrentIterationTool);
    this.registerTool(getIterationItemsTool);
    this.registerTool(getIterationByDateTool);
    this.registerTool(assignItemsToIterationTool);
  • Dispatches tool calls to the ProjectManagementService handler in the main MCP server switch statement.
    case "get_iteration_by_date":
      return await this.service.getIterationByDate(args);

Tool Definition Quality

Score is being calculated. Check back soon.

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/kunwarVivek/mcp-github-project-manager'

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