Skip to main content
Glama

update_checklist_item

Modify an existing task in a structured checklist by updating its description, details, plan, or completion status to track progress on complex projects.

Instructions

Updates an existing checklist item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesThe index of the checklist item to update (0-based)
taskNoA short yet comprehensive name for the task
detailed_descriptionNoA longer description about what we want to achieve with this task
context_and_planNoRelated information, files the agent should read, and more details from other tasks, as well as a detailed plan for this task
doneNoWhether the task is completed

Implementation Reference

  • The handler function for the 'update_checklist_item' tool. It reads the task data, validates the index, updates the specified fields of the checklist item at that index (task, detailed_description, context_and_plan, done), recalculates progress, and writes back to the config file.
    private async updateChecklistItem(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}`); } // Update the checklist item if (args.task !== undefined) { taskData.checklist[args.index].task = args.task; } if (args.detailed_description !== undefined) { taskData.checklist[args.index].detailed_description = args.detailed_description; } if (args.context_and_plan !== undefined) { taskData.checklist[args.index].context_and_plan = args.context_and_plan; } if (args.done !== undefined) { taskData.checklist[args.index].done = args.done; } // Write the updated task data to the file await this.writeTaskData(taskData); return { content: [ { type: 'text', text: 'Checklist item updated successfully.', }, ], }; } catch (error) { console.error('Error updating checklist item:', error); return { content: [ { type: 'text', text: `Error updating checklist item: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
  • The input schema definition for the 'update_checklist_item' tool, specifying the parameters including required index and optional fields to update.
    { name: 'update_checklist_item', description: 'Updates an existing checklist item.', inputSchema: { type: 'object', properties: { index: { type: 'number', description: 'The index of the checklist item to update (0-based)' }, task: { type: 'string', description: 'A short yet comprehensive name for the task' }, detailed_description: { type: 'string', description: 'A longer description about what we want to achieve with this task' }, context_and_plan: { type: 'string', description: 'Related information, files the agent should read, and more details from other tasks, as well as a detailed plan for this task' }, done: { type: 'boolean', description: 'Whether the task is completed' } }, required: ['index'] }
  • src/index.ts:432-433 (registration)
    The switch case in the CallToolRequestSchema handler that dispatches calls to the updateChecklistItem method.
    case 'update_checklist_item': return await this.updateChecklistItem(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