Skip to main content
Glama
useshortcut

Shortcut MCP Server

Official
by useshortcut

epics-get-by-id

Retrieve a Shortcut epic using its public ID to access project management data, with options for full or slim field returns.

Instructions

Get a Shortcut epic by public ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
epicPublicIdYesThe public ID of the epic to get
fullNoTrue to return all epic fields from the API. False to return a slim version that excludes uncommon fields

Implementation Reference

  • The main handler function that executes the tool logic: fetches the epic by public ID from the Shortcut client, handles errors, and formats the result using inherited helper methods.
    async getEpic(epicPublicId: number, full = false) {
    	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", full),
    	);
    }
  • Input schema defined using Zod for validating tool parameters: epicPublicId (positive number) and optional full (boolean, default false).
    {
    	epicPublicId: z.number().positive().describe("The public ID of the epic to get"),
    	full: z
    		.boolean()
    		.optional()
    		.default(false)
    		.describe(
    			"True to return all epic fields from the API. False to return a slim version that excludes uncommon fields",
    		),
    },
  • Registers the "epics-get-by-id" tool on the CustomMcpServer with read access, description, input schema, and a handler that delegates to the getEpic method.
    server.addToolWithReadAccess(
    	"epics-get-by-id",
    	"Get a Shortcut epic by public ID",
    	{
    		epicPublicId: z.number().positive().describe("The public ID of the epic to get"),
    		full: z
    			.boolean()
    			.optional()
    			.default(false)
    			.describe(
    				"True to return all epic fields from the API. False to return a slim version that excludes uncommon fields",
    			),
    	},
    	async ({ epicPublicId, full }) => await tools.getEpic(epicPublicId, full),
    );

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/useshortcut/mcp-server-shortcut'

If you have feedback or need assistance with the MCP directory API, please join our Discord server