Skip to main content
Glama

create_task

Generate and manage tasks on the MCP Orchestrator Server by defining unique IDs, descriptions, and task dependencies for efficient task orchestration.

Instructions

Create a new task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dependenciesNoIDs of tasks that must be completed first
descriptionYesDescription of the task
idYesUnique identifier for the task

Implementation Reference

  • Executes the create_task tool: extracts arguments, validates task ID uniqueness and dependencies, creates and persists the task to JSON file, returns task details.
    case "create_task": { const { id, description, dependencies } = request.params.arguments as { id: string; description: string; dependencies?: string[]; }; debug(`Creating task ${id}: ${description}`); if (tasks[id]) { throw new McpError(ErrorCode.InvalidRequest, `Task ${id} already exists`); } // Verify dependencies exist if (dependencies) { for (const depId of dependencies) { if (!tasks[depId]) { throw new McpError(ErrorCode.InvalidRequest, `Dependency task ${depId} not found`); } } } const task: Task = { id, description, status: 'pending', dependencies }; tasks[id] = task; saveTasks(); debug(`Created task ${id}`); return { content: [{ type: "text", text: JSON.stringify(task, null, 2) }] }; }
  • Defines the tool metadata including name, description, and input schema for validation in ListTools response.
    name: "create_task", description: "Create a new task", inputSchema: { type: "object", properties: { id: { type: "string", description: "Unique identifier for the task" }, description: { type: "string", description: "Description of the task" }, dependencies: { type: "array", items: { type: "string" }, description: "IDs of tasks that must be completed first" } }, required: ["id", "description"] }
  • TypeScript interface defining the structure of a Task object used by create_task and other tools.
    interface Task { id: string; description: string; status: 'pending' | 'in_progress' | 'completed'; assignedTo?: string; result?: string; dependencies?: string[]; }

Other Tools

Related Tools

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/mokafari/orchestrator-server'

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