create_flow
Design and initiate new automation workflows on HiveFlow using the create_flow tool. Define workflow names, descriptions, and optional nodes for streamlined task execution.
Instructions
Crea un nuevo flujo de trabajo en HiveFlow
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| description | Yes | Descripción del flujo | |
| name | Yes | Nombre del flujo | |
| nodes | No | Nodos del flujo (opcional) |
Input Schema (JSON Schema)
{
"properties": {
"description": {
"description": "Descripción del flujo",
"type": "string"
},
"name": {
"description": "Nombre del flujo",
"type": "string"
},
"nodes": {
"description": "Nodos del flujo (opcional)",
"items": {
"type": "object"
},
"type": "array"
}
},
"required": [
"name",
"description"
],
"type": "object"
}
Implementation Reference
- src/index.js:609-628 (handler)The handler function that implements the 'create_flow' tool. It sends a POST request to the HiveFlow API to create a new workflow with the provided name, description, and optional nodes, then returns a success message with the created flow's ID and status.async createFlow(args) { const response = await this.hiveflowClient.post('/api/flows', { name: args.name, description: args.description, nodes: args.nodes || [], edges: [], status: 'draft' }); const flow = response.data.data; return { content: [ { type: 'text', text: `✅ Flujo "${args.name}" creado exitosamente.\nID: ${flow._id}\nEstado: ${flow.status}` } ] }; }
- src/index.js:51-69 (schema)The input schema definition for the 'create_flow' tool, specifying required name and description fields, and optional nodes array.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:48-70 (registration)The tool registration in the ListTools handler, defining the 'create_flow' tool's name, description, and input 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'] } },
- src/index.js:214-215 (registration)The dispatch case in the central CallToolRequestSchema handler that routes 'create_flow' calls to the createFlow method.case 'create_flow': return await this.createFlow(args);