get_flow_executions
Retrieve execution history of a specific flow on HiveFlow MCP Server, providing flow ID and optional limit to manage results efficiently.
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 implements the 'get_flow_executions' tool logic. It calls the HiveFlow API to fetch process/executions for a given flowId, formats them into a text list, and returns the response.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 (schema)The tool schema definition including name, description, and input schema for 'get_flow_executions' registered in the ListToolsRequestHandler.{ 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:230-231 (registration)The switch case registration in the CallToolRequestHandler that routes calls to the getFlowExecutions handler.case 'get_flow_executions': return await this.getFlowExecutions(args);