Skip to main content
Glama
blizzy78
by blizzy78

create_task

Create new tasks with detailed specifications, complexity assessments, and completion criteria to manage and track work within the Task Manager system.

Instructions

Creates a new task that must be executed. If decomposing a complex task is required, must use 'decompose_task' first before executing it. All tasks start in the todo status. Must use 'update_task' before executing this task, and when executing this task has finished.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesA concise title for this task. Must be understandable out of context
descriptionYesA detailed description of this task. Must be understandable out of context
goalYesThe overall goal of this task. Must be understandable out of context
criticalPathYesWhether this task is on the critical path and required for completion
definitionsOfDoneYesA detailed list of criteria that must be met for this task to be considered 'complete'. Must be understandable out of context.
uncertaintyAreasYesA detailed list of areas where there is uncertainty about this task's requirements or execution. Must be understandable out of context. May be empty.
estimatedComplexityYesAn estimate of the complexity of this task. All tasks with complexity higher than low must be decomposed into smaller, more manageable subtasks before execution. Caution: Don't underestimate complexity.

Implementation Reference

  • The handler function that creates a new task object, stores it in the task database, optionally sets it as the current task for single-agent mode, computes incomplete tasks in the tree, and returns a CallToolResult with content (text warning if decomposition needed, resource link) and structured content with task info.
    export async function handleCreateTask( { title, description, goal, definitionsOfDone, criticalPath, uncertaintyAreas, estimatedComplexity }: CreateTaskArgs, taskDB: TaskDB, singleAgent: boolean ) { const task = { taskID: newTaskID(), status: TodoStatus, dependsOnTaskIDs: [], title, description, goal, definitionsOfDone, criticalPath: !!criticalPath, uncertaintyAreas, estimatedComplexity, lessonsLearned: [], verificationEvidence: [], } satisfies Task taskDB.set(task.taskID, task) if (singleAgent) { taskDB.setCurrentTask(task.taskID) } const incompleteTaskIDs = taskDB.incompleteTasksInTree(task.taskID).map((t) => t.taskID) const res = { taskCreated: toBasicTaskInfo(task, false, false, true), incompleteTasksIdealOrder: singleAgent ? incompleteTaskIDs : undefined, } return { content: [ mustDecompose(task) && ({ type: 'text', text: "Task must be decomposed before execution, use 'decompose_task' tool", audience: ['assistant'], } satisfies TextContent), { type: 'resource_link', uri: `task://${task.taskID}`, name: task.taskID, title: task.title, annotations: { audience: ['assistant'], priority: 1, }, } satisfies ResourceLink, ].filter(Boolean), structuredContent: res, } satisfies CallToolResult }
  • Zod schema defining the input arguments for the create_task tool, extending SimpleTaskSchema with estimatedComplexity field.
    export const CreateTaskArgsSchema = SimpleTaskSchema.extend({ estimatedComplexity: TaskComplexitySchema, })
  • Tool definition object createTaskTool used for listing tools (via tools() in index.ts), including name, title, description, and inputSchema derived from CreateTaskArgsSchema.
    export const createTaskTool = { name: CREATE_TASK, title: 'Create task', description: `Creates a new task that must be executed. If decomposing a complex task is required, must use 'decompose_task' first before executing it. All tasks start in the todo status. Must use 'update_task' before executing this task, and when executing this task has finished.`, inputSchema: zodToJsonSchema(CreateTaskArgsSchema, { $refStrategy: 'none' }), }
  • tools/index.ts:24-27 (registration)
    Registration of the create_task tool handler and schema in the toolHandlers() map, used by task_manager.ts to dispatch tool calls.
    [CREATE_TASK]: { handler: handleCreateTask, schema: CreateTaskArgsSchema, } satisfies ToolHandlerInfo,
  • tools/index.ts:14-19 (registration)
    The tools() function returns an array of tool objects including createTaskTool, used for the listTools MCP request.
    export function tools(singleAgent: boolean) { if (!singleAgent) { return [createTaskTool, decomposeTaskTool, updateTaskTool, taskInfoTool] as const } return [createTaskTool, decomposeTaskTool, updateTaskTool, taskInfoTool, currentTaskTool] as const

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/blizzy78/mcp-task-manager'

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