Skip to main content
Glama

complete_task

Mark a task as completed by providing its ID to update task status in the Task MCP Server.

Instructions

Mark a task as completed

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesID of the task to complete

Implementation Reference

  • Executes the complete_task tool: retrieves task_id from arguments, checks if task exists, marks it as completed, and returns a success message.
    elif name == "complete_task":
        task_id = int(arguments.get("task_id", 0))
        
        if task_id not in tasks:
            return [
                types.TextContent(
                    type="text",
                    text=f"❌ Task {task_id} not found"
                )
            ]
        
        tasks[task_id]["completed"] = True
        return [
            types.TextContent(
                type="text",
                text=f"✅ Task {task_id} marked as completed: {tasks[task_id]['title']}"
            )
        ]
  • Registers the 'complete_task' tool in the list_tools handler, including its name, description, and input schema requiring a numeric task_id.
    types.Tool(
        name="complete_task",
        description="Mark a task as completed",
        inputSchema={
            "type": "object",
            "properties": {
                "task_id": {
                    "type": "number",
                    "description": "ID of the task to complete"
                }
            },
            "required": ["task_id"]
        }
    ),
  • Defines the input schema for the complete_task tool, specifying an object with a required numeric 'task_id' property.
    types.Tool(
        name="complete_task",
        description="Mark a task as completed",
        inputSchema={
            "type": "object",
            "properties": {
                "task_id": {
                    "type": "number",
                    "description": "ID of the task to complete"
                }
            },
            "required": ["task_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. 'Mark a task as completed' implies a mutation operation, but it doesn't specify whether this requires permissions, if it's reversible, what happens to subtasks or dependencies, or what the response looks like. This leaves significant behavioral gaps for a mutation tool.

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 a single, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately understandable without unnecessary elaboration.

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?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'completed' means in this context (e.g., status change, timestamp update), whether there are side effects, or what the agent should expect after invocation. Given the complexity of task completion operations, more context is needed.

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

Parameters3/5

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

Schema description coverage is 100% (the single parameter 'task_id' is fully documented in the schema), so the baseline is 3. The description doesn't add any parameter-specific details beyond what the schema provides (e.g., format examples, validation rules), but it doesn't need to since the schema already covers it adequately.

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 verb ('Mark') and resource ('a task') with the specific action 'as completed'. It distinguishes from siblings like 'add_task' (create), 'delete_task' (remove), and 'list_tasks' (read), but doesn't explicitly mention these distinctions in the description itself.

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?

The description provides no guidance on when to use this tool versus alternatives like 'delete_task' or how it relates to 'list_tasks'. It doesn't mention prerequisites (e.g., task must exist) or contextual constraints, leaving the agent to infer usage from the tool name alone.

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/gvbigdata/MCP-Github-Deployment'

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