Skip to main content
Glama

update_checklist_item

Modify a task in the checklist by updating its details, description, context, or completion status. Supports structured task management for AI agents.

Instructions

Updates an existing checklist item.

Input Schema

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

Implementation Reference

  • The main handler function for the 'update_checklist_item' tool. It reads the task data, validates the index, updates the specified fields of the checklist item (task, detailed_description, context_and_plan, done), writes back to file, and returns success or error response.
    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, including properties for index (required), task, detailed_description, context_and_plan, done.
    { 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 CallToolRequestHandler that routes calls to the updateChecklistItem handler 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