Skip to main content
Glama

google_tasks_update_task

Modify task details in Google Tasks, including title, notes, due date, status, or task list, by providing the task ID. Ensures accurate updates for task management.

Instructions

Update an existing task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dueNoNew due date in RFC 3339 format
notesNoNew notes or description for the task
statusNoNew status for the task (needsAction or completed)
taskIdYesID of the task to update
taskListIdNoID of the task list the task belongs to (uses default if not specified)
titleNoNew title for the task

Implementation Reference

  • The handler function that validates the input arguments using isUpdateTaskArgs and calls the GoogleTasks.updateTask method to perform the update.
    export async function handleTasksUpdateTask(
      args: any,
      googleTasksInstance: GoogleTasks
    ) {
      if (!isUpdateTaskArgs(args)) {
        throw new Error("Invalid arguments for google_tasks_update_task");
      }
      const { taskId, title, notes, due, status, taskListId } = args;
      const result = await googleTasksInstance.updateTask(
        taskId,
        { title, notes, due, status },
        taskListId
      );
      return {
        content: [{ type: "text", text: result }],
        isError: false,
      };
    }
  • The MCP tool schema defining the name, description, and input schema for google_tasks_update_task.
    export const UPDATE_TASK_TOOL: Tool = {
      name: "google_tasks_update_task",
      description: "Update an existing task",
      inputSchema: {
        type: "object",
        properties: {
          taskId: {
            type: "string",
            description: "ID of the task to update",
          },
          title: {
            type: "string",
            description: "New title for the task",
          },
          notes: {
            type: "string",
            description: "New notes or description for the task",
          },
          due: {
            type: "string",
            description: "New due date in RFC 3339 format",
          },
          status: {
            type: "string",
            description: "New status for the task (needsAction or completed)",
          },
          taskListId: {
            type: "string",
            description:
              "ID of the task list the task belongs to (uses default if not specified)",
          },
        },
        required: ["taskId"],
      },
    };
  • The dispatch case in the main tool call handler that routes google_tasks_update_task calls to the tasks handler.
    case "google_tasks_update_task":
      return await tasksHandlers.handleTasksUpdateTask(
        args,
        googleTasksInstance
      );
  • Type guard (schema validation helper) used in the handler to validate arguments for google_tasks_update_task.
    export function isUpdateTaskArgs(args: any): args is {
      taskId: string;
      title?: string;
      notes?: string;
      due?: string;
      status?: string;
      taskListId?: string;
    } {
      return (
        args &&
        typeof args.taskId === "string" &&
        (args.title === undefined || typeof args.title === "string") &&
        (args.notes === undefined || typeof args.notes === "string") &&
        (args.due === undefined || typeof args.due === "string") &&
        (args.status === undefined || typeof args.status === "string") &&
        (args.taskListId === undefined || typeof args.taskListId === "string")
      );
    }
  • The core Google Tasks API implementation for updating a task, called by the handler. Fetches current task, merges updates, and performs the API patch.
    async updateTask(
      taskId: string,
      data: {
        title?: string;
        notes?: string;
        due?: string;
        status?: string;
      },
      taskListId?: string
    ) {
      try {
        const targetTaskList = taskListId || this.defaultTaskList;
    
        // Get current task data
        const currentTask = await this.tasks.tasks.get({
          tasklist: targetTaskList,
          task: taskId,
        });
    
        // Prepare updated task data
        const updatedTask = { ...currentTask.data };
    
        if (data.title !== undefined) updatedTask.title = data.title;
        if (data.notes !== undefined) updatedTask.notes = data.notes;
        if (data.due !== undefined) updatedTask.due = data.due;
        if (data.status !== undefined) updatedTask.status = data.status;
    
        const response = await this.tasks.tasks.update({
          tasklist: targetTaskList,
          task: taskId,
          requestBody: updatedTask,
        });
    
        return `Task updated: "${response.data.title}" with ID: ${response.data.id}`;
      } catch (error) {
        throw new Error(
          `Failed to update task: ${
            error instanceof Error ? error.message : String(error)
          }`
        );
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Update an existing task' implies a mutation operation but doesn't specify permissions required, whether updates are partial or full, error handling, or what happens to unspecified fields. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence 'Update an existing task'. It's front-loaded and wastes no words, though this conciseness comes at the cost of completeness. Every word earns its place by stating the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what fields can be updated, how partial updates work, error conditions, or return values. The agent would need to rely heavily on the input schema alone, missing important behavioral context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 6 parameters. The description adds no parameter-specific information beyond what's in the schema. According to the rules, when schema coverage is high (>80%), the baseline score is 3 even with no param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Update an existing task' clearly states the action (update) and resource (task), but it's vague about what aspects can be updated and doesn't differentiate from sibling tools like google_tasks_complete_task or google_tasks_delete_task. It's a minimal viable description that states the basic purpose without specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like google_tasks_complete_task (which might be for status updates only) or google_tasks_delete_task. There's no mention of prerequisites, context, or exclusions, leaving the agent with no usage direction beyond the basic purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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