Skip to main content
Glama
arpitbatra123

Google Tasks MCP Server

move-task

Change task order in Google Tasks by moving a task to a new position within a list, optionally setting parent tasks or sibling order.

Instructions

Move a task to another position

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasklistYesTask list ID
taskYesTask ID to move
parentNoOptional new parent task ID
previousNoOptional previous sibling task ID

Implementation Reference

  • Handler function that checks authentication, constructs move parameters, calls Google Tasks API's move method, and returns success or error response.
    async ({ tasklist, task, parent, previous }) => {
      if (!isAuthenticated()) {
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: "Not authenticated. Please use the 'authenticate' tool first.",
            },
          ],
        };
      }
    
      try {
        const moveParams: any = {
          tasklist,
          task,
        };
    
        if (parent !== undefined) moveParams.parent = parent;
        if (previous !== undefined) moveParams.previous = previous;
    
        const response = await tasks.tasks.move(moveParams);
    
        return {
          content: [
            {
              type: "text",
              text: `Task moved successfully:\n\n${JSON.stringify(
                response.data,
                null,
                2
              )}`,
            },
          ],
        };
      } catch (error) {
        console.error("Error moving task:", error);
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error moving task: ${error}`,
            },
          ],
        };
      }
    }
  • Zod schema defining input parameters for the move-task tool: required tasklist and task IDs, optional parent and previous sibling IDs.
      tasklist: z.string().describe("Task list ID"),
      task: z.string().describe("Task ID to move"),
      parent: z.string().optional().describe("Optional new parent task ID"),
      previous: z
        .string()
        .optional()
        .describe("Optional previous sibling task ID"),
    },
  • src/index.ts:858-919 (registration)
    Registration of the 'move-task' tool on the MCP server with name, description, input schema, and handler function.
    server.tool(
      "move-task",
      "Move a task to another position",
      {
        tasklist: z.string().describe("Task list ID"),
        task: z.string().describe("Task ID to move"),
        parent: z.string().optional().describe("Optional new parent task ID"),
        previous: z
          .string()
          .optional()
          .describe("Optional previous sibling task ID"),
      },
      async ({ tasklist, task, parent, previous }) => {
        if (!isAuthenticated()) {
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: "Not authenticated. Please use the 'authenticate' tool first.",
              },
            ],
          };
        }
    
        try {
          const moveParams: any = {
            tasklist,
            task,
          };
    
          if (parent !== undefined) moveParams.parent = parent;
          if (previous !== undefined) moveParams.previous = previous;
    
          const response = await tasks.tasks.move(moveParams);
    
          return {
            content: [
              {
                type: "text",
                text: `Task moved successfully:\n\n${JSON.stringify(
                  response.data,
                  null,
                  2
                )}`,
              },
            ],
          };
        } catch (error) {
          console.error("Error moving task:", error);
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: `Error moving task: ${error}`,
              },
            ],
          };
        }
      }
    );
  • Helper function used in the handler to check if the user is authenticated by verifying if credentials are set.
    function isAuthenticated() {
      return credentials !== null;
    }
  • Initialization of the Google Tasks API client used by the handler to call the move method.
    const tasks = google.tasks({ version: 'v1', auth: oauth2Client });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('move') but doesn't describe effects (e.g., whether it changes task order, updates timestamps, requires permissions), constraints (e.g., rate limits, validation rules), or response format. This is a significant gap for a mutation tool with zero annotation coverage.

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 ('Move a task to another position') that is front-loaded and wastes no words. It directly conveys the core purpose without unnecessary elaboration, making it highly concise and well-structured for its simplicity.

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 complexity of a mutation tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., what 'move' entails, error conditions), usage context, and return values. The schema covers parameters, but the description fails to compensate for missing annotations and output information.

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 already documents all four parameters (tasklist, task, parent, previous) with clear descriptions. The description adds no additional meaning beyond what the schema provides, such as explaining how 'parent' and 'previous' interact for positioning. Baseline 3 is appropriate when the schema does the heavy lifting.

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 clearly states the action ('move') and resource ('task'), specifying the purpose as repositioning a task. It distinguishes from siblings like 'update-task' by focusing on positional changes rather than content updates. However, it doesn't explicitly differentiate from all siblings like 'complete-task' or 'delete-task' in terms of scope.

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), exclusions (e.g., cannot move to invalid positions), or comparisons with siblings like 'update-task' for reordering. Usage is implied only by the verb 'move', with no explicit context.

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