Skip to main content
Glama

delete_task_tool

Remove tasks from the task management system by specifying their unique ID to clear completed or unnecessary items.

Instructions

Delete a task by ID. Args: task_id (int): The ID of the task to delete.

Returns: None

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The async handler function for the 'delete_task_tool' that retrieves the database from context, calls delete_task on it, and returns a success message.
    @mcp.tool()
    async def delete_task_tool(
        ctx: Context[ServerSession, AppContext], task_id: int
    ) -> str:
        """Delete a task by ID.
        Args:
            task_id (int): The ID of the task to delete.
    
        Returns:
            None
        """
        database: DatabaseABC = ctx.request_context.lifespan_context.db
        database.delete_task(task_id=task_id)
        return f"Task {task_id} deleted successfully."
  • The call to create_tasks_tools(mcp) which registers the delete_task_tool among other tasks tools on the FastMCP server instance.
    create_tasks_tools(mcp)
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 tool deletes a task but fails to mention critical traits like whether deletion is permanent or reversible, what happens to associated data, required permissions, or error handling (e.g., for invalid IDs). This leaves significant gaps for safe agent usage.

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 front-loaded with the core purpose ('Delete a task by ID.') and uses a structured format for args and returns, making it easy to parse. However, the 'Args:' and 'Returns:' sections are somewhat redundant given the input/output schemas, slightly reducing efficiency.

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?

Given the tool's destructive nature, no annotations, and a simple input schema, the description is minimally adequate but incomplete. It covers the basic operation and parameter but lacks details on behavioral risks, error cases, or output implications (though the output schema indicates 'None', reducing need for return value explanation). More context on safety and usage would improve completeness.

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 adds meaningful context for the single parameter 'task_id' by specifying it as 'The ID of the task to delete', which clarifies its purpose beyond the schema's basic type definition. Since schema description coverage is 0% and there's only one parameter, this compensates adequately, though it could detail ID format or validation rules.

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

Purpose5/5

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

The description clearly states the specific action ('Delete') and resource ('a task by ID'), distinguishing it from sibling tools like 'add_task_tool', 'update_task_tool', or 'get_task_tool'. It directly communicates the tool's function without ambiguity.

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 like 'update_task_tool' for modifying tasks or 'filter_tasks_tool' for managing tasks without deletion. The description lacks context about prerequisites, such as confirming task existence or handling dependencies, which is critical for a destructive operation.

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/chipocrudos/tasks-mcp'

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