Skip to main content
Glama

get-epic

Retrieve Shortcut epic details using the epic's public ID to access project information and track development progress.

Instructions

Get a Shortcut epic by public ID

Input Schema

NameRequiredDescriptionDefault
epicPublicIdYesThe public ID of the epic to get

Input Schema (JSON Schema)

{ "properties": { "epicPublicId": { "description": "The public ID of the epic to get", "exclusiveMinimum": 0, "type": "number" } }, "required": [ "epicPublicId" ], "type": "object" }

Implementation Reference

  • Core handler logic for 'get-epic': fetches epic by ID, handles missing epic, formats output with related entities using base helpers.
    async getEpic(epicPublicId: number) { const epic = await this.client.getEpic(epicPublicId); if (!epic) throw new Error(`Failed to retrieve Shortcut epic with public ID: ${epicPublicId}`); return this.toResult( `Epic: ${epicPublicId}`, await this.entityWithRelatedEntities(epic, "epic"), ); }
  • Registers the 'get-epic' tool with MCP server, including description, input schema, and reference to handler.
    server.tool( "get-epic", "Get a Shortcut epic by public ID", { epicPublicId: z.number().positive().describe("The public ID of the epic to get") }, async ({ epicPublicId }) => await tools.getEpic(epicPublicId), );
  • Input schema using Zod: requires positive integer epicPublicId.
    { epicPublicId: z.number().positive().describe("The public ID of the epic to get") },
  • BaseTools helper to create standardized MCP tool result with text message and optional JSON data.
    protected toResult(message: string, data?: unknown): CallToolResult { return { content: [ { type: "text", text: `${message}${data !== undefined ? `\n\n${JSON.stringify(data, null, 2)}` : ""}`, }, ], }; }
  • BaseTools helper to augment epic entity with related entities (users, teams, workflows, objectives) and standardize property names.
    protected async entityWithRelatedEntities( entity: | Story | StorySearchResult | StorySlim | Epic | EpicSearchResult | Iteration | IterationSlim | Group | Workflow | ObjectiveSearchResult | Milestone, entityType = "entity", ) { const relatedEntities = await this.getRelatedEntities(entity); return { [entityType]: this.renameEntityProps(entity as unknown as Record<string, unknown>), relatedEntities, }; }

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