task_create
Create new tasks with titles, project assignments, and due dates to organize developer workflows within AI Ops Hub's task management system.
Instructions
Создать новую задачу
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Заголовок задачи | |
| project | No | Проект | |
| due | No | Срок выполнения (YYYY-MM-DD) |
Implementation Reference
- src/connectors/task-service.ts:20-44 (handler)Core handler function that implements the task_create tool logic: loads existing tasks from markdown file, generates new task with ID, persists the updated list, and returns the new task.async createTask(title: string, project?: string, due?: string): Promise<Task> { try { console.log(`✅ Создание задачи: ${title}`); const tasks = await this.loadTasks(); const newTask: Task = { id: this.getNextId(tasks), title, project, due, created_at: new Date().toISOString(), }; tasks.push(newTask); await this.saveTasks(tasks); console.log(`✅ Задача создана: ${title} (ID: ${newTask.id})`); return newTask; } catch (error) { console.error('Ошибка создания задачи:', error); throw new Error(`Ошибка создания задачи: ${error}`); } }
- src/server.ts:134-154 (schema)Input schema definition for the task_create tool in the stdio MCP server's listTools response.name: 'task_create', description: 'Создать новую задачу', inputSchema: { type: 'object', properties: { title: { type: 'string', description: 'Заголовок задачи', }, project: { type: 'string', description: 'Проект', }, due: { type: 'string', description: 'Срок выполнения (YYYY-MM-DD)', }, }, required: ['title'], }, },
- src/server.ts:210-213 (handler)Dispatch handler in stdio MCP server's CallToolRequestSchema that invokes TaskService.createTask for task_create tool calls.case 'task_create': return { content: await this.taskService.createTask(args.title as string, args.project as string, args.due as string) };
- src/connectors/task-service.ts:4-11 (schema)TypeScript interface defining the structure of Task objects used and returned by the task_create handler.export interface Task { id: number; title: string; project?: string; due?: string; created_at: string; completed_at?: string; }
- src/transports/http-transport.ts:246-248 (handler)Dispatch handler in HTTP transport's /call endpoint that invokes TaskService.createTask for task_create tool calls.case 'task_create': result = await this.taskService.createTask(args.title, args.project, args.due); break;