Skip to main content
Glama

set_task_name

Update a task's name by supplying the new name and optionally locating it via current name, task ID, or series ID.

Instructions

Rename a task.

Args: new_name: New name for the task task_name: Current task name to search for task_id: Specific task ID taskseries_id: Task series ID list_id: List ID

Returns: Updated task details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
new_nameYes
task_nameNo
task_idNo
taskseries_idNo
list_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function for the 'set_task_name' tool. Renames a task by calling rtm.tasks.setName. Resolves task IDs via _resolve_task_ids, returns updated task details.
    @mcp.tool()
    async def set_task_name(
        ctx: Context,
        new_name: str,
        task_name: str | None = None,
        task_id: str | None = None,
        taskseries_id: str | None = None,
        list_id: str | None = None,
    ) -> dict[str, Any]:
        """Rename a task.
    
        Args:
            new_name: New name for the task
            task_name: Current task name to search for
            task_id: Specific task ID
            taskseries_id: Task series ID
            list_id: List ID
    
        Returns:
            Updated task details
        """
        client: RTMClient = await get_client()
        ids = await _resolve_task_ids(client, task_name, task_id, taskseries_id, list_id)
        if "error" in ids:
            return build_response(data=ids)
    
        result = await client.call(
            "rtm.tasks.setName",
            require_timeline=True,
            name=new_name,
            **ids,
        )
    
        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"Renamed to: {new_name}",
            },
            transaction_id=get_transaction_id(result),
        )
  • Docstring acting as schema for input parameters (new_name required, task_name/task_id/taskseries_id/list_id optional) and return type.
    """Rename a task.
    
    Args:
        new_name: New name for the task
        task_name: Current task name to search for
        task_id: Specific task ID
        taskseries_id: Task series ID
        list_id: List ID
    
    Returns:
        Updated task details
    """
  • Registration point: register_task_tools(mcp, get_client) is called, which registers set_task_name as an MCP tool via @mcp.tool() decorator inside the function.
    register_task_tools(mcp, get_client)
  • register_task_tools function that registers all task tools including set_task_name via @mcp.tool() decorator.
    def register_task_tools(mcp: Any, get_client: Any) -> None:
  • Helper function _resolve_task_ids used by set_task_name to resolve task identifiers by name or IDs.
    async def _resolve_task_ids(
        client: RTMClient,
        task_name: str | None,
        task_id: str | None,
        taskseries_id: str | None,
        list_id: str | None,
    ) -> dict[str, Any]:
        """Resolve task identifiers, searching by name if needed."""
        if task_name and not task_id:
            task = await _find_task(client, task_name)
            if not task:
                return {"error": f"Task not found: {task_name}"}
            return {
                "task_id": task["id"],
                "taskseries_id": task["taskseries_id"],
                "list_id": task["list_id"],
            }
    
        if not all([task_id, taskseries_id, list_id]):
            return {"error": "Must provide task_name or all three IDs"}
    
        return {
            "task_id": task_id,
            "taskseries_id": taskseries_id,
            "list_id": list_id,
        }
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 only states it renames a task and returns updated details, but omits critical traits such as permission requirements, error handling (e.g., what happens if the task is not found or name is duplicate), or side effects (e.g., does it update a history log?). The lack of behavioral context leaves the agent guessing.

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 short (two sentences plus an Args/Returns block) and front-loaded with the core action. The structured format is easy to parse. However, the Args section largely repeats parameter names without adding value, and the Returns section is minimal. Still, it is appropriately sized and wastes no space.

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 complexity of the input schema (5 parameters, optional nulls, no descriptions) and the number of sibling tools, the description lacks essential context: how to correctly select and combine identifier parameters, what the return structure looks like, and how this action interacts with the system (e.g., permissions, side effects). The description is too sparse to fully guide invocation.

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?

The schema has 0% coverage, so the description must explain parameter semantics. It lists parameters like new_name, task_name, task_id, etc., but does not clarify their roles: e.g., how to identify the task (one of task_name, task_id, taskseries_id, or list_id?), or what happens if multiple are provided. The meaning is only barely deducible from parameter names, which is insufficient for correct invocation.

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 starts with 'Rename a task,' which clearly states the verb (rename) and the resource (task). This distinguishes it from sibling tools like set_task_due_date or set_task_priority, which modify other attributes. The purpose is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage through the tool name and description, but provides no explicit guidance on when to use this tool versus alternatives, nor does it mention when not to use it. It also lacks explanation of the conditions under which renaming is appropriate (e.g., task must exist). The usage is implied but not clarified.

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