list_recent
Retrieve recent episodes from the MCP Standards server to access current content and updates.
Instructions
List recent episodes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results |
Implementation Reference
- src/mcp_standards/server.py:156-165 (registration)Registration of the 'list_recent' tool in the list_tools handler, including its description and input schema (optional limit parameter).Tool( name="list_recent", description="List recent episodes", inputSchema={ "type": "object", "properties": { "limit": {"type": "integer", "description": "Max results", "default": 10}, }, }, ),
- src/mcp_standards/server.py:374-394 (handler)Core handler implementation for 'list_recent' tool. Queries SQLite episodes table for most recent entries ordered by timestamp DESC, limited by input limit (default 10), returns success, results list, and count.async def _list_recent(self, limit: int = 10) -> Dict[str, Any]: """List recent episodes""" try: with sqlite3.connect(self.db_path) as conn: conn.row_factory = sqlite3.Row cursor = conn.execute(""" SELECT id, name, content, source, timestamp FROM episodes ORDER BY timestamp DESC LIMIT ? """, (limit,)) episodes = [dict(row) for row in cursor.fetchall()] return { "success": True, "results": episodes, "count": len(episodes) } except Exception as e: return {"success": False, "error": str(e)}
- src/mcp_standards/enhanced_server.py:107-116 (registration)Registration of the 'list_recent' tool in enhanced_server list_tools, with note about cost-efficient model routing.Tool( name="list_recent", description="List recent episodes (uses cost-efficient model)", inputSchema={ "type": "object", "properties": { "limit": {"type": "integer", "description": "Max results", "default": 10}, }, }, ),
- Identical core handler implementation in enhanced_server.async def _list_recent(self, limit: int = 10) -> Dict[str, Any]: """List recent episodes""" try: with sqlite3.connect(self.db_path) as conn: conn.row_factory = sqlite3.Row cursor = conn.execute(""" SELECT id, name, content, source, timestamp FROM episodes ORDER BY timestamp DESC LIMIT ? """, (limit,)) episodes = [dict(row) for row in cursor.fetchall()] return { "success": True, "results": episodes, "count": len(episodes) } except Exception as e: return {"success": False, "error": str(e)}
- Classification of 'list_recent' as SIMPLE task complexity for model routing to cost-efficient models."list_recent": TaskComplexity.SIMPLE,