get-iteration
Retrieve detailed information about a specific Shortcut iteration using its public ID number to access project management data and iteration details.
Instructions
Get a Shortcut iteration by public ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| iterationPublicId | Yes | The public ID of the iteration to get |
Implementation Reference
- src/tools/iterations.ts:133-145 (handler)The main handler function for the 'get-iteration' tool. It calls the Shortcut client to fetch the iteration by public ID, throws an error if not found, and formats the result using inherited methods.async getIteration(iterationPublicId: number) { const iteration = await this.client.getIteration(iterationPublicId); if (!iteration) throw new Error( `Failed to retrieve Shortcut iteration with public ID: ${iterationPublicId}.`, ); return this.toResult( `Iteration: ${iterationPublicId}`, await this.entityWithRelatedEntities(iteration, "iteration"), ); }
- src/tools/iterations.ts:30-37 (registration)Registers the 'get-iteration' tool with the MCP server, providing the tool name, description, input schema using Zod, and references the handler function.server.tool( "get-iteration", "Get a Shortcut iteration by public ID", { iterationPublicId: z.number().positive().describe("The public ID of the iteration to get"), }, async ({ iterationPublicId }) => await tools.getIteration(iterationPublicId), );
- src/tools/iterations.ts:34-35 (schema)Input schema for the 'get-iteration' tool, validating iterationPublicId as a positive number.iterationPublicId: z.number().positive().describe("The public ID of the iteration to get"), },