Skip to main content
Glama
ZatesloFL

Google Workspace MCP Server

by ZatesloFL

delete_task

Remove a specific task from a Google Tasks list by providing the user's email, task list ID, and task ID. Confirms deletion upon completion.

Instructions

Delete a task from a task list.

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

Returns: str: Confirmation message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes
task_list_idYes
user_google_emailYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'delete_task' MCP tool. It deletes the specified task from the Google Tasks API using the provided service, task list ID, and task ID. Includes authentication decorators, error handling, logging, and a confirmation response.
    @server.tool()  # type: ignore
    @require_google_service("tasks", "tasks")  # type: ignore
    @handle_http_errors("delete_task", service_type="tasks")  # type: ignore
    async def delete_task(
        service: Resource,
        user_google_email: str,
        task_list_id: str,
        task_id: str
    ) -> str:
        """
        Delete a task from a task list.
    
        Args:
            user_google_email (str): The user's Google email address. Required.
            task_list_id (str): The ID of the task list containing the task.
            task_id (str): The ID of the task to delete.
    
        Returns:
            str: Confirmation message.
        """
        logger.info(f"[delete_task] Invoked. Email: '{user_google_email}', Task List ID: {task_list_id}, Task ID: {task_id}")
    
        try:
            await asyncio.to_thread(
                service.tasks().delete(tasklist=task_list_id, task=task_id).execute
            )
    
            response = f"Task {task_id} has been deleted from task list {task_list_id} for {user_google_email}."
    
            logger.info(f"Deleted task {task_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)
Behavior2/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 states the action is 'Delete' which implies a destructive mutation, but doesn't specify whether deletion is permanent/reversible, what permissions are required, or if there are rate limits. The confirmation message return is mentioned but not elaborated.

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 efficiently structured with a clear purpose statement followed by well-organized parameter and return value sections. Every sentence serves a purpose with no redundant information, making it easy to parse.

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

Completeness3/5

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

For a destructive mutation tool with no annotations, the description provides basic purpose and parameter documentation, and mentions a return value. However, it lacks important context about permissions, side effects, and error conditions that would be crucial for safe usage. The output schema exists but isn't detailed in the description.

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?

Schema description coverage is 0%, but the description provides clear parameter documentation in the Args section, explaining what each parameter represents (user email, task list ID, task ID) and which are required. This compensates well for the schema's lack of descriptions, though it doesn't provide format examples or constraints.

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 target resource ('a task from a task list'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'delete_task_list' or 'clear_completed_tasks', which would require more specific context 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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, permissions needed, or differences from similar deletion tools like 'delete_task_list' or 'clear_completed_tasks' (which might handle bulk 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/ZatesloFL/google_workspace_mcp'

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