Skip to main content
Glama

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
NameRequiredDescriptionDefault
storyPublicIdYesThe public ID of the story to get

Implementation Reference

  • 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"), ); }
  • 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), );
  • 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"), },

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