Skip to main content
Glama
ampcome-mcps

Shortcut MCP Server

by ampcome-mcps

get-objective

Retrieve a Shortcut objective using its public ID to access project details and track progress within the MCP server.

Instructions

Get a Shortcut objective by public ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectivePublicIdYesThe public ID of the objective to get

Implementation Reference

  • Handler function that fetches the Shortcut objective (milestone) by public ID using the client, handles errors, and formats the result using base tool methods.
    async getObjective(objectivePublicId: number) {
    	const objective = await this.client.getMilestone(objectivePublicId);
    
    	if (!objective)
    		throw new Error(`Failed to retrieve Shortcut objective with public ID: ${objectivePublicId}`);
    
    	return this.toResult(
    		`Objective: ${objectivePublicId}`,
    		await this.entityWithRelatedEntities(objective, "objective"),
    	);
    }
  • Zod input schema defining the 'objectivePublicId' parameter for the get-objective tool.
    {
    	objectivePublicId: z.number().positive().describe("The public ID of the objective to get"),
    },
  • Registers the 'get-objective' tool with the MCP server, specifying name, description, input schema, and delegating to the getObjective handler.
    server.tool(
    	"get-objective",
    	"Get a Shortcut objective by public ID",
    	{
    		objectivePublicId: z.number().positive().describe("The public ID of the objective to get"),
    	},
    	async ({ objectivePublicId }) => await tools.getObjective(objectivePublicId),
    );

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