execute_flow
Executes a specific workflow on the HiveFlow MCP Server by providing the workflow ID and optional inputs, enabling AI assistants to automate tasks via the platform.
Instructions
Ejecuta un flujo de trabajo específico
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flowId | Yes | ID del flujo a ejecutar | |
| inputs | No | Inputs opcionales para el flujo |
Input Schema (JSON Schema)
{
"properties": {
"flowId": {
"description": "ID del flujo a ejecutar",
"type": "string"
},
"inputs": {
"description": "Inputs opcionales para el flujo",
"type": "object"
}
},
"required": [
"flowId"
],
"type": "object"
}
Implementation Reference
- src/index.js:666-679 (handler)The main handler function for the 'execute_flow' tool. It sends a POST request to the HiveFlow API endpoint `/api/flows/{flowId}/execute` with optional inputs and returns a formatted success message including execution ID and status.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.js:104-121 (schema)Input schema definition for the 'execute_flow' tool, registered in the ListToolsRequestSchema handler. Requires 'flowId' string and accepts 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:220-221 (registration)Registration/routing in the CallToolRequestSchema switch statement that dispatches 'execute_flow' tool calls to the executeFlow handler method.case 'execute_flow': return await this.executeFlow(args);