Skip to main content
Glama
arpitbatra123

Google Tasks MCP Server

update-tasklist

Modify the title of an existing Google Tasks list to reflect changes in project scope or organization needs.

Instructions

Update an existing task list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasklistYesTask list ID
titleYesNew title for the task list

Implementation Reference

  • The handler function for the 'update-tasklist' tool. It checks authentication, calls the Google Tasks API to update the tasklist title, and returns success or error response.
    async ({ tasklist, title }) => { if (!isAuthenticated()) { return { isError: true, content: [ { type: "text", text: "Not authenticated. Please use the 'authenticate' tool first.", }, ], }; } try { const response = await tasks.tasklists.update({ tasklist, requestBody: { title, }, }); return { content: [ { type: "text", text: `Task list updated successfully:\n\n${JSON.stringify( response.data, null, 2 )}`, }, ], }; } catch (error) { console.error("Error updating task list:", error); return { isError: true, content: [ { type: "text", text: `Error updating task list: ${error}`, }, ], }; } }
  • Zod schema defining the input parameters: tasklist ID and new title.
    { tasklist: z.string().describe("Task list ID"), title: z.string().describe("New title for the task list"), },
  • src/index.ts:347-400 (registration)
    Registration of the 'update-tasklist' tool using server.tool(), including name, description, schema, and handler.
    server.tool( "update-tasklist", "Update an existing task list", { tasklist: z.string().describe("Task list ID"), title: z.string().describe("New title for the task list"), }, async ({ tasklist, title }) => { if (!isAuthenticated()) { return { isError: true, content: [ { type: "text", text: "Not authenticated. Please use the 'authenticate' tool first.", }, ], }; } try { const response = await tasks.tasklists.update({ tasklist, requestBody: { title, }, }); return { content: [ { type: "text", text: `Task list updated successfully:\n\n${JSON.stringify( response.data, null, 2 )}`, }, ], }; } catch (error) { console.error("Error updating task list:", error); return { isError: true, content: [ { type: "text", text: `Error updating task list: ${error}`, }, ], }; } } );

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/arpitbatra123/mcp-googletasks'

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