delete_checklist_item
Delete a specific checklist item from a task. Use this action to remove completed or unnecessary entries and keep your task lists organized.
Instructions
Delete a checklist item.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | Yes | ||
| itemId | Yes |
Implementation Reference
- index.js:421-424 (handler)The handler function that executes the 'delete_checklist_item' tool logic. It calls the Habitica API DELETE endpoint for the checklist item and returns a success message.
delete_checklist_item: async ({ taskId, itemId }) => { await api("DELETE", `/tasks/${taskId}/checklist/${itemId}`); return ok(`Deleted checklist item ${itemId}.`); }, - index.js:214-225 (schema)The input schema definition for 'delete_checklist_item'. Defines required string parameters 'taskId' and 'itemId'.
{ name: "delete_checklist_item", description: "Delete a checklist item.", inputSchema: { type: "object", properties: { taskId: { type: "string" }, itemId: { type: "string" }, }, required: ["taskId", "itemId"], }, }, - index.js:480-492 (registration)Tool registration via MCP SDK. The 'tools' array is returned by ListToolsRequestSchema handler, and the 'handlers' object is dispatched by CallToolRequestSchema handler by name lookup.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools })); server.setRequestHandler(CallToolRequestSchema, async (req) => { const { name, arguments: args = {} } = req.params; const fn = handlers[name]; if (!fn) throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`); try { return await fn(args); } catch (err) { if (err instanceof McpError) throw err; throw new McpError(ErrorCode.InternalError, err?.message ?? String(err)); } });