create-iteration
Create new iterations in Shortcut project management with specified names, dates, and team assignments to organize development cycles.
Instructions
Create a new Shortcut iteration
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the iteration | |
| startDate | Yes | The start date of the iteration in YYYY-MM-DD format | |
| endDate | Yes | The end date of the iteration in YYYY-MM-DD format | |
| teamId | No | The ID of a team to assign the iteration to | |
| description | No | A description of the iteration |
Input Schema (JSON Schema)
{
"properties": {
"description": {
"description": "A description of the iteration",
"type": "string"
},
"endDate": {
"description": "The end date of the iteration in YYYY-MM-DD format",
"type": "string"
},
"name": {
"description": "The name of the iteration",
"type": "string"
},
"startDate": {
"description": "The start date of the iteration in YYYY-MM-DD format",
"type": "string"
},
"teamId": {
"description": "The ID of a team to assign the iteration to",
"type": "string"
}
},
"required": [
"name",
"startDate",
"endDate"
],
"type": "object"
}
Implementation Reference
- src/tools/iterations.ts:147-171 (handler)The handler function that implements the create-iteration tool logic. It calls the Shortcut client to create an iteration and returns a success message with the new iteration ID.async createIteration({ name, startDate, endDate, teamId, description, }: { name: string; startDate: string; endDate: string; teamId?: string; description?: string; }): Promise<CallToolResult> { const iteration = await this.client.createIteration({ name, start_date: startDate, end_date: endDate, group_ids: teamId ? [teamId] : undefined, description, }); if (!iteration) throw new Error(`Failed to create the iteration.`); return this.toResult(`Iteration created with ID: ${iteration.id}.`); }
- src/tools/iterations.ts:71-76 (schema)Zod schema defining the input parameters for the create-iteration tool: name (required), startDate, endDate (required), teamId and description (optional).name: z.string().describe("The name of the iteration"), startDate: z.string().describe("The start date of the iteration in YYYY-MM-DD format"), endDate: z.string().describe("The end date of the iteration in YYYY-MM-DD format"), teamId: z.string().optional().describe("The ID of a team to assign the iteration to"), description: z.string().optional().describe("A description of the iteration"), },
- src/tools/iterations.ts:67-78 (registration)Registration of the create-iteration tool using server.tool, including name, description, input schema, and reference to the handler method.server.tool( "create-iteration", "Create a new Shortcut iteration", { name: z.string().describe("The name of the iteration"), startDate: z.string().describe("The start date of the iteration in YYYY-MM-DD format"), endDate: z.string().describe("The end date of the iteration in YYYY-MM-DD format"), teamId: z.string().optional().describe("The ID of a team to assign the iteration to"), description: z.string().optional().describe("A description of the iteration"), }, async (params) => await tools.createIteration(params), );