Skip to main content
Glama

task_create

Create new tasks with titles, project assignments, and due dates to organize developer operational workflows and track progress efficiently.

Instructions

Создать новую задачу

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dueNoСрок выполнения (YYYY-MM-DD)
projectNoПроект
titleYesЗаголовок задачи

Implementation Reference

  • Core implementation of task_create tool: loads tasks from Markdown file, creates new Task with auto ID, appends and saves.
    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:133-154 (registration)
    Registers 'task_create' tool in MCP server's ListTools response, defining name, description, and input schema.
    { 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'], }, },
  • MCP CallToolRequest handler switch case: extracts arguments and calls TaskService.createTask.
    case 'task_create': return { content: await this.taskService.createTask(args.title as string, args.project as string, args.due as string) };
  • TypeScript interface defining the Task structure used in createTask implementation.
    export interface Task { id: number; title: string; project?: string; due?: string; created_at: string; completed_at?: string; }
  • Helper method to persist tasks to Markdown file, used by createTask.
    private async saveTasks(tasks: Task[]): Promise<void> { const content = this.generateMarkdownFromTasks(tasks); await fs.writeFile(this.tasksFile, content, 'utf-8'); }

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