current_task
Retrieve tasks currently in progress to monitor ongoing work and track task status within the Task Manager MCP Server.
Instructions
Returns a list of tasks that are currently in progress.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tools/current_task.ts:20-52 (handler)The main handler function for the 'current_task' tool. It retrieves the current task from TaskDB, gets all tasks in its tree and incomplete tasks, formats them, and returns structured content with a note to use task_info for details.export async function handleCurrentTask(_: CurrentTaskArgs, taskDB: TaskDB) { const currentTaskID = taskDB.getCurrentTask() if (!currentTaskID) { const res = { tasks: [] } return { content: [], structuredContent: res, } satisfies CallToolResult } const tasksInTree = taskDB.getAllInTree(currentTaskID) const incompleteTaskIDs = taskDB.incompleteTasksInTree(currentTaskID).map((t) => t.taskID) const res = { tasks: tasksInTree.map((t) => toBasicTaskInfo(t, true, t.status !== DoneStatus && t.status !== FailedStatus, t.status === TodoStatus) ), incompleteTasksIdealOrder: incompleteTaskIDs, } return { content: [ { type: 'text', text: "Use 'task_info' tool to retrieve full task details", audience: ['assistant'], } satisfies TextContent, ], structuredContent: res, } satisfies CallToolResult }
- tools/current_task.ts:7-9 (schema)Zod schema definition for the input arguments of the current_task tool, which takes no parameters.export const CurrentTaskArgsSchema = z.object({}) type CurrentTaskArgs = z.infer<typeof CurrentTaskArgsSchema>
- tools/current_task.ts:11-18 (registration)Tool definition object with name, title, description, and JSON schema for input, used for MCP tool registration.export const CURRENT_TASK = 'current_task' export const currentTaskTool = { name: CURRENT_TASK, title: 'Get current task', description: 'Returns a list of tasks that are currently in progress.', inputSchema: zodToJsonSchema(CurrentTaskArgsSchema, { $refStrategy: 'none' }), }
- tools/index.ts:44-47 (registration)Registers the 'current_task' tool handler and schema in the central toolHandlers map.[CURRENT_TASK]: { handler: handleCurrentTask, schema: CurrentTaskArgsSchema, } satisfies ToolHandlerInfo,
- task_db.ts:19-21 (helper)TaskDB helper method to retrieve the ID of the current task, directly called by the handler.getCurrentTask(): TaskID | null { return this.currentTaskID }