search_advanced
Search and filter todos in the Things app by status, start date, deadline, tag, area, or type for precise task management and tracking.
Instructions
Advanced todo search with multiple filters
Args: status: Filter by todo status (incomplete, completed, canceled) start_date: Filter by start date (YYYY-MM-DD) deadline: Filter by deadline (YYYY-MM-DD) tag: Filter by tag area: Filter by area UUID type: Filter by item type (to-do, project, heading)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| area | No | ||
| deadline | No | ||
| start_date | No | ||
| status | No | ||
| tag | No | ||
| type | No |
Implementation Reference
- things_server.py:201-239 (handler)The main handler function for the 'search_advanced' tool. It is registered via the @mcp.tool decorator. Constructs a search_params dictionary from optional input parameters and queries the 'things.todos' API with these filters, then formats and returns the results using format_todo.@mcp.tool async def search_advanced( status: str = None, start_date: str = None, deadline: str = None, tag: str = None, area: str = None, type: str = None ) -> str: """Advanced todo search with multiple filters Args: status: Filter by todo status (incomplete, completed, canceled) start_date: Filter by start date (YYYY-MM-DD) deadline: Filter by deadline (YYYY-MM-DD) tag: Filter by tag area: Filter by area UUID type: Filter by item type (to-do, project, heading) """ search_params = {} if status: search_params["status"] = status if start_date: search_params["start_date"] = start_date if deadline: search_params["deadline"] = deadline if tag: search_params["tag"] = tag if area: search_params["area"] = area if type: search_params["type"] = type todos = things.todos(include_items=True, **search_params) if not todos: return "No matching todos found" formatted_todos = [format_todo(todo) for todo in todos] return "\n\n---\n\n".join(formatted_todos)