get_workflow_versions
Retrieve all available versions of a specific workflow by providing its unique ID, enabling users to manage and select appropriate workflow iterations.
Instructions
List all available versions of a workflow
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflow_id | Yes |
Implementation Reference
- src/index.ts:866-891 (handler)The main handler function for get_workflow_versions tool. Parses input, retrieves the workflow, lists 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), }, ], }; }
- src/index.ts:76-78 (schema)Zod input schema requiring a workflow_id string parameter.const GetWorkflowVersionsSchema = z.object({ workflow_id: z.string(), });
- src/index.ts:296-300 (registration)Tool registration in the list of available tools, 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)Dispatcher switch case that routes 'get_workflow_versions' tool calls to the handler method.case 'get_workflow_versions': return await this.getWorkflowVersions(args);