Skip to main content
Glama

get_workflow_versions

Retrieve all available versions of a workflow to manage updates, track changes, or revert to previous iterations.

Instructions

List all available versions of a workflow

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_idYes

Implementation Reference

  • The main handler function that implements the get_workflow_versions tool logic: parses input, retrieves the workflow and its versions from storage, and returns formatted response.
    private async getWorkflowVersions(args: unknown) { const parsed = GetWorkflowVersionsSchema.parse(args); const workflow = await this.storage.get(parsed.workflow_id); if (!workflow) { throw new Error(`Workflow not found: ${parsed.workflow_id}`); } const versions = await this.storage.listVersions(parsed.workflow_id); return { content: [ { type: 'text', text: JSON.stringify({ success: true, workflow_id: parsed.workflow_id, workflow_name: workflow.name, current_version: workflow.version, available_versions: versions, version_count: versions.length, }, null, 2), }, ], }; }
  • Zod schema defining the input: workflow_id (string).
    const GetWorkflowVersionsSchema = z.object({ workflow_id: z.string(), });
  • src/index.ts:297-300 (registration)
    Tool registration in the getTools() method, including name, description, and input schema.
    name: 'get_workflow_versions', description: 'List all available versions of a workflow', inputSchema: zodToJsonSchema(GetWorkflowVersionsSchema), },
  • src/index.ts:136-137 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes to the getWorkflowVersions method.
    case 'get_workflow_versions': return await this.getWorkflowVersions(args);

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/FiveOhhWon/workflows-mcp'

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