Skip to main content
Glama

mark_task_done

Mark a checklist item as completed to track progress in task breakdown workflows. Specify the item index to update its status.

Instructions

Marks a checklist item as done.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesThe index of the checklist item to mark as done (0-based)

Implementation Reference

  • The handler function for 'mark_task_done' tool. It validates the index, reads the task data from config file, sets the checklist item's 'done' to true, updates progress metadata, writes back to file, and returns success message.
    private async markTaskDone(args: any): Promise<any> { if (args?.index === undefined) { throw new McpError(ErrorCode.InvalidParams, 'Index is required'); } try { const taskData = await this.readTaskData(); // Check if the index is valid if (args.index < 0 || args.index >= taskData.checklist.length) { throw new McpError(ErrorCode.InvalidParams, `Invalid index: ${args.index}`); } // Mark the checklist item as done taskData.checklist[args.index].done = true; // Write the updated task data to the file await this.writeTaskData(taskData); return { content: [ { type: 'text', text: 'Task marked as done.', }, ], }; } catch (error) { console.error('Error marking task as done:', error); return { content: [ { type: 'text', text: `Error marking task as done: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
  • Input schema for the 'mark_task_done' tool, requiring a 0-based index of the checklist item.
    inputSchema: { type: 'object', properties: { index: { type: 'number', description: 'The index of the checklist item to mark as done (0-based)' } }, required: ['index'] }
  • src/index.ts:264-277 (registration)
    Registration of the 'mark_task_done' tool in the ListTools response, defining name, description, and input schema.
    { name: 'mark_task_done', description: 'Marks a checklist item as done.', inputSchema: { type: 'object', properties: { index: { type: 'number', description: 'The index of the checklist item to mark as done (0-based)' } }, required: ['index'] } },
  • src/index.ts:434-435 (registration)
    Dispatch case in the CallToolRequest handler that routes 'mark_task_done' calls to the markTaskDone method.
    case 'mark_task_done': return await this.markTaskDone(request.params.arguments);

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/landicefu/divide-and-conquer-mcp-server'

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