Skip to main content
Glama

create-iteration

Create a new iteration in Shortcut project management by specifying name, start date, end date, and optional team assignment or description.

Instructions

Create a new Shortcut iteration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the iteration
startDateYesThe start date of the iteration in YYYY-MM-DD format
endDateYesThe end date of the iteration in YYYY-MM-DD format
teamIdNoThe ID of a team to assign the iteration to
descriptionNoA description of the iteration

Implementation Reference

  • The `createIteration` method that executes the tool logic: creates a new Shortcut iteration using the client, handles parameters like name, dates, team, description, and returns a result 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}.`); }
  • Zod schema validating the input parameters for the 'create-iteration' tool: name (required string), startDate and endDate (strings in YYYY-MM-DD), optional teamId and description.
    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"), },
  • Registers the 'create-iteration' tool with the MCP server in the IterationTools static create method, linking the schema and handler.
    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), );

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/ampcome-mcps/shortcut-mcp'

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