Skip to main content
Glama

workflows-get-by-id

Retrieve a specific workflow from Shortcut project management using its public ID. Returns either full workflow details or a slim version based on your needs.

Instructions

Get a Shortcut workflow by public ID

Input Schema

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

Implementation Reference

  • Handler function that fetches the workflow by public ID using the Shortcut client, handles not found case, and formats the response with related entities.
    async getWorkflow(workflowPublicId: number, full = false) { const workflow = await this.client.getWorkflow(workflowPublicId); if (!workflow) return this.toResult(`Workflow with public ID: ${workflowPublicId} not found.`); return this.toResult( `Workflow: ${workflow.id}`, await this.entityWithRelatedEntities(workflow, "workflow", full), ); }
  • Registers the 'workflows-get-by-id' tool on the CustomMcpServer with input schema and lambda handler delegating to getWorkflow method.
    server.addToolWithReadAccess( "workflows-get-by-id", "Get a Shortcut workflow by public ID", { workflowPublicId: z.number().positive().describe("The public ID of the workflow to get"), full: z .boolean() .optional() .default(false) .describe( "True to return all workflow fields from the API. False to return a slim version that excludes uncommon fields", ), }, async ({ workflowPublicId, full }) => await tools.getWorkflow(workflowPublicId, full), );
  • Zod input schema defining parameters: workflowPublicId (required positive number) and full (optional boolean, default false).
    { workflowPublicId: z.number().positive().describe("The public ID of the workflow to get"), full: z .boolean() .optional() .default(false) .describe( "True to return all workflow fields from the API. False to return a slim version that excludes uncommon fields", ), },
  • Calls helper method to enrich the workflow entity with related entities, used in the response formatting.
    await this.entityWithRelatedEntities(workflow, "workflow", 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