Skip to main content
Glama
kydycode

Enhanced Todoist MCP Server Extended

todoist_delete_label

Remove a Todoist label by specifying its ID, enabling efficient label management within the Enhanced Todoist MCP Server Extended.

Instructions

Delete a label by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelIdYesThe ID of the label to delete.

Implementation Reference

  • Executes the deletion of a Todoist label by calling todoistClient.deleteLabel with the provided labelId after argument validation.
    if (name === "todoist_delete_label") { if (!isLabelIdArgs(args)) { return { content: [{ type: "text", text: "Invalid arguments for delete_label" }], isError: true }; } try { await todoistClient.deleteLabel(args.labelId); return { content: [{ type: "text", text: `Label ${args.labelId} deleted.` }], isError: false }; } catch (error: any) { return { content: [{ type: "text", text: `Error deleting label: ${error.message}` }], isError: true }; } }
  • Defines the tool metadata, description, and input schema requiring a labelId string.
    const DELETE_LABEL_TOOL: Tool = { name: "todoist_delete_label", description: "Delete a label by its ID.", inputSchema: { type: "object", properties: { labelId: { type: "string", description: "The ID of the label to delete." } }, required: ["labelId"] } };
  • src/index.ts:1108-1114 (registration)
    Registers the todoist_delete_label tool (DELETE_LABEL_TOOL) in the list of tools advertised via the ListToolsRequestHandler.
    // Label tools CREATE_LABEL_TOOL, GET_LABEL_TOOL, GET_LABELS_TOOL, UPDATE_LABEL_TOOL, DELETE_LABEL_TOOL, // Comment tools
  • Type guard helper function that validates if the arguments object contains a valid string labelId, used in label tool handlers.
    function isLabelIdArgs(args: unknown): args is { labelId: string; } { return ( typeof args === "object" && args !== null && "labelId" in args && typeof (args as { labelId: string }).labelId === "string" ); }

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/kydycode/todoist-mcp-server-ext'

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