Skip to main content
Glama
arpitbatra123

Google Tasks MCP Server

list-tasks

Retrieve all tasks from a Google Tasks list, with options to filter by completion status, visibility, and deletion state.

Instructions

List all tasks in a task list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasklistYesTask list ID
showCompletedNoWhether to include completed tasks
showHiddenNoWhether to include hidden tasks
showDeletedNoWhether to include deleted tasks

Implementation Reference

  • Full implementation of the 'list-tasks' tool handler, including input schema, registration, and execution logic using Google Tasks API to list tasks with optional filters.
    server.tool(
      "list-tasks",
      "List all tasks in a task list",
      {
        tasklist: z.string().describe("Task list ID"),
        showCompleted: z
          .boolean()
          .optional()
          .describe("Whether to include completed tasks"),
        showHidden: z
          .boolean()
          .optional()
          .describe("Whether to include hidden tasks"),
        showDeleted: z
          .boolean()
          .optional()
          .describe("Whether to include deleted tasks"),
      },
      async ({
        tasklist,
        showCompleted = true,
        showHidden = false,
        showDeleted = false,
      }) => {
        if (!isAuthenticated()) {
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: "Not authenticated. Please use the 'authenticate' tool first.",
              },
            ],
          };
        }
    
        try {
          const response: any = await tasks.tasks.list({
            tasklist,
            showCompleted,
            showHidden,
            showDeleted,
          });
    
          const tasksResponse = response.data.items || [];
    
          if (tasksResponse.length === 0) {
            return {
              content: [
                {
                  type: "text",
                  text: "No tasks found in this list.",
                },
              ],
            };
          }
    
          const formattedTasks = tasksResponse.map((task: any) => ({
            id: task.id,
            title: task.title,
            status: task.status,
            due: task.due,
            notes: task.notes,
            completed: task.completed,
          }));
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(formattedTasks, null, 2),
              },
            ],
          };
        } catch (error) {
          console.error("Error listing tasks:", error);
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: `Error listing tasks: ${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 for behavioral disclosure. While 'List all tasks' implies a read-only operation, it doesn't address important behavioral aspects like pagination, rate limits, authentication requirements, or what 'all' means in practice (e.g., maximum results). The description is minimal and lacks operational context.

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 6 words, front-loading the core purpose without any wasted words. Every element ('List', 'all tasks', 'in a task list') contributes essential information in minimal space.

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 tool with 4 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'all tasks' means operationally, doesn't mention authentication requirements (relevant given 'authenticate' and 'set-auth-code' siblings), and provides no context about the return format or limitations. The minimal description leaves too many operational questions unanswered.

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 4 parameters thoroughly. The description adds no parameter semantics beyond what's in the schema - it doesn't explain relationships between parameters or provide usage examples. 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 verb ('List') and resource ('tasks in a task list'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling tools like 'get-task' or 'list-tasklists', which would require more specificity about scope or filtering capabilities.

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. With siblings like 'get-task' (for single tasks) and 'list-tasklists' (for listing task lists), there's no indication of when this bulk listing tool is preferred or what distinguishes it from other list/retrieval operations.

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