task_list
Retrieve and filter tasks from AI Ops Hub to manage operational workflows, supporting project-based organization and status tracking.
Instructions
Список задач
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Фильтр по проекту | |
| status | No | Статус (open/completed) |
Implementation Reference
- src/connectors/task-service.ts:46-73 (handler)Core handler function that loads tasks from a Markdown file, applies filters for project and status (open/completed), and returns the filtered list of tasks.async listTasks(project?: string, status?: string): Promise<Task[]> { try { console.log(`📋 Список задач (проект: ${project || 'все'}, статус: ${status || 'все'})`); const tasks = await this.loadTasks(); let filteredTasks = tasks; // Фильтр по проекту if (project) { filteredTasks = filteredTasks.filter(task => task.project === project); } // Фильтр по статусу if (status === 'open') { filteredTasks = filteredTasks.filter(task => !task.completed_at); } else if (status === 'completed') { filteredTasks = filteredTasks.filter(task => task.completed_at); } console.log(`✅ Найдено задач: ${filteredTasks.length}`); return filteredTasks; } catch (error) { console.error('Ошибка получения списка задач:', error); throw new Error(`Ошибка получения списка задач: ${error}`); } }
- src/server.ts:156-172 (schema)Input schema definition for the task_list tool, specifying optional project and status filters.name: 'task_list', description: 'Список задач', inputSchema: { type: 'object', properties: { project: { type: 'string', description: 'Фильтр по проекту', }, status: { type: 'string', description: 'Статус (open/completed)', enum: ['open', 'completed'], }, }, }, },
- src/server.ts:215-218 (registration)Registers the task_list tool handler in the MCP server's CallToolRequestHandler switch statement, delegating to TaskService.listTasks.case 'task_list': return { content: await this.taskService.listTasks(args.project as string, args.status as string) };
- src/connectors/task-service.ts:4-11 (schema)Type definition for Task objects returned by the task_list tool.export interface Task { id: number; title: string; project?: string; due?: string; created_at: string; completed_at?: string; }