iterations-get-by-id
Retrieve a specific iteration from Shortcut project management using its public ID to access detailed information about project timelines and progress.
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 | |
| full | No | True to return all iteration fields from the API. False to return a slim version that excludes uncommon fields |
Implementation Reference
- src/tools/iterations.ts:150-162 (handler)Handler function that fetches the iteration by public ID using the client, handles errors, and formats the result using base methods.async getIteration(iterationPublicId: number, full = false) { 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", full), ); }
- src/tools/iterations.ts:33-42 (schema)Zod schema defining input parameters: iterationPublicId (required number) and full (optional boolean, default false).{ iterationPublicId: z.number().positive().describe("The public ID of the iteration to get"), full: z .boolean() .optional() .default(false) .describe( "True to return all iteration fields from the API. False to return a slim version that excludes uncommon fields", ), },
- src/tools/iterations.ts:30-44 (registration)Registration of the 'iterations-get-by-id' tool using server.addToolWithReadAccess, including name, description, input schema, and handler lambda that delegates to getIteration method.server.addToolWithReadAccess( "iterations-get-by-id", "Get a Shortcut iteration by public ID", { iterationPublicId: z.number().positive().describe("The public ID of the iteration to get"), full: z .boolean() .optional() .default(false) .describe( "True to return all iteration fields from the API. False to return a slim version that excludes uncommon fields", ), }, async ({ iterationPublicId, full }) => await tools.getIteration(iterationPublicId, full), );