Skip to main content
Glama

update_task_tool

Modify existing tasks by updating their title, description, or status using the task ID to manage and organize your workflow.

Instructions

Update an existing task. Args: task (Task): The task object containing updated information.

Returns: Task: The updated task object.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
titleNo
descriptionNo
statusNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
titleYesThe title of the task
statusNo
created_atNo
descriptionNoThe description of the task

Implementation Reference

  • The core handler function for the 'update_task_tool' that performs the task update logic using the database interface.
    @mcp.tool()
    async def update_task_tool(
        ctx: Context[ServerSession, AppContext],
        id: int,
        title: str | None = None,
        description: str | None = None,
        status: TaskStatus | None = None,
    ) -> Task:
        """Update an existing task.
        Args:
            task (Task): The task object containing updated information.
    
        Returns:
            Task: The updated task object.
        """
        database: DatabaseABC = ctx.request_context.lifespan_context.db
        task = database.get_task(task_id=id)
    
        if title is None or title == "":
            title = task.title
    
        if description is None or description == "":
            description = task.description
    
        if status is None:
            status = task.status
    
        task = database.update_task(
            task_id=id,
            title=title,
            description=description,
            status=status,
        )
        return Task(**task.__dict__)
  • Pydantic models for Task and TaskStatus used for type definitions, validation, and serialization in the tool's input/output.
    class TaskStatus(IntEnum):
        CREATED = 0
        IN_PROGRESS = 1
        COMPLETED = 2
    
    
    class Task(BaseModel):
        id: int = Field(default=None)
        title: str = Field(..., description="The title of the task")
        description: str = Field(default="", description="The description of the task")
        status: TaskStatus = TaskStatus.CREATED
        created_at: str = Field(default=None)
  • Registers the update_task_tool (along with other task 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?

No annotations are provided, so the description carries full burden. It states this is an update operation, implying mutation, but doesn't disclose behavioral traits like required permissions, whether partial updates are allowed, what happens with null values, or error conditions. The mention of 'The task object containing updated information' is vague and doesn't add meaningful behavioral context beyond the basic action.

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 appropriately sized and front-loaded with the core purpose in the first sentence. The 'Args' and 'Returns' sections are structured clearly, though they could be more informative. There's no wasted text, but the brevity comes at the cost of completeness.

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 a mutation tool with 4 parameters, 0% schema description coverage, no annotations, but with an output schema (which handles return values), the description is minimally adequate. It covers the basic action and I/O structure but lacks crucial details like parameter meanings, usage context, and behavioral transparency, making it incomplete for safe and effective use.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions 'task (Task): The task object containing updated information' but provides no details on what fields can be updated, their formats, or constraints. This adds minimal semantic value beyond the schema's property names like 'id', 'title', 'description', and 'status', leaving parameters largely undocumented.

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 ('Update') and resource ('an existing task'), making the purpose immediately understandable. It distinguishes this from creation tools like 'add_task_tool' by specifying 'existing task', though it doesn't explicitly differentiate from other update-related operations that might exist in the sibling set.

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. With siblings like 'add_task_tool', 'delete_task_tool', and 'get_task_tool', there's no indication of when this update operation is appropriate versus creating new tasks, deleting them, or retrieving them. The description assumes the user already knows when updates are needed.

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