complete_task
Mark a task as completed by providing its ID to update task status in the Task MCP Server's management system.
Instructions
Mark a task as completed
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task_id": "<task_id>"
},
"name": "complete_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | ID of the task to complete |
Implementation Reference
- src/task_mcp_server/server.py:123-140 (handler)The handler logic for "complete_task" which updates the in-memory task dictionary to mark a task as completed.
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']}" ) ] - src/task_mcp_server/server.py:44-57 (schema)The schema definition for "complete_task" within the list_tools method.
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"] } ),