Skip to main content
Glama
kydycode

Enhanced Todoist MCP Server Extended

todoist_update_section

Modify the name of an existing Todoist section by specifying its ID and new name, enabling efficient task organization and management within projects.

Instructions

Update an existing section

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesNew name for the section
sectionIdYesThe ID of the section to update

Implementation Reference

  • Handler logic for todoist_update_section: validates input with isUpdateSectionArgs and updates the section name using todoistClient.updateSection
    if (name === "todoist_update_section") { if (!isUpdateSectionArgs(args)) { throw new Error("Invalid arguments for todoist_update_section"); } const updatedSection = await todoistClient.updateSection(args.sectionId, { name: args.name }); return { content: [{ type: "text", text: `Section updated successfully:\nID: ${updatedSection.id}\nName: ${updatedSection.name}` }], isError: false, }; }
  • Input schema and Tool metadata definition for todoist_update_section
    const UPDATE_SECTION_TOOL: Tool = { name: "todoist_update_section", description: "Update an existing section", inputSchema: { type: "object", properties: { sectionId: { type: "string", description: "The ID of the section to update" }, name: { type: "string", description: "New name for the section" } }, required: ["sectionId", "name"] } };
  • Type guard helper function isUpdateSectionArgs used to validate tool arguments
    function isUpdateSectionArgs(args: unknown): args is { sectionId: string; name: string; } { return ( typeof args === "object" && args !== null && "sectionId" in args && "name" in args && typeof (args as { sectionId: string; name: string }).sectionId === "string" && typeof (args as { sectionId: string; name: string }).name === "string" ); }
  • src/index.ts:1083-1121 (registration)
    Registration of todoist_update_section (as UPDATE_SECTION_TOOL) in the list of tools returned by ListToolsRequestSchema handler
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ // Task tools CREATE_TASK_TOOL, QUICK_ADD_TASK_TOOL, GET_TASKS_TOOL, GET_TASK_TOOL, UPDATE_TASK_TOOL, DELETE_TASK_TOOL, COMPLETE_TASK_TOOL, REOPEN_TASK_TOOL, SEARCH_TASKS_TOOL, MOVE_TASK_TOOL, BULK_MOVE_TASKS_TOOL, // Project tools GET_PROJECTS_TOOL, GET_PROJECT_TOOL, CREATE_PROJECT_TOOL, UPDATE_PROJECT_TOOL, DELETE_PROJECT_TOOL, // Section tools GET_SECTIONS_TOOL, CREATE_SECTION_TOOL, UPDATE_SECTION_TOOL, DELETE_SECTION_TOOL, // Label tools CREATE_LABEL_TOOL, GET_LABEL_TOOL, GET_LABELS_TOOL, UPDATE_LABEL_TOOL, DELETE_LABEL_TOOL, // Comment tools CREATE_COMMENT_TOOL, GET_COMMENT_TOOL, GET_COMMENTS_TOOL, UPDATE_COMMENT_TOOL, DELETE_COMMENT_TOOL, ], }));

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