Skip to main content
Glama

list-workflows

Retrieve all workflows from Shortcut project management using the MCP server for streamlined integration with AI tools via API token.

Instructions

List all Shortcut workflows

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • Registration of the "workflows-list" MCP tool, which invokes the listWorkflows() handler to list all workflows.
    server.addToolWithReadAccess( "workflows-list", "List all Shortcut workflows", async () => await tools.listWorkflows(), );
  • Handler function listWorkflows() that executes the core logic: retrieves all workflows using the Shortcut client and returns formatted result using base helpers.
    async listWorkflows() { const workflows = await this.client.getWorkflows(); if (!workflows.length) return this.toResult(`No workflows found.`); return this.toResult( `Result (first ${workflows.length} shown of ${workflows.length} total workflows found):`, await this.entitiesWithRelatedEntities(workflows, "workflows"), ); }
  • Helper method used by listWorkflows to simplify and enrich workflows with related entities before returning.
    protected async entitiesWithRelatedEntities( entities: ( | Story | StorySearchResult | StorySlim | Epic | EpicSearchResult | Iteration | IterationSlim | Group | Workflow | ObjectiveSearchResult | Milestone )[], entityType = "entities", ) { const relatedEntities = await Promise.all( entities.map((entity) => this.getRelatedEntities(entity, "list")), ); return { [entityType]: entities.map((entity) => this.getSimplifiedEntity(entity, "list")), relatedEntities: this.mergeRelatedEntities(relatedEntities), }; }
  • Helper method used to format the tool response as MCP CallToolResult with text and JSON.
    protected toResult( message: string, data?: unknown, paginationToken?: string | null | undefined, ): CallToolResult { return { content: [ { type: "text", text: `${message}${data !== undefined ? `\n\n<json>\n${JSON.stringify(data, null, 2)}\n</json>${paginationToken ? `\n\n<next-page-token>${paginationToken}</next-page-token>` : ""}` : ""}`, }, ], }; }
  • src/server.ts:52-52 (registration)
    Invocation of WorkflowTools.create which performs all workflow tool registrations including workflows-list.
    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/useshortcut/mcp-server-shortcut'

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