Skip to main content
Glama
arpitbatra123

Google Tasks MCP Server

create-tasklist

Generate a new task list with a specified title using the Google Tasks MCP Server. Simplify task organization directly through the Claude interface.

Instructions

Create a new task list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the new task list

Implementation Reference

  • Handler function that checks authentication, calls Google Tasks API to insert a new tasklist with the given title, and returns success or error response.
    async ({ title }) => { if (!isAuthenticated()) { return { isError: true, content: [ { type: "text", text: "Not authenticated. Please use the 'authenticate' tool first.", }, ], }; } try { const response = await tasks.tasklists.insert({ requestBody: { title, }, }); return { content: [ { type: "text", text: `Task list created successfully:\n\n${JSON.stringify( response.data, null, 2 )}`, }, ], }; } catch (error) { console.error("Error creating task list:", error); return { isError: true, content: [ { type: "text", text: `Error creating task list: ${error}`, }, ], }; } }
  • Zod input schema defining the 'title' parameter for the tool.
    { title: z.string().describe("Title of the new task list"), },
  • src/index.ts:293-344 (registration)
    Registration of the 'create-tasklist' tool with McpServer, including name, description, input schema, and handler.
    server.tool( "create-tasklist", "Create a new task list", { title: z.string().describe("Title of the new task list"), }, async ({ title }) => { if (!isAuthenticated()) { return { isError: true, content: [ { type: "text", text: "Not authenticated. Please use the 'authenticate' tool first.", }, ], }; } try { const response = await tasks.tasklists.insert({ requestBody: { title, }, }); return { content: [ { type: "text", text: `Task list created successfully:\n\n${JSON.stringify( response.data, null, 2 )}`, }, ], }; } catch (error) { console.error("Error creating task list:", error); return { isError: true, content: [ { type: "text", text: `Error creating task list: ${error}`, }, ], }; } } );
  • Helper function to check if user is authenticated by verifying if credentials are set.
    // Helper function to check if authenticated function isAuthenticated() { return credentials !== null; }

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