Skip to main content
Glama
arpitbatra123

Google Tasks MCP Server

delete-task

Remove a specific task from a Google Tasks list by providing the task list ID and task ID.

Instructions

Delete a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasklistYesTask list ID
taskYesTask ID to delete

Implementation Reference

  • The handler function for the 'delete-task' tool. It checks authentication, calls the Google Tasks API to delete the specified task, and returns success or error messages.
    async ({ tasklist, task }) => { if (!isAuthenticated()) { return { isError: true, content: [ { type: "text", text: "Not authenticated. Please use the 'authenticate' tool first.", }, ], }; } try { await tasks.tasks.delete({ tasklist, task, }); return { content: [ { type: "text", text: `Task with ID '${task}' was successfully deleted.`, }, ], }; } catch (error) { console.error("Error deleting task:", error); return { isError: true, content: [ { type: "text", text: `Error deleting task: ${error}`, }, ], }; } } );
  • Zod schema defining the input parameters: tasklist ID and task ID.
    { tasklist: z.string().describe("Task list ID"), task: z.string().describe("Task ID to delete"), },
  • src/index.ts:741-742 (registration)
    Registration of the 'delete-task' tool using server.tool, including name and description.
    "delete-task", "Delete a task",

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