execute_flow
Execute a specific workflow by providing its ID and optional inputs to trigger automation processes through the HiveFlow platform.
Instructions
Ejecuta un flujo de trabajo específico
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flowId | Yes | ID del flujo a ejecutar | |
| inputs | No | Inputs opcionales para el flujo |
Implementation Reference
- src/index.js:380-393 (handler)The executeFlow handler function that sends a POST request to the HiveFlow API to execute the specified flow and returns a success message with execution details.async executeFlow(args) { const response = await this.hiveflowClient.post(`/api/flows/${args.flowId}/execute`, { inputs: args.inputs || {} }); return { content: [ { type: 'text', text: `🚀 Flujo ejecutado exitosamente.\nExecution ID: ${response.data.executionId || 'N/A'}\nEstado: ${response.data.status || 'iniciado'}` } ] }; }
- src/index.ts:390-402 (handler)The executeFlow handler function (TypeScript version) that sends a POST request to the HiveFlow API to execute the specified flow and returns a success message with execution details.private async executeFlow(args: any) { const response = await this.hiveflowClient.post(`/api/flows/${args.flowId}/execute`, { inputs: args.inputs || {} }); return { content: [ { type: 'text', text: `🚀 Flujo ejecutado exitosamente.\nExecution ID: ${response.data.executionId || 'N/A'}\nEstado: ${response.data.status || 'iniciado'}` } ] };
- src/index.js:104-119 (schema)The input schema for the execute_flow tool, defining required flowId and optional inputs object.name: 'execute_flow', description: 'Ejecuta un flujo de trabajo específico', inputSchema: { type: 'object', properties: { flowId: { type: 'string', description: 'ID del flujo a ejecutar' }, inputs: { type: 'object', description: 'Inputs opcionales para el flujo' } }, required: ['flowId'] }
- src/index.js:219-220 (registration)The switch case in CallToolRequestHandler that dispatches to the executeFlow handler when 'execute_flow' is called.case 'execute_flow': return await this.executeFlow(args);
- src/index.ts:229-230 (registration)The switch case (TypeScript) in CallToolRequestHandler that dispatches to the executeFlow handler.case 'execute_flow': return await this.executeFlow(args);