Skip to main content
Glama
ZatesloFL

Google Workspace MCP Server

by ZatesloFL

delete_task_list

Remove a task list and all associated tasks from Google Workspace. Requires the user's Google email address and the task list ID for deletion.

Instructions

Delete a task list. Note: This will also delete all tasks in the list.

Args: user_google_email (str): The user's Google email address. Required. task_list_id (str): The ID of the task list to delete.

Returns: str: Confirmation message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_list_idYes
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'delete_task_list' tool. It deletes the specified task list using the Google Tasks API and returns a confirmation message. Includes decorators for tool registration (@server.tool()), authentication (@require_google_service), and error handling (@handle_http_errors).
    @server.tool()  # type: ignore
    @require_google_service("tasks", "tasks")  # type: ignore
    @handle_http_errors("delete_task_list", service_type="tasks")  # type: ignore
    async def delete_task_list(
        service: Resource,
        user_google_email: str,
        task_list_id: str
    ) -> str:
        """
        Delete a task list. Note: This will also delete all tasks in the list.
    
        Args:
            user_google_email (str): The user's Google email address. Required.
            task_list_id (str): The ID of the task list to delete.
    
        Returns:
            str: Confirmation message.
        """
        logger.info(f"[delete_task_list] Invoked. Email: '{user_google_email}', Task List ID: {task_list_id}")
    
        try:
            await asyncio.to_thread(
                service.tasklists().delete(tasklist=task_list_id).execute
            )
    
            response = f"Task list {task_list_id} has been deleted for {user_google_email}. All tasks in this list have also been deleted."
    
            logger.info(f"Deleted task list {task_list_id} for {user_google_email}")
            return response
    
        except HttpError as error:
            message = f"API error: {error}. You might need to re-authenticate. LLM: Try 'start_google_auth' with the user's email ({user_google_email}) and service_name='Google Tasks'."
            logger.error(message, exc_info=True)
            raise Exception(message)
        except Exception as e:
            message = f"Unexpected error: {e}."
            logger.exception(message)
            raise Exception(message)
Behavior3/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. It clearly indicates this is a destructive operation with cascading effects, which is valuable. However, it doesn't mention authentication requirements, error conditions, or whether the deletion is reversible, leaving some behavioral aspects unclear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, Args, Returns) and front-loads the most important information. The warning about cascading deletion is appropriately placed. It could be slightly more concise by integrating the warning more seamlessly, but overall it's efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive operation with no annotations, the description does a good job covering the essentials: purpose, parameters, return value, and critical behavioral warning. The output schema exists (Returns: str), so the description doesn't need to elaborate on return values. The main gap is lack of authentication/authorization context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description explicitly documents both parameters with their types and requirements in the Args section, adding significant value beyond the schema (which has 0% description coverage). It clarifies that user_google_email is 'The user's Google email address' and task_list_id is 'The ID of the task list to delete', providing essential semantic context.

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 a task list') and specifies the resource ('task list'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'delete_task' or 'delete_event', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes an important warning about cascading deletion ('This will also delete all tasks in the list'), which provides some usage context. However, it doesn't explicitly state when to use this versus alternatives like 'clear_completed_tasks' or provide prerequisites beyond the required parameters.

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/ZatesloFL/google_workspace_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server