todoist_update_section
Modify an existing section's name in Todoist to reorganize tasks and projects for better workflow management.
Instructions
Update an existing section
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sectionId | Yes | The ID of the section to update | |
| name | Yes | New name for the section |
Implementation Reference
- src/index.ts:1502-1516 (handler)The handler logic that executes the todoist_update_section tool by calling todoistClient.updateSection with the provided sectionId and new name.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, }; }
- src/index.ts:523-540 (schema)The Tool schema definition for todoist_update_section, including name, description, and inputSchema requiring sectionId and name.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"] } };
- src/index.ts:1103-1107 (registration)Registration of the UPDATE_SECTION_TOOL in the array of tools returned by the ListToolsRequestSchema handler.// Section tools GET_SECTIONS_TOOL, CREATE_SECTION_TOOL, UPDATE_SECTION_TOOL, DELETE_SECTION_TOOL,
- src/index.ts:888-900 (helper)Type guard helper function isUpdateSectionArgs used to validate input arguments for the todoist_update_section tool.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" ); }