Skip to main content
Glama

google_tasks_complete_task

Mark a specific task as completed in Google Tasks by providing its task ID and optional task list ID to manage tasks efficiently.

Instructions

Mark a task as completed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesID of the task to complete
taskListIdNoID of the task list the task belongs to (uses default if not specified)

Implementation Reference

  • The primary handler function that validates input arguments using isCompleteTaskArgs and calls the GoogleTasks.completeTask method to mark the task as completed.
    export async function handleTasksCompleteTask(
      args: any,
      googleTasksInstance: GoogleTasks
    ) {
      if (!isCompleteTaskArgs(args)) {
        throw new Error("Invalid arguments for google_tasks_complete_task");
      }
      const { taskId, taskListId } = args;
      const result = await googleTasksInstance.completeTask(taskId, taskListId);
      return {
        content: [{ type: "text", text: result }],
        isError: false,
      };
    }
  • Defines the tool's metadata, description, and input schema specifying required taskId and optional taskListId.
    export const COMPLETE_TASK_TOOL: Tool = {
      name: "google_tasks_complete_task",
      description: "Mark a task as completed",
      inputSchema: {
        type: "object",
        properties: {
          taskId: {
            type: "string",
            description: "ID of the task to complete",
          },
          taskListId: {
            type: "string",
            description:
              "ID of the task list the task belongs to (uses default if not specified)",
          },
        },
        required: ["taskId"],
      },
    };
  • Dispatches calls to 'google_tasks_complete_task' to the corresponding handler function within the MCP server's CallToolRequest handler.
    case "google_tasks_complete_task":
      return await tasksHandlers.handleTasksCompleteTask(
        args,
        googleTasksInstance
      );
  • Type guard for validating input arguments match the expected shape: required taskId (string) and optional taskListId (string).
    export function isCompleteTaskArgs(args: any): args is {
      taskId: string;
      taskListId?: string;
    } {
      return (
        args &&
        typeof args.taskId === "string" &&
        (args.taskListId === undefined || typeof args.taskListId === "string")
      );
    }
  • Core implementation in GoogleTasks class that marks a task as completed by calling updateTask with status 'completed', using Google Tasks API.
    async completeTask(taskId: string, taskListId?: string) {
      try {
        const targetTaskList = taskListId || this.defaultTaskList;
    
        await this.updateTask(taskId, { status: "completed" }, targetTaskList);
    
        return `Task ${taskId} marked as completed.`;
      } catch (error) {
        throw new Error(
          `Failed to complete task: ${
            error instanceof Error ? error.message : String(error)
          }`
        );
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Mark a task as completed' implies a mutation (changing task status), but it doesn't disclose behavioral traits like whether this requires specific permissions, if it's reversible, what happens to completed tasks (e.g., archiving), or error conditions (e.g., invalid taskId). 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 a single, efficient sentence ('Mark a task as completed') that is front-loaded and wastes no words. It directly conveys the core purpose without unnecessary elaboration, making it easy for an agent to parse quickly.

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?

Given the tool's complexity (a mutation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects (e.g., side effects, error handling), usage context, or return values. For a tool that modifies task state, more detail is needed to guide an agent effectively.

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%, with clear descriptions for both parameters (taskId and taskListId). The description adds no parameter semantics beyond what the schema provides—it doesn't explain parameter interactions (e.g., taskListId defaults if omitted) or provide examples. Baseline 3 is appropriate since the schema does the heavy lifting, but the description doesn't enhance understanding.

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

Purpose4/5

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

The description 'Mark a task as completed' clearly states the action (mark as completed) and resource (task) with a specific verb. It distinguishes from siblings like google_tasks_update_task (which might modify other fields) and google_tasks_delete_task (which removes rather than completes). However, it doesn't explicitly mention the Google Tasks service context, though this is implied by the tool name.

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. It doesn't mention prerequisites (e.g., task must exist), when not to use it (e.g., for uncompleted tasks only), or compare to siblings like google_tasks_update_task (which could also mark completion). Without such context, the agent must infer usage from the tool name alone.

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