get-iteration-stories
Retrieve stories from a specific iteration by its public ID, optionally including detailed descriptions, to integrate Shortcut project management data with AI tools.
Instructions
Get stories in a specific iteration by iteration public ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| includeStoryDescriptions | No | Indicate whether story descriptions should be included. Including descriptions may take longer and will increase the size of the response. | |
| iterationPublicId | Yes | The public ID of the iteration |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"includeStoryDescriptions": {
"default": false,
"description": "Indicate whether story descriptions should be included. Including descriptions may take longer and will increase the size of the response.",
"type": "boolean"
},
"iterationPublicId": {
"description": "The public ID of the iteration",
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"iterationPublicId"
],
"type": "object"
}
Implementation Reference
- src/tools/iterations.ts:114-129 (handler)The handler function that executes the tool: fetches stories for the given iteration using the Shortcut client and returns formatted results.async getIterationStories(iterationPublicId: number, includeDescription: boolean) { const { stories } = await this.client.listIterationStories( iterationPublicId, includeDescription, ); if (!stories) throw new Error( `Failed to retrieve Shortcut stories in iteration with public ID: ${iterationPublicId}.`, ); return this.toResult( `Result (${stories.length} stories found):`, await this.entitiesWithRelatedEntities(stories, "stories"), ); }
- src/tools/iterations.ts:13-28 (registration)Registers the tool 'iterations-get-stories' (matches get-iteration-stories functionality) with Zod input schema and references the handler.server.addToolWithReadAccess( "iterations-get-stories", "Get stories in a specific iteration by iteration public ID", { iterationPublicId: z.number().positive().describe("The public ID of the iteration"), includeStoryDescriptions: z .boolean() .optional() .default(false) .describe( "Indicate whether story descriptions should be included. Including descriptions may take longer and will increase the size of the response.", ), }, async ({ iterationPublicId, includeStoryDescriptions }) => await tools.getIterationStories(iterationPublicId, includeStoryDescriptions), );
- src/server.ts:48-48 (registration)Top-level registration call that initializes IterationTools, including the get-iteration-stories tool.IterationTools.create(client, server);
- src/tools/iterations.ts:17-25 (schema)Zod schema defining input parameters for the tool: iterationPublicId (required) and includeStoryDescriptions (optional boolean).iterationPublicId: z.number().positive().describe("The public ID of the iteration"), includeStoryDescriptions: z .boolean() .optional() .default(false) .describe( "Indicate whether story descriptions should be included. Including descriptions may take longer and will increase the size of the response.", ), },