get_flow_executions
Retrieve execution history for a specific automation flow to monitor performance and track past runs.
Instructions
Obtiene el historial de ejecuciones de un flujo
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| flowId | Yes | ID del flujo | |
| limit | No | Límite de resultados |
Implementation Reference
- src/index.js:743-784 (handler)The handler function that retrieves the execution history (processes) for a given flowId from the HiveFlow API, formats it as a formatted text list, and returns it in the MCP response format. Handles errors gracefully.async getFlowExecutions(args) { try { const response = await this.hiveflowClient.get(`/api/flows/${args.flowId}/processes`, { params: { limit: args.limit || 10 } }); if (response.data && response.data.success) { const processes = response.data.processes || []; const executionsList = processes.map(process => `• ${process.processId || process._id} - Estado: ${process.status} - ${process.startTime} ${process.endTime ? `(${process.duration}ms)` : '(en progreso)'}` ).join('\n'); return { content: [ { type: 'text', text: `📈 Ejecuciones del flujo (${processes.length}):\n\n${executionsList || 'No hay ejecuciones'}` } ] }; } else { return { content: [ { type: 'text', text: `❌ Error: ${response.data?.message || 'No se pudieron obtener las ejecuciones'}` } ] }; } } catch (error) { return { content: [ { type: 'text', text: `❌ Error de conexión: ${error.message}` } ] }; } }
- src/index.js:185-203 (registration)The tool registration entry in the ListToolsRequestSchema handler, defining the name, description, and input schema (with flowId required and limit optional).{ name: 'get_flow_executions', description: 'Obtiene el historial de ejecuciones de un flujo', inputSchema: { type: 'object', properties: { flowId: { type: 'string', description: 'ID del flujo' }, limit: { type: 'number', description: 'Límite de resultados', default: 10 } }, required: ['flowId'] } }
- src/index.js:188-202 (schema)The input schema definition for the get_flow_executions tool, specifying parameters and validation.inputSchema: { type: 'object', properties: { flowId: { type: 'string', description: 'ID del flujo' }, limit: { type: 'number', description: 'Límite de resultados', default: 10 } }, required: ['flowId'] }
- src/index.js:230-231 (helper)The switch case in the CallToolRequestSchema handler that routes calls to the getFlowExecutions method.case 'get_flow_executions': return await this.getFlowExecutions(args);