create_workflow_definition
Create or update workflow definitions in Conductor to automate business processes and orchestrate tasks.
Instructions
Create or update a workflow definition. If the workflow already exists, it will be updated.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"definition": "<definition>"
},
"name": "create_workflow_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| definition | Yes | Complete workflow definition as a JSON object | |
| overwrite | No | Overwrite existing definition (default: true) |
Implementation Reference
- src/index.ts:433-451 (schema)Tool schema definition including name, description, input schema with required 'definition' object and optional 'overwrite' boolean.
{ name: "create_workflow_definition", description: "Create or update a workflow definition. If the workflow already exists, it will be updated.", inputSchema: { type: "object", properties: { definition: { type: "object", description: "Complete workflow definition as a JSON object", }, overwrite: { type: "boolean", description: "Overwrite existing definition (default: true)", }, }, required: ["definition"], }, }, - src/index.ts:1035-1054 (handler)Handler function that executes the tool: extracts 'definition' and 'overwrite' from args, sends POST request to Conductor's /metadata/workflow endpoint, and returns a success message.
case "create_workflow_definition": { const { definition, overwrite = true } = args as any; const response = await conductorClient.post( `/metadata/workflow`, definition, { params: { overwrite }, } ); return { content: [ { type: "text", text: `Workflow definition created/updated successfully.`, }, ], }; } - src/index.ts:598-602 (registration)Registration via the tools array returned in ListToolsRequestHandler, which includes the create_workflow_definition tool.
server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools, }; });