Skip to main content
Glama
mstfe

Google Tasks MCP Server

by mstfe

complete_task

Update the completion status of a Google Task by providing the task ID and setting it to 'needsAction' or 'completed' for task management.

Instructions

Toggle the completion status of a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoStatus of task, needsAction or completed
taskIdYesID of the task to toggle completion status

Implementation Reference

  • Handler for the 'complete_task' tool. Validates arguments, extracts taskId and status, then patches the task status using the Google Tasks API.
    if (request.params.name === "complete_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; const newStatus = args.status; if (!taskId) { throw new McpError( ErrorCode.InvalidParams, "The 'taskId' field is required." ); } try { // Durumu güncelle const updateResponse = await tasks.tasks.patch({ tasklist: "@default", task: taskId, requestBody: { status: newStatus }, }); return { content: [ { type: "text", text: JSON.stringify(updateResponse.data, null, 2), }, ], }; } catch (error) { throw new McpError( ErrorCode.InternalError, `Tasks API error: ${error}` ); } }
  • src/index.ts:173-184 (registration)
    Registration of the 'complete_task' tool in the ListToolsRequestSchema handler, including name, description, and input schema definition.
    { name: "complete_task", description: "Toggle the completion status of a task", inputSchema: { type: "object", properties: { taskId: { type: "string", description: "ID of the task to toggle completion status" }, status: { type: "string", description: "Status of task, needsAction or completed" }, }, 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