task_info
Retrieve detailed information about a task using its unique ID, enabling comprehensive tracking and management within the Task Manager MCP Server.
Instructions
A tool to retrieve full information about a task.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskID | Yes | The identifier of a task. |
Implementation Reference
- tools/task_info.ts:22-49 (handler)The main handler function for the 'task_info' tool. It retrieves tasks from the task database by the provided task IDs, collects any not found IDs, and optionally computes incomplete tasks in the tree. Returns structured content with tasks, not found tasks, and incomplete tasks order.export async function handleTaskInfo({ taskIDs }: TaskInfoArgs, taskDB: TaskDB, singleAgent: boolean) { const tasks = new Array<Task>() const notFoundTaskIDs = new Array<TaskID>() for (const taskID of taskIDs) { const task = taskDB.get(taskID) if (!task) { notFoundTaskIDs.push(taskID) continue } tasks.push(task) } const incompleteTaskIDs = notFoundTaskIDs.length === 0 ? taskDB.incompleteTasksInTree(taskIDs[0]).map((t) => t.taskID) : undefined const res = { tasks, notFoundTasks: notFoundTaskIDs, incompleteTasksIdealOrder: singleAgent ? incompleteTaskIDs : undefined, } return { content: [], structuredContent: res, } satisfies CallToolResult }
- tools/task_info.ts:7-20 (schema)Zod schema for task_info tool input (taskIDs array), type inference, TASK_INFO constant, and tool descriptor with inputSchema derived from the Zod schema.export const TaskInfoArgsSchema = z.object({ taskIDs: TaskIDSchema.array().min(1).describe('A list of task IDs to retrieve information for'), }) type TaskInfoArgs = z.infer<typeof TaskInfoArgsSchema> export const TASK_INFO = 'task_info' export const taskInfoTool = { name: TASK_INFO, title: 'Get task info', description: 'Returns full details for requested tasks', inputSchema: zodToJsonSchema(TaskInfoArgsSchema, { $refStrategy: 'none' }), }
- tools/index.ts:39-42 (registration)Registration of the 'task_info' tool in the central toolHandlers registry, mapping TASK_INFO to its handler and schema.[TASK_INFO]: { handler: handleTaskInfo, schema: TaskInfoArgsSchema, } satisfies ToolHandlerInfo,
- tools/index.ts:16-16 (registration)Inclusion of taskInfoTool in the exported tools array for non-single-agent mode.return [createTaskTool, decomposeTaskTool, updateTaskTool, taskInfoTool] as const
- tools/index.ts:19-19 (registration)Inclusion of taskInfoTool in the exported tools array for single-agent mode.return [createTaskTool, decomposeTaskTool, updateTaskTool, taskInfoTool, currentTaskTool] as const