Skip to main content
Glama

uncomplete_task

Reopens a completed task to restore it to active status. Supports lookup by task name, ID, series ID, or list ID.

Instructions

Reopen a completed task.

Args: task_name: Task name to search for (searches completed tasks) task_id: Specific task ID taskseries_id: Task series ID list_id: List ID

Returns: Reopened task details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_nameNo
task_idNo
taskseries_idNo
list_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The uncomplete_task handler function decorated with @mcp.tool(). Accepts task_name, task_id, taskseries_id, and list_id. Searches for a completed task if task_name is provided, then calls rtm.tasks.uncomplete API to reopen it. Returns the reopened task details with a transaction ID for undo.
    @mcp.tool()
    async def uncomplete_task(
        ctx: Context,
        task_name: str | None = None,
        task_id: str | None = None,
        taskseries_id: str | None = None,
        list_id: str | None = None,
    ) -> dict[str, Any]:
        """Reopen a completed task.
    
        Args:
            task_name: Task name to search for (searches completed tasks)
            task_id: Specific task ID
            taskseries_id: Task series ID
            list_id: List ID
    
        Returns:
            Reopened task details
        """
        client: RTMClient = await get_client()
    
        if task_name and not task_id:
            task = await _find_task(client, task_name, include_completed=True)
            if not task:
                return build_response(
                    data={"error": f"Completed task not found: {task_name}"},
                )
            if not task.get("completed"):
                return build_response(
                    data={"error": f"Task is not completed: {task_name}"},
                )
            task_id = task["id"]
            taskseries_id = task["taskseries_id"]
            list_id = task["list_id"]
    
        if not all([task_id, taskseries_id, list_id]):
            return build_response(
                data={"error": "Must provide task_name or all three IDs"},
            )
    
        result = await client.call(
            "rtm.tasks.uncomplete",
            require_timeline=True,
            list_id=list_id,
            taskseries_id=taskseries_id,
            task_id=task_id,
        )
    
        tasks = parse_tasks_response(result)
        task_data = tasks[0] if tasks else {}
        timezone = await _get_user_timezone(client)
    
        return build_response(
            data={
                "task": format_task(task_data, timezone=timezone),
                "message": f"Reopened: {task_data.get('name', '')}",
            },
            transaction_id=get_transaction_id(result),
        )
  • Docstring/input schema for uncomplete_task defining parameters: task_name (searches completed tasks), task_id, taskseries_id, list_id, and the return value description.
    ) -> dict[str, Any]:
        """Reopen a completed task.
    
        Args:
            task_name: Task name to search for (searches completed tasks)
            task_id: Specific task ID
            taskseries_id: Task series ID
            list_id: List ID
    
        Returns:
            Reopened task details
        """
  • Registration point: register_task_tools(mcp, get_client) is called from server.py, which registers all task tools including uncomplete_task via the @mcp.tool() decorator inside the register_task_tools function.
    register_task_tools(mcp, get_client)
  • The _find_task helper function used by uncomplete_task to search for a task by name with fuzzy matching (exact then partial). Called with include_completed=True to find completed tasks to reopen.
    async def _find_task(
        client: RTMClient,
        name: str,
        include_completed: bool = False,
    ) -> dict[str, Any] | None:
        """Find a task by name (fuzzy match)."""
        filter_str = "status:incomplete" if not include_completed else None
    
        if filter_str:
            result = await client.call("rtm.tasks.getList", filter=filter_str)
        else:
            result = await client.call("rtm.tasks.getList")
        tasks = parse_tasks_response(result)
    
        name_lower = name.lower()
    
        # Exact match first
        for task in tasks:
            if task["name"].lower() == name_lower:
                return task
    
        # Partial match
        for task in tasks:
            if name_lower in task["name"].lower():
                return task
    
        return None
  • The register_task_tools function that wraps all task tool definitions including the @mcp.tool() decorator registrations for uncomplete_task and other task tools.
    def register_task_tools(mcp: Any, get_client: Any) -> None:
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits, but it only provides a high-level action ('Reopen a completed task'). It lacks critical details such as side effects (e.g., does it change status, recalendar?), error conditions, or what happens if the task is already open.

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

Conciseness3/5

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

The description is relatively concise with a clear first sentence and a structured Args/Returns list. However, the list is somewhat verbose (e.g., repeating 'task_name', 'task_id'), and the return type could be integrated more smoothly.

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 that the tool has four optional parameters and no required ones, the description should explain how to correctly identify the task (e.g., uniqueness constraints). The output schema exists but is not described in detail (only 'Reopened task details'), leaving ambiguity about the response format.

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 coverage is 0%, so the description must compensate. It lists four parameters with brief explanations (e.g., 'Task name to search for (searches completed tasks)'), but does not clarify their relationships (e.g., how they combine or which is preferred). This adds minimal value beyond the raw schema.

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 'Reopen a completed task' using a specific verb and resource, making the tool's purpose immediately understandable. However, it does not explicitly differentiate from sibling tools like complete_task or undo, which could cause confusion.

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 explicit usage guidance is given. The description does not mention when to use this tool versus alternatives (e.g., undo, complete_task), nor does it specify prerequisites such as the task must be completed before reopening.

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/ljadach/rtm-mcp'

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