Skip to main content
Glama

complete_current_task

Mark the current task as completed while keeping it visible for reference, then automatically shift focus to the next incomplete task to maintain workflow continuity.

Instructions

Mark current task as COMPLETED. Task remains visible in structure (living document approach). Focus automatically moves to a nearby incomplete task. Creates permanent record in history. You can use switch_focus to work on any specific task instead. Use remove_task to clean up workspace later.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'complete_current_task' tool. It calls the task_manager to complete the task and returns a structured response with details about the completed task and new current task.
    async def handle_complete_current_task(self) -> Dict[str, Any]:
        completed = self.task_manager.complete_current_task()
        if not completed:
            return {"error": "No current task to complete"}
    
        new_current = self.task_manager.current_task
    
        response = {
            "completed_task_id": completed.id,
            "completed_task_title": completed.title,
            "new_current_task_id": new_current.id if new_current else None,
            "new_current_task_title": (
                new_current.title if new_current else "No active tasks (zen state)"
            ),
        }
    
        # Add focus path if there's a new current task
        if new_current:
            response["focus_path"] = self.task_manager.get_focus_path()
            response["navigation_hint"] = (
                f"Focus moved to '{new_current.title}'. Use switch_focus to work on any other task."
            )
    
        return response
  • The input schema and description for the 'complete_current_task' tool, defined in get_tool_definitions().
    Tool(
        name="complete_current_task",
        description="Mark current task as COMPLETED. Task remains visible in structure (living document approach). Focus automatically moves to a nearby incomplete task. Creates permanent record in history. You can use switch_focus to work on any specific task instead. Use remove_task to clean up workspace later.",
        inputSchema={"type": "object", "properties": {}},
    ),
  • src/server.py:59-59 (registration)
    Registration of the tool handler in the call_tool dispatcher map.
    "complete_current_task": handlers.handle_complete_current_task,
  • The core logic method in TaskManager that marks the current task as completed and manages focus shifting to the next appropriate task.
    def complete_current_task(self) -> Optional[Task]:
        current = self.current_task
        if not current:
            return None
    
        current.status = TaskStatus.COMPLETED
        current.completed_at = datetime.now()
        self.completed_tasks.append(current)
    
        self._manual_current_task = None  # Clear manual focus
    
        # Find the next incomplete task to focus on
        # First, look for incomplete siblings to the left
        if isinstance(current, SubTask):
            # Find which main task contains this subtask
            for main_task in self.global_tasks:
                if current in main_task.sub_tasks:
                    # Look for incomplete subtasks to the left
                    current_index = main_task.sub_tasks.index(current)
                    for i in range(current_index - 1, -1, -1):
                        if main_task.sub_tasks[i].status != TaskStatus.COMPLETED:
                            main_task.sub_tasks[i].status = TaskStatus.CURRENT
                            return current
    
                    # No incomplete siblings, make parent current if incomplete
                    if main_task.status != TaskStatus.COMPLETED:
                        main_task.status = TaskStatus.CURRENT
                    else:
                        # Parent is also complete, find previous incomplete main task
                        self._find_and_focus_previous_incomplete_task()
                    break
        else:
            # Current is a main task, find previous incomplete main task
            self._find_and_focus_previous_incomplete_task()
    
        return current
Behavior4/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 effectively describes key behaviors: the task remains visible (living document approach), focus moves automatically, and a permanent history record is created. However, it doesn't address potential side effects like error conditions or what happens if no incomplete tasks are nearby.

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 efficiently structured with four concise sentences, each adding distinct value: the core action, visibility behavior, focus movement, history recording, and explicit alternative tools. There is no wasted text, and information is front-loaded with the primary purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation with behavioral nuances), no annotations, and no output schema, the description does well by covering the core action, persistence model, focus behavior, and alternatives. However, it lacks details on error handling or the exact criteria for 'nearby incomplete task,' leaving minor gaps in 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 input schema has 0 parameters with 100% coverage, so the baseline is 4. The description appropriately adds no parameter information since none are needed, focusing instead on behavioral aspects. No compensation is required for missing parameter details.

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 ('Mark current task as COMPLETED') and resource ('current task'), distinguishing it from siblings like 'remove_task' (which deletes) and 'update_current_task' (which modifies). It explicitly mentions the 'living document approach' where tasks remain visible, providing clear differentiation.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use alternatives: 'Use switch_focus to work on any specific task instead' and 'Use remove_task to clean up workspace later.' It also implies usage context by noting that focus automatically moves to a nearby incomplete task after completion.

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/cheezcake/aidderall_mcp'

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