Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

assign_items_to_iteration

Assign multiple project items to a specific iteration for organized sprint planning and milestone tracking in GitHub Projects.

Instructions

Bulk assign multiple items to a specific iteration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYes
itemIdsYes
iterationIdYes
fieldNameNo

Implementation Reference

  • Main handler function that implements the assign_items_to_iteration tool. Finds the iteration field in the project, then bulk assigns the specified item IDs to the given iteration ID by calling setFieldValue for each item.
    async assignItemsToIteration(data: {
      projectId: string;
      itemIds: string[];
      iterationId: string;
      fieldName?: string;
    }): Promise<{ success: boolean; assignedCount: number }> {
      try {
        // Get iteration field
        const fields = await this.listProjectFields({ projectId: data.projectId });
        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'
          );
        }
    
        let assignedCount = 0;
    
        // Assign each item to the iteration
        for (const itemId of data.itemIds) {
          try {
            await this.setFieldValue({
              projectId: data.projectId,
              itemId: itemId,
              fieldId: iterationField.id,
              value: { iterationId: data.iterationId }
            });
            assignedCount++;
          } catch (error) {
            // Log error but continue with other items
            console.error(`Failed to assign item ${itemId}:`, error);
          }
        }
    
        return {
          success: assignedCount > 0,
          assignedCount
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • Tool definition including name, description, input schema (assignItemsToIterationSchema), and usage examples.
    export const assignItemsToIterationTool: ToolDefinition<AssignItemsToIterationArgs> = {
      name: "assign_items_to_iteration",
      description: "Bulk assign multiple items to a specific iteration",
      schema: assignItemsToIterationSchema as unknown as ToolSchema<AssignItemsToIterationArgs>,
      examples: [
        {
          name: "Assign to sprint",
          description: "Add multiple issues to the current sprint",
          args: {
            projectId: "PVT_kwDOLhQ7gc4AOEbH",
            itemIds: ["PVTI_lADOLhQ7gc4AOEbHzM4AOAJ7", "PVTI_lADOLhQ7gc4AOEbHzM4AOAJ8"],
            iterationId: "PVTIF_lADOLhQ7gc4AOEbH"
          }
        }
      ]
    };
  • Zod input validation schema defining parameters: projectId, itemIds (array), iterationId, optional fieldName.
    // Schema for assign_items_to_iteration tool
    export const assignItemsToIterationSchema = z.object({
      projectId: z.string().min(1, "Project ID is required"),
      itemIds: z.array(z.string()).min(1, "At least one item ID is required"),
      iterationId: z.string().min(1, "Iteration ID is required"),
      fieldName: z.string().optional()
    });
    
    export type AssignItemsToIterationArgs = z.infer<typeof assignItemsToIterationSchema>;
  • Registers the assignItemsToIterationTool in the central ToolRegistry singleton.
    this.registerTool(assignItemsToIterationTool);
  • Imports assignItemsToIterationTool from ToolSchemas.ts for registration.
    assignItemsToIterationTool,
  • MCP server dispatch: routes tool calls to ProjectManagementService.assignItemsToIteration.
    case "assign_items_to_iteration":
      return await this.service.assignItemsToIteration(args);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'bulk assign' implies a write/mutation operation, it doesn't specify permissions required, whether the operation is reversible, what happens to previously assigned iterations, or any rate limits. This leaves significant behavioral gaps for a mutation tool.

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 states the core functionality without unnecessary words. It's appropriately sized for what it communicates, though what it communicates is limited in scope.

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?

For a mutation tool with 4 parameters (0% schema coverage), no annotations, and no output schema, the description is inadequate. It doesn't explain what 'items' are (issues, tasks, etc.), what format IDs should use, what happens on success/failure, or provide any error handling context, leaving the agent poorly equipped to use this tool correctly.

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?

With 0% schema description coverage for all 4 parameters, the description provides no semantic information about what 'projectId', 'itemIds', 'iterationId', or 'fieldName' represent. The description mentions 'items' and 'iteration' which loosely map to two parameters, but doesn't explain their formats, relationships, or why 'fieldName' might be optional when others are required.

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 ('bulk assign') and target ('multiple items to a specific iteration'), providing a specific verb+resource combination. However, it doesn't differentiate from potential sibling tools like 'add_issues_to_sprint' or 'set_field_value' that might handle similar assignment operations, preventing 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. It doesn't mention prerequisites, constraints, or compare it to sibling tools like 'add_issues_to_sprint' or 'set_field_value' that might handle similar operations, leaving the agent with minimal context for proper tool selection.

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