iterations-create
Create new iterations in Shortcut project management by specifying name, dates, team, and description to organize work cycles.
Instructions
Create a new Shortcut iteration
Input Schema
TableJSON 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 |
Implementation Reference
- src/tools/iterations.ts:164-188 (handler)The `createIteration` method contains the core logic for the 'iterations-create' tool, invoking the Shortcut client's `createIteration` method with mapped parameters and returning 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:83-89 (schema)Zod schema defining the input parameters (name, startDate, endDate, optional teamId and description) for the 'iterations-create' tool.{ 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:80-91 (registration)Registration of the 'iterations-create' tool using `server.addToolWithWriteAccess`, providing the tool name, description, input schema, and handler reference.server.addToolWithWriteAccess( "iterations-create", "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), );