Skip to main content
Glama
kydycode

Enhanced Todoist MCP Server Extended

todoist_delete_section

Remove sections from Todoist projects by specifying the section ID to organize tasks and maintain project structure.

Instructions

Delete a section by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionIdYesThe ID of the section to delete

Implementation Reference

  • Handler for 'todoist_delete_section' tool: validates input using isSectionIdArgs, calls todoistClient.deleteSection(sectionId), and returns 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, }; }
  • Tool schema definition for 'todoist_delete_section', specifying input schema requiring '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:1103-1108 (registration)
    Registration of DELETE_SECTION_TOOL in the list of tools returned by ListToolsRequestSchema handler.
    // Section tools GET_SECTIONS_TOOL, CREATE_SECTION_TOOL, UPDATE_SECTION_TOOL, DELETE_SECTION_TOOL, // Label tools
  • Type guard helper 'isSectionIdArgs' used to validate arguments in the delete section handler.
    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