add_task
Create new tasks with titles and optional descriptions for personal task management within Claude Desktop.
Instructions
Add a new task to the task list
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Task title | |
| description | No | Task description (optional) |
Implementation Reference
- src/task_mcp_server/server.py:81-98 (handler)The logic that executes when the add_task tool is called.
if name == "add_task": task_counter += 1 title = arguments.get("title", "") description = arguments.get("description", "") tasks[task_counter] = { "id": task_counter, "title": title, "description": description, "completed": False } return [ types.TextContent( type="text", text=f"✅ Task added successfully!\nID: {task_counter}\nTitle: {title}" ) ] - src/task_mcp_server/server.py:18-35 (schema)Schema definition for the add_task tool.
types.Tool( name="add_task", description="Add a new task to the task list", inputSchema={ "type": "object", "properties": { "title": { "type": "string", "description": "Task title" }, "description": { "type": "string", "description": "Task description (optional)" } }, "required": ["title"] } ),