Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

get_current_iteration

Retrieve the currently active iteration for a GitHub project based on today's date to track sprint progress and manage workflows.

Instructions

Get the currently active iteration based on today's date

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes
fieldNameNo

Implementation Reference

  • Core implementation of get_current_iteration tool. Computes the currently active iteration by checking which iteration's date range (from project iteration field configuration) contains the current date.
    async getCurrentIteration(data: {
      projectId: string;
      fieldName?: string;
    }): Promise<{
      id: string;
      title: string;
      startDate: string;
      endDate: string;
      duration: number;
    } | null> {
      try {
        const config = await this.getIterationConfiguration(data);
        const now = new 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 (now >= start && now < 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);
      }
    }
  • Tool definition for get_current_iteration, including name, description, input schema reference, and usage examples.
    export const getCurrentIterationTool: ToolDefinition<GetCurrentIterationArgs> = {
      name: "get_current_iteration",
      description: "Get the currently active iteration based on today's date",
      schema: getCurrentIterationSchema as unknown as ToolSchema<GetCurrentIterationArgs>,
      examples: [
        {
          name: "Get current sprint",
          description: "Find which iteration is currently active",
          args: {
            projectId: "PVT_kwDOLhQ7gc4AOEbH"
          }
        }
      ]
    };
  • Zod input schema definition for validating get_current_iteration tool arguments.
    export const getCurrentIterationSchema = z.object({
      projectId: z.string().min(1, "Project ID is required"),
      fieldName: z.string().optional()
    });
    
    export type GetCurrentIterationArgs = z.infer<typeof getCurrentIterationSchema>;
  • Registration of the getCurrentIterationTool in the central ToolRegistry singleton.
    this.registerTool(getIterationConfigurationTool);
    this.registerTool(getCurrentIterationTool);
    this.registerTool(getIterationItemsTool);
    this.registerTool(getIterationByDateTool);
    this.registerTool(assignItemsToIterationTool);
  • MCP tool request router that dispatches get_current_iteration calls to ProjectManagementService.getCurrentIteration method.
    case "get_current_iteration":
      return await this.service.getCurrentIteration(args);
  • Supporting helper method that retrieves the iteration field configuration (including all iterations) used by getCurrentIteration.
    async getIterationConfiguration(data: {
      projectId: string;
      fieldName?: string;
    }): Promise<{
      fieldId: string;
      fieldName: string;
      duration: number;
      startDay: number;
      iterations: Array<{
        id: string;
        title: string;
        startDate: string;
        duration: number;
      }>;
    }> {
      try {
        const fields = await this.listProjectFields({ projectId: data.projectId });
    
        // Find iteration field
        const iterationField = fields.find((f: CustomField) =>
          f.type === 'iteration' && (!data.fieldName || f.name === data.fieldName)
        );
    
        if (!iterationField) {
          throw new ResourceNotFoundError(
            ResourceType.FIELD,
            data.fieldName || 'iteration field'
          );
        }
    
        if (!iterationField.config) {
          throw new Error('Invalid iteration field configuration');
        }
    
        return {
          fieldId: iterationField.id,
          fieldName: iterationField.name,
          duration: iterationField.config.iterationDuration || 14,
          startDay: iterationField.config.iterationStart ? new Date(iterationField.config.iterationStart).getDay() : 1,
          iterations: (iterationField.config.iterations || []).map((iter: any) => ({
            id: iter.id,
            title: iter.title,
            startDate: iter.startDate,
            duration: iter.duration
          }))
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the tool gets data based on today's date, but doesn't disclose behavioral traits such as whether it's read-only, what permissions are needed, how it handles missing data, or the return format. This leaves significant gaps for a tool with parameters.

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 front-loads the core purpose without unnecessary words. Every part of the sentence earns its place by specifying the action, resource, and key constraint (today's date).

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 (2 parameters, no annotations, no output schema), the description is incomplete. It lacks details on parameter usage, behavioral context, and output expectations, making it insufficient for an agent to reliably invoke the tool without additional assumptions.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It adds no meaning about the two parameters (projectId and fieldName), failing to explain what they represent, their expected values, or how they affect the output. This is inadequate given the coverage gap.

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 action ('Get') and the resource ('currently active iteration'), specifying it's based on today's date. It distinguishes from siblings like 'get_iteration_by_date' by focusing on the current iteration rather than a specific date, but doesn't explicitly mention this distinction.

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?

No guidance on when to use this tool versus alternatives like 'get_iteration_by_date' or 'get_current_sprint' is provided. The description implies usage for retrieving the current iteration but offers no context about prerequisites, alternatives, or exclusions.

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

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