get_recent
Retrieve recently created items from the Things app by specifying a time period (e.g., '3d', '1w', '2m'). Use this to track and manage tasks or projects efficiently.
Instructions
Get recently created items
Args: period: Time period (e.g., '3d', '1w', '2m', '1y')
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | Yes |
Implementation Reference
- things_server.py:242-254 (handler)The main handler function for the 'get_recent' MCP tool. It is registered via the @mcp.tool decorator. Fetches recently created items using the 'things.last' function based on the provided period and formats them using 'format_todo'.@mcp.tool async def get_recent(period: str) -> str: """Get recently created items Args: period: Time period (e.g., '3d', '1w', '2m', '1y') """ todos = things.last(period, include_items=True) if not todos: return f"No items found in the last {period}" formatted_todos = [format_todo(todo) for todo in todos] return "\n\n---\n\n".join(formatted_todos)