get-story
Retrieve a Shortcut story using its public ID to access project management details and information.
Instructions
Get a Shortcut story by public ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| storyPublicId | Yes | The public ID of the story to get |
Implementation Reference
- src/tools/stories.ts:446-456 (handler)The handler function for the 'get-story' tool. It fetches the story using the Shortcut client, throws an error if not found, and returns a formatted result using toResult and entityWithRelatedEntities.async getStory(storyPublicId: number) { const story = await this.client.getStory(storyPublicId); if (!story) throw new Error(`Failed to retrieve Shortcut story with public ID: ${storyPublicId}.`); return this.toResult( `Story: sc-${storyPublicId}`, await this.entityWithRelatedEntities(story, "story"), ); }
- src/tools/stories.ts:22-29 (registration)Registration of the 'get-story' MCP tool using server.tool, specifying name, description, input schema, and handler.server.tool( "get-story", "Get a Shortcut story by public ID", { storyPublicId: z.number().positive().describe("The public ID of the story to get"), }, async ({ storyPublicId }) => await tools.getStory(storyPublicId), );
- src/tools/stories.ts:25-27 (schema)Zod input schema for the 'get-story' tool, validating storyPublicId as a positive number.{ storyPublicId: z.number().positive().describe("The public ID of the story to get"), },