Skip to main content
Glama
blizzy78
by blizzy78

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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 }
  • 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>
  • 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,
  • TaskDB helper method to retrieve the ID of the current task, directly called by the handler.
    getCurrentTask(): TaskID | null { return this.currentTaskID }

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