Skip to main content
Glama
jhirono

Microsoft Todo MCP Service

delete-checklist-item

Remove a specific subtask from a task in Microsoft Todo by providing the task list ID, task ID, and checklist item ID to delete.

Instructions

Delete a checklist item (subtask) from a task. This removes just the specific subtask, not the parent task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
checklistItemIdYesID of the checklist item to delete
listIdYesID of the task list
taskIdYesID of the task

Implementation Reference

  • Handler function that authenticates using getAccessToken, constructs the Microsoft Graph API DELETE endpoint for the specified checklist item, executes the DELETE request via makeGraphRequest, and returns success or error message.
    async ({ listId, taskId, checklistItemId }) => { try { const token = await getAccessToken(); if (!token) { return { content: [ { type: "text", text: "Failed to authenticate with Microsoft API", }, ], }; } // Make a DELETE request to the Microsoft Graph API const url = `${MS_GRAPH_BASE}/me/todo/lists/${listId}/tasks/${taskId}/checklistItems/${checklistItemId}`; console.error(`Deleting checklist item: ${url}`); // The DELETE method doesn't return a response body, so we expect null await makeGraphRequest<null>( url, token, "DELETE" ); // If we get here, the delete was successful (204 No Content) return { content: [ { type: "text", text: `Checklist item with ID: ${checklistItemId} was successfully deleted from task: ${taskId}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error deleting checklist item: ${error}`, }, ], }; } }
  • Zod input schema defining the required parameters: listId, taskId, and checklistItemId for the delete-checklist-item tool.
    listId: z.string().describe("ID of the task list"), taskId: z.string().describe("ID of the task"), checklistItemId: z.string().describe("ID of the checklist item to delete") },
  • MCP server tool registration call for 'delete-checklist-item', including name, description, input schema, and handler function.
    server.tool( "delete-checklist-item", "Delete a checklist item (subtask) from a task. This removes just the specific subtask, not the parent task.", { listId: z.string().describe("ID of the task list"), taskId: z.string().describe("ID of the task"), checklistItemId: z.string().describe("ID of the checklist item to delete") }, async ({ listId, taskId, checklistItemId }) => { try { const token = await getAccessToken(); if (!token) { return { content: [ { type: "text", text: "Failed to authenticate with Microsoft API", }, ], }; } // Make a DELETE request to the Microsoft Graph API const url = `${MS_GRAPH_BASE}/me/todo/lists/${listId}/tasks/${taskId}/checklistItems/${checklistItemId}`; console.error(`Deleting checklist item: ${url}`); // The DELETE method doesn't return a response body, so we expect null await makeGraphRequest<null>( url, token, "DELETE" ); // If we get here, the delete was successful (204 No Content) return { content: [ { type: "text", text: `Checklist item with ID: ${checklistItemId} was successfully deleted from task: ${taskId}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error deleting checklist item: ${error}`, }, ], }; } } );

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/jhirono/todoMCP'

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