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 and task list IDs. Simplifies task management through the Google Tasks MCP Server integration.

Instructions

Delete a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesTask ID to delete
tasklistYesTask list ID

Implementation Reference

  • The handler function for the 'delete-task' tool. It checks authentication, calls tasks.tasks.delete API with tasklist and task IDs, and returns success or error response.
    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 input schema defining parameters: tasklist (string) and task (string).
    { tasklist: z.string().describe("Task list ID"), task: z.string().describe("Task ID to delete"), },
  • src/index.ts:740-787 (registration)
    MCP server.tool registration for 'delete-task' tool, including name, description, schema, and inline handler.
    server.tool( "delete-task", "Delete a task", { tasklist: z.string().describe("Task list ID"), task: z.string().describe("Task ID to delete"), }, 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}`, }, ], }; } } );

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