get-iteration-stories
Retrieve stories from a specific iteration in Shortcut project management using the iteration's public ID. Optionally include story descriptions for detailed task information.
Instructions
Get stories in a specific iteration by iteration public ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| iterationPublicId | Yes | The public ID of the iteration | |
| includeStoryDescriptions | No | Indicate whether story descriptions should be included. Including descriptions may take longer and will increase the size of the response. |
Input Schema (JSON Schema)
{
"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:13-28 (registration)Registration of the 'get-iteration-stories' tool using server.tool, including schema definition and handler reference.server.tool( "get-iteration-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/tools/iterations.ts:101-116 (handler)The handler function getIterationStories that fetches stories from the iteration using the Shortcut client, handles errors, formats the result using inherited methods from BaseTools.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"), ); }