Skip to main content
Glama

get-objective

Retrieve Shortcut project objectives using their public ID to access detailed information and manage project tracking.

Instructions

Get a Shortcut objective by public ID

Input Schema

NameRequiredDescriptionDefault
objectivePublicIdYesThe public ID of the objective to get

Input Schema (JSON Schema)

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

Implementation Reference

  • The handler function getObjective that retrieves the Shortcut objective (milestone) by its public ID using the injected client, handles missing objectives, and formats the result using inherited helper 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"), ); }
  • Registers the "get-objective" MCP tool with the server, providing the tool name, description, input schema (objectivePublicId as positive number), and a thin async handler that delegates to the getObjective method.
    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), );
  • Zod input schema for the get-objective tool, validating objectivePublicId as a positive number.
    { objectivePublicId: z.number().positive().describe("The public ID of the objective 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