list_flows
Retrieve and filter user workflows from HiveFlow automation platform by status and limit results for management.
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.ts:354-374 (handler)The handler function for the 'list_flows' tool. It constructs query parameters from input args (status and limit), fetches the list of flows from the HiveFlow API, formats them into a bullet-point text list, and returns the response in MCP format.private async listFlows(args: any) { const params: any = {}; 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.flows || []; const flowsList = flows.map((flow: any) => `• ${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.ts:83-97 (schema)Input schema for the 'list_flows' tool, defining optional parameters: status (enum of flow states) and limit (number, default 50). Used for validation in tool calls.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.ts:80-98 (registration)Registration of the 'list_flows' tool in the MCP server's listTools response, including name, description, and input schema.{ 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.ts:225-226 (registration)Dispatch/registration in the switch statement of the CallToolRequestSchema handler that routes 'list_flows' calls to the listFlows method.case 'list_flows': return await this.listFlows(args);