Skip to main content
Glama

get-iteration-stories

Retrieve stories from a specific Shortcut iteration using its public ID, with optional story descriptions for detailed project tracking.

Instructions

Get stories in a specific iteration by iteration public ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iterationPublicIdYesThe public ID of the iteration
includeStoryDescriptionsNoIndicate whether story descriptions should be included. Including descriptions may take longer and will increase the size of the response.

Implementation Reference

  • The handler function that implements the core logic of the 'get-iteration-stories' tool. It fetches stories from a Shortcut iteration using the client and returns a formatted result.
    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"), ); }
  • Zod schema defining the input parameters for the tool: required iterationPublicId (positive number) and optional includeStoryDescriptions (boolean, default false).
    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.", ), },
  • Registers the 'get-iteration-stories' tool with the MCP server, providing name, description, input schema, and a handler that delegates to the getIterationStories method.
    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), );

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