Skip to main content
Glama

google_tasks_delete_tasklist

Automate the deletion of task lists in Google Tasks using the task list ID to streamline task management and maintain organization.

Instructions

Delete a task list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskListIdYesID of the task list to delete

Implementation Reference

  • The main handler function that validates input arguments using isDeleteTaskListArgs and delegates to the GoogleTasks instance's deleteTaskList method to perform the deletion.
    export async function handleTasksDeleteTasklist(
      args: any,
      googleTasksInstance: GoogleTasks
    ) {
      if (!isDeleteTaskListArgs(args)) {
        throw new Error("Invalid arguments for google_tasks_delete_tasklist");
      }
      const { taskListId } = args;
      const result = await googleTasksInstance.deleteTaskList(taskListId);
      return {
        content: [{ type: "text", text: result }],
        isError: false,
      };
    }
  • The core implementation in the GoogleTasks class that calls the Google Tasks API to delete the specified task list.
    async deleteTaskList(taskListId: string) {
      try {
        await this.tasks.tasklists.delete({
          tasklist: taskListId,
        });
    
        return `Task list ${taskListId} deleted.`;
      } catch (error) {
        throw new Error(
          `Failed to delete task list: ${
            error instanceof Error ? error.message : String(error)
          }`
        );
      }
    }
  • The tool definition including name, description, and input schema for validation.
    export const DELETE_TASKLIST_TOOL: Tool = {
      name: "google_tasks_delete_tasklist",
      description: "Delete a task list",
      inputSchema: {
        type: "object",
        properties: {
          taskListId: {
            type: "string",
            description: "ID of the task list to delete",
          },
        },
        required: ["taskListId"],
      },
    };
  • The switch case in the main server request handler that routes calls to this tool to its handler function.
    case "google_tasks_delete_tasklist":
      return await tasksHandlers.handleTasksDeleteTasklist(
        args,
        googleTasksInstance
      );
  • Type guard function used in the handler to validate input arguments matching the tool schema.
    export function isDeleteTaskListArgs(args: any): args is {
      taskListId: string;
    } {
      return args && typeof args.taskListId === "string";
    }
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. It states the action is a deletion but doesn't mention whether this is permanent, reversible, requires specific permissions, affects associated tasks, or has rate limits. This leaves significant gaps for a destructive 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 a single, direct sentence with zero wasted words, making it highly efficient and front-loaded. It immediately conveys the core action without unnecessary elaboration.

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 destructive tool with no annotations and no output schema, the description is inadequate. It doesn't explain the outcome (e.g., what happens to tasks in the list), error conditions, or confirmation requirements, leaving the agent with insufficient context to use it safely and 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?

The input schema has 100% description coverage, with the parameter 'taskListId' clearly documented. The description doesn't add any additional meaning beyond what the schema provides, such as format examples or sourcing details, but this is acceptable given the high schema coverage.

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 ('Delete') and the resource ('a task list'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like google_tasks_delete_task, which deletes individual tasks rather than entire task lists, leaving some ambiguity about 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, such as when to delete a task list versus individual tasks or how it relates to other Google Tasks tools. It lacks context about prerequisites, consequences, or typical use cases.

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