Skip to main content
Glama

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
NameRequiredDescriptionDefault
projectNoФильтр по проекту
statusNoСтатус (open/completed)

Implementation Reference

  • 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}`);
      }
    }
  • 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)
      };
  • 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;
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Galiusbro/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server