get_workflow
Retrieve complete workflow details including steps, context, metadata, and configuration. Shows draft status and summary when available for live workflows.
Instructions
Get full details of a workflow including all steps, context, metadata, and configuration. Also returns hasDraftSnapshot (boolean) and draftSnapshot summary if a draft exists for a live workflow.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The workflow ID |
Implementation Reference
- src/tools/workflows.ts:30-46 (handler)The 'get_workflow' MCP tool handler. It extracts the workflowId from the input and calls the client's getWorkflow method to retrieve and return the workflow details.
server.tool( 'get_workflow', `Get full details of a workflow including all steps, context, metadata, and configuration. Also returns hasDraftSnapshot (boolean) and draftSnapshot summary if a draft exists for a live workflow.`, { workflowId: z.string().describe('The workflow ID'), }, async ({ workflowId }, extra) => { const client = clientFactory(extra); const result = await client.getWorkflow(workflowId); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2), }], }; } - src/client.ts:93-95 (helper)The underlying HTTP request implementation for 'getWorkflow', which fetches workflow details from the /api/external/workflows/:id endpoint.
async getWorkflow(id: string) { return this.request(`/workflows/${id}`); }