Skip to main content
Glama

get-workflow

Retrieve a Shortcut workflow using its public ID to access project management details and processes.

Instructions

Get a Shortcut workflow by public ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowPublicIdYesThe public ID of the workflow to get

Implementation Reference

  • The main handler function that fetches the workflow using the ShortcutClientWrapper, handles cases where the workflow is not found, and formats the result using helper methods from BaseTools.
    async getWorkflow(workflowPublicId: number) { 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"), ); }
  • Registers the "get-workflow" tool with the MCP server, specifying the name, description, input schema, and handler function.
    server.tool( "get-workflow", "Get a Shortcut workflow by public ID", { workflowPublicId: z.number().positive().describe("The public ID of the workflow to get") }, async ({ workflowPublicId }) => await tools.getWorkflow(workflowPublicId), );
  • Zod schema defining the input parameter for the get-workflow tool: a positive number for workflowPublicId.
    { workflowPublicId: z.number().positive().describe("The public ID of the workflow to get") },
  • src/server.ts:38-38 (registration)
    Calls WorkflowTools.create to initialize the tools instance and register all workflow-related tools, including get-workflow, with the MCP server.
    WorkflowTools.create(client, server);

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