create_flow
Create new workflows in HiveFlow automation platform through AI assistants, enabling flow management with natural language commands.
Instructions
Crea un nuevo flujo de trabajo en HiveFlow
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Nombre del flujo | |
| description | Yes | Descripción del flujo | |
| nodes | No | Nodos del flujo (opcional) |
Implementation Reference
- src/index.js:325-342 (handler)The handler function that executes the create_flow tool logic by posting a new flow to the HiveFlow API endpoint /api/flows and returning a success message with the created flow's ID.async createFlow(args) { const response = await this.hiveflowClient.post('/api/flows', { name: args.name, description: args.description, nodes: args.nodes || [], edges: [], status: 'draft' }); return { content: [ { type: 'text', text: `✅ Flujo "${args.name}" creado exitosamente.\nID: ${response.data.flow._id}\nEstado: ${response.data.flow.status}` } ] }; }
- src/index.js:50-68 (schema)Input schema defining the parameters for the create_flow tool: required name and description (strings), optional nodes (array of objects).inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre del flujo' }, description: { type: 'string', description: 'Descripción del flujo' }, nodes: { type: 'array', description: 'Nodos del flujo (opcional)', items: { type: 'object' } } }, required: ['name', 'description'] }
- src/index.js:213-214 (registration)Registration of the create_flow handler in the switch statement within the CallToolRequestSchema handler, dispatching calls to the createFlow method.case 'create_flow': return await this.createFlow(args);
- src/index.js:47-69 (registration)Tool registration in the ListToolsRequestSchema response, listing create_flow with its name, description, and schema.{ name: 'create_flow', description: 'Crea un nuevo flujo de trabajo en HiveFlow', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Nombre del flujo' }, description: { type: 'string', description: 'Descripción del flujo' }, nodes: { type: 'array', description: 'Nodos del flujo (opcional)', items: { type: 'object' } } }, required: ['name', 'description'] } },