Skip to main content
Glama
arpitbatra123

Google Tasks MCP Server

delete-tasklist

Remove a task list by specifying its ID, effectively managing and organizing tasks within the Google Tasks MCP Server. Simplifies task list cleanup and maintenance.

Instructions

Delete a task list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasklistYesTask list ID to delete

Implementation Reference

  • src/index.ts:403-448 (registration)
    Registration of the 'delete-tasklist' tool using server.tool, including inline handler and schema.
    server.tool( "delete-tasklist", "Delete a task list", { tasklist: z.string().describe("Task list ID to delete"), }, async ({ tasklist }) => { if (!isAuthenticated()) { return { isError: true, content: [ { type: "text", text: "Not authenticated. Please use the 'authenticate' tool first.", }, ], }; } try { await tasks.tasklists.delete({ tasklist, }); return { content: [ { type: "text", text: `Task list with ID '${tasklist}' was successfully deleted.`, }, ], }; } catch (error) { console.error("Error deleting task list:", error); return { isError: true, content: [ { type: "text", text: `Error deleting task list: ${error}`, }, ], }; } } );
  • Inline anonymous async handler function that performs authentication check, calls tasks.tasklists.delete, and returns success/error response.
    async ({ tasklist }) => { if (!isAuthenticated()) { return { isError: true, content: [ { type: "text", text: "Not authenticated. Please use the 'authenticate' tool first.", }, ], }; } try { await tasks.tasklists.delete({ tasklist, }); return { content: [ { type: "text", text: `Task list with ID '${tasklist}' was successfully deleted.`, }, ], }; } catch (error) { console.error("Error deleting task list:", error); return { isError: true, content: [ { type: "text", text: `Error deleting task list: ${error}`, }, ], }; } }
  • Zod input schema defining 'tasklist' as a required string parameter.
    { tasklist: z.string().describe("Task list ID to delete"), },

Other Tools

Related Tools

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