Skip to main content
Glama
mstfe

Google Tasks MCP Server

by mstfe

delete_task

Remove a specific task from your default task list by providing its unique ID. Integrates with Google Tasks API via the MCP server to manage tasks effectively.

Instructions

Delete a task from the default task list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesID of the task to delete

Implementation Reference

  • Handler for the 'delete_task' tool. Validates arguments (misusing create_task validator), extracts taskId, calls Google Tasks API to delete the task, returns success message or throws errors.
    if (request.params.name === "delete_task") { if (!isValidCreateTaskArgs(request.params.arguments)) { throw new McpError( ErrorCode.InvalidParams, "Invalid arguments for creating a task. 'title' must be a string, and 'notes' must be a string or undefined." ); } const args = request.params.arguments; const taskId = args.taskId; if (!taskId) { throw new McpError( ErrorCode.InvalidParams, "The 'taskId' field is required." ); } try { await tasks.tasks.delete({ tasklist: "@default", task: taskId, }); return { content: [ { type: "text", text: "Task deleted successfully.", }, ], }; } catch (error) { throw new McpError( ErrorCode.InternalError, `Tasks API error: ${error}` ); } }
  • src/index.ts:162-172 (registration)
    Registration of the 'delete_task' tool in the ListTools response, including its description and input schema requiring 'taskId'.
    { name: "delete_task", description: "Delete a task from the default task list", inputSchema: { type: "object", properties: { taskId: { type: "string", description: "ID of the task to delete" }, }, required: ["taskId"], }, },

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/mstfe/mcp-google-tasks'

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