Skip to main content
Glama

delete_task

Remove a task from the Task MCP Server by specifying its ID to manage your task list effectively.

Instructions

Delete a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesID of the task to delete

Implementation Reference

  • Handler logic for delete_task tool: extracts task_id from arguments, checks if task exists in the global tasks dictionary, deletes it using pop if found, and returns a success or error message via TextContent.
    elif name == "delete_task":
        task_id = int(arguments.get("task_id", 0))
        
        if task_id not in tasks:
            return [
                types.TextContent(
                    type="text",
                    text=f"❌ Task {task_id} not found"
                )
            ]
        
        deleted_task = tasks.pop(task_id)
        return [
            types.TextContent(
                type="text",
                text=f"🗑️ Task deleted: {deleted_task['title']}"
            )
        ]
  • Registers the delete_task tool in the list_tools handler, providing name, description, and input schema expecting a numeric task_id.
    types.Tool(
        name="delete_task",
        description="Delete a task",
        inputSchema={
            "type": "object",
            "properties": {
                "task_id": {
                    "type": "number",
                    "description": "ID of the task to delete"
                }
            },
            "required": ["task_id"]
        }
    )
  • Input schema for delete_task tool, defining an object with required numeric task_id property.
    inputSchema={
        "type": "object",
        "properties": {
            "task_id": {
                "type": "number",
                "description": "ID of the task to delete"
            }
        },
        "required": ["task_id"]
    }
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. 'Delete a task' implies a destructive, irreversible mutation, but it doesn't specify permissions needed, whether deletion is permanent or soft, error conditions, or side effects. For a destructive tool with zero annotation coverage, this is a significant gap in safety and 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 three words, with zero wasted text. It's front-loaded with the core action and resource, making it easy to parse. For a simple tool, this brevity is appropriate and efficient.

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 tool's destructive nature, lack of annotations, and no output schema, the description is incomplete. It doesn't address critical aspects like what happens after deletion (e.g., confirmation, error handling), return values, or how it interacts with sibling tools. For a mutation tool with no structured support, more context is needed to guide safe usage.

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 single parameter 'task_id' documented as 'ID of the task to delete'. The description adds no additional meaning beyond this, such as format examples or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, but there's no extra value from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Delete a task' clearly states the action (delete) and resource (task), which meets the basic requirement. However, it doesn't differentiate this tool from its siblings like 'complete_task' or 'add_task' beyond the obvious verb difference. It's specific enough to understand the core function but lacks nuance about what distinguishes deletion from other task modifications.

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), when deletion is appropriate versus completion, or any constraints. With siblings like 'complete_task' and 'list_tasks', the agent receives no help in choosing between these operations for task management.

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/gvbigdata/MCP-Github-Deployment'

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