get-story
Retrieve detailed information about a specific Shortcut story using its public ID to access project management data and task details.
Instructions
Get a Shortcut story by public ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| storyPublicId | Yes | The public ID of the story to get |
Input Schema (JSON Schema)
{
"properties": {
"storyPublicId": {
"description": "The public ID of the story to get",
"exclusiveMinimum": 0,
"type": "number"
}
},
"required": [
"storyPublicId"
],
"type": "object"
}
Implementation Reference
- src/tools/stories.ts:22-29 (registration)Registers the "get-story" tool with MCP server, providing description, input schema (storyPublicId), and handler that calls the getStory method.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 schema for input parameters of the get-story tool: storyPublicId as positive number.{ storyPublicId: z.number().positive().describe("The public ID of the story to get"), },
- src/tools/stories.ts:446-456 (handler)The main handler logic for get-story tool: fetches the story via client.getStory, handles not found error, and returns 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"), ); }