get_todos
Retrieve todos from your Things 3 task manager. Filter by project UUID and optionally include checklist items.
Instructions
Get todos from Things, optionally filtered by project
Args: project_uuid: Optional UUID of a specific project to get todos from include_items: Include checklist items
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_uuid | No | ||
| include_items | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/things_mcp/server.py:173-190 (handler)The get_todos async function that executes the tool logic. It fetches todos from Things via `things.todos()`, optionally filtered by project_uuid, and returns formatted strings.
async def get_todos(project_uuid: str = None, include_items: bool = True) -> str: """Get todos from Things, optionally filtered by project Args: project_uuid: Optional UUID of a specific project to get todos from include_items: Include checklist items """ if project_uuid: project = things.get(project_uuid) if not project or project.get('type') != 'project': return f"Error: Invalid project UUID '{project_uuid}'" todos = things.todos(project=project_uuid, start=None, include_items=include_items) if not todos: return "No todos found" formatted_todos = [format_todo(todo) for todo in todos] return "\n\n---\n\n".join(formatted_todos) - src/things_mcp/server.py:172-173 (registration)The @mcp.tool decorator registers get_todos as an MCP tool with FastMCP.
@mcp.tool async def get_todos(project_uuid: str = None, include_items: bool = True) -> str: - tests/test_things_server.py:10-14 (helper)Test that verifies get_todos includes checklist items and calls things.todos() with correct parameters.
result = await get_todos.fn(include_items=True) assert "Checklist:" in result assert "First item" in result mock_things_todos.assert_called_once_with(project=None, start=None, include_items=True)