Skip to main content
Glama
arpitbatra123

Google Tasks MCP Server

update-task

Modify existing Google Tasks by updating title, notes, status, or due date to keep task information current and accurate.

Instructions

Update an existing task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasklistYesTask list ID
taskYesTask ID
titleNoNew title for the task
notesNoNew notes for the task
statusNoStatus of the task
dueNoDue date in RFC 3339 format (e.g., 2025-03-19T12:00:00Z)

Implementation Reference

  • The handler function that implements the logic for updating an existing task in a Google Tasks list. It fetches the current task, merges updates, and calls the Google Tasks API update method.
    async ({ tasklist, task, title, notes, status, due }) => {
      if (!isAuthenticated()) {
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: "Not authenticated. Please use the 'authenticate' tool first.",
            },
          ],
        };
      }
    
      try {
        // First, get the current task data
        const currentTask = await tasks.tasks.get({
          tasklist,
          task,
        });
    
        // Prepare the update request
        const requestBody: any = {
          ...currentTask.data,
        };
    
        if (title !== undefined) requestBody.title = title;
        if (notes !== undefined) requestBody.notes = notes;
        if (status !== undefined) requestBody.status = status;
        if (due !== undefined) requestBody.due = due;
    
        const response = await tasks.tasks.update({
          tasklist,
          task,
          requestBody,
        });
    
        return {
          content: [
            {
              type: "text",
              text: `Task updated successfully:\n\n${JSON.stringify(
                response.data,
                null,
                2
              )}`,
            },
          ],
        };
      } catch (error) {
        console.error("Error updating task:", error);
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error updating task: ${error}`,
            },
          ],
        };
      }
    }
  • Zod input schema defining parameters for the update-task tool: required tasklist and task IDs, optional title, notes, status, and due date.
      tasklist: z.string().describe("Task list ID"),
      task: z.string().describe("Task ID"),
      title: z.string().optional().describe("New title for the task"),
      notes: z.string().optional().describe("New notes for the task"),
      status: z
        .enum(["needsAction", "completed"])
        .optional()
        .describe("Status of the task"),
      due: z
        .string()
        .optional()
        .describe("Due date in RFC 3339 format (e.g., 2025-03-19T12:00:00Z)"),
    },
  • src/index.ts:659-737 (registration)
    The server.tool registration call that defines and registers the 'update-task' tool with its description, input schema, and handler function.
    server.tool(
      "update-task",
      "Update an existing task",
      {
        tasklist: z.string().describe("Task list ID"),
        task: z.string().describe("Task ID"),
        title: z.string().optional().describe("New title for the task"),
        notes: z.string().optional().describe("New notes for the task"),
        status: z
          .enum(["needsAction", "completed"])
          .optional()
          .describe("Status of the task"),
        due: z
          .string()
          .optional()
          .describe("Due date in RFC 3339 format (e.g., 2025-03-19T12:00:00Z)"),
      },
      async ({ tasklist, task, title, notes, status, due }) => {
        if (!isAuthenticated()) {
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: "Not authenticated. Please use the 'authenticate' tool first.",
              },
            ],
          };
        }
    
        try {
          // First, get the current task data
          const currentTask = await tasks.tasks.get({
            tasklist,
            task,
          });
    
          // Prepare the update request
          const requestBody: any = {
            ...currentTask.data,
          };
    
          if (title !== undefined) requestBody.title = title;
          if (notes !== undefined) requestBody.notes = notes;
          if (status !== undefined) requestBody.status = status;
          if (due !== undefined) requestBody.due = due;
    
          const response = await tasks.tasks.update({
            tasklist,
            task,
            requestBody,
          });
    
          return {
            content: [
              {
                type: "text",
                text: `Task updated successfully:\n\n${JSON.stringify(
                  response.data,
                  null,
                  2
                )}`,
              },
            ],
          };
        } catch (error) {
          console.error("Error updating task:", error);
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: `Error updating task: ${error}`,
              },
            ],
          };
        }
      }
    );
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Update an existing task' implies a mutation operation but doesn't specify permission requirements, whether updates are partial or complete, what happens to unspecified fields, or error conditions. It lacks critical behavioral context for a write operation.

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 at just three words, with zero wasted language. It's front-loaded with the core action and resource. While it could benefit from more detail, it earns full marks for conciseness as every word serves a purpose.

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 inadequate. It doesn't explain what the tool returns, what happens on success/failure, or provide any context about the update operation's scope or limitations. The agent would need to guess about important behavioral aspects.

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 additional parameter information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in 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 verb (update) and resource (task), but it's vague about what aspects can be updated and doesn't distinguish this tool from similar siblings like 'complete-task' or 'move-task'. It provides basic purpose but lacks 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 'complete-task' (which might handle status changes) or 'move-task' (which might handle tasklist changes). There's no mention of prerequisites, constraints, or typical use cases beyond the basic action.

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

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