Skip to main content
Glama
kydycode

Enhanced Todoist MCP Server Extended

todoist_delete_section

Remove a specific section from Todoist by providing its unique section ID. This tool simplifies section management within the Enhanced Todoist MCP Server Extended.

Instructions

Delete a section by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionIdYesThe ID of the section to delete

Implementation Reference

  • The handler logic for the todoist_delete_section tool. Validates input using isSectionIdArgs type guard, deletes the section using Todoist API client, and returns a success message.
    if (name === "todoist_delete_section") { if (!isSectionIdArgs(args)) { throw new Error("Invalid arguments for todoist_delete_section"); } await todoistClient.deleteSection(args.sectionId); return { content: [{ type: "text", text: `Section ${args.sectionId} deleted successfully` }], isError: false, }; }
  • The Tool object definition for todoist_delete_section, including name, description, and input schema requiring a sectionId.
    const DELETE_SECTION_TOOL: Tool = { name: "todoist_delete_section", description: "Delete a section by its ID", inputSchema: { type: "object", properties: { sectionId: { type: "string", description: "The ID of the section to delete" } }, required: ["sectionId"] } };
  • src/index.ts:1104-1108 (registration)
    Registration of the todoist_delete_section tool (DELETE_SECTION_TOOL) in the list of available tools returned by ListToolsRequestSchema handler.
    GET_SECTIONS_TOOL, CREATE_SECTION_TOOL, UPDATE_SECTION_TOOL, DELETE_SECTION_TOOL, // Label tools
  • Type guard function used to validate the arguments for the todoist_delete_section tool, ensuring sectionId is a string.
    function isSectionIdArgs(args: unknown): args is { sectionId: string; } { return ( typeof args === "object" && args !== null && "sectionId" in args && typeof (args as { sectionId: string }).sectionId === "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