list_flows
Retrieve and filter all user workflows by status (active, paused, stopped, draft) with optional result limits. Integrates with HiveFlow MCP Server for AI-driven automation flow management.
Instructions
Lista todos los flujos de trabajo del usuario
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Límite de resultados (opcional) | |
| status | No | Filtrar por estado del flujo (opcional) |
Input Schema (JSON Schema)
{
"properties": {
"limit": {
"default": 50,
"description": "Límite de resultados (opcional)",
"type": "number"
},
"status": {
"description": "Filtrar por estado del flujo (opcional)",
"enum": [
"active",
"paused",
"stopped",
"draft"
],
"type": "string"
}
},
"type": "object"
}
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 the results into a bullet-point text list, and returns it as MCP content.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)Registration of the 'list_flows' tool in the ListToolsRequestSchema handler, including name, description, and input schema definition.{ 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:74-88 (schema)Input schema definition for the 'list_flows' tool, specifying optional 'status' filter (enum) and 'limit' parameters.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 (handler)Dispatch case in the main CallToolRequestSchema handler that routes 'list_flows' calls to the listFlows method.case 'list_flows': return await this.listFlows(args);