list_flows
Retrieve and filter user workflows from the HiveFlow automation platform by status, enabling management of automation flows through AI assistants.
Instructions
Lista todos los flujos de trabajo del usuario
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filtrar por estado del flujo (opcional) | |
| limit | No | LΓmite de resultados (opcional) |
Implementation Reference
- src/index.js:630-650 (handler)The main handler function for the 'list_flows' tool. It constructs query parameters from input args, fetches the list of flows from the HiveFlow API endpoint '/api/flows', formats them into a bullet-point text list, and returns a formatted text response.async listFlows(args) { const params = {}; if (args.status) params.status = args.status; if (args.limit) params.limit = args.limit; const response = await this.hiveflowClient.get('/api/flows', { params }); const flows = response.data.data || []; const flowsList = flows.map(flow => `β’ ${flow.name} (${flow._id}) - Estado: ${flow.status || 'draft'}` ).join('\n'); return { content: [ { type: 'text', text: `π Flujos encontrados (${flows.length}):\n\n${flowsList || 'No hay flujos disponibles'}` } ] }; }
- src/index.js:71-89 (registration)The tool registration in the ListToolsRequestSchema handler, defining the name, description, and input schema for the 'list_flows' tool.{ name: 'list_flows', description: 'Lista todos los flujos de trabajo del usuario', inputSchema: { type: 'object', properties: { status: { type: 'string', enum: ['active', 'paused', 'stopped', 'draft'], description: 'Filtrar por estado del flujo (opcional)' }, limit: { type: 'number', description: 'LΓmite de resultados (opcional)', default: 50 } } } },
- src/index.js:216-217 (registration)The switch case in the CallToolRequestSchema handler that dispatches calls to the 'list_flows' tool by invoking the listFlows method.case 'list_flows': return await this.listFlows(args);