get_trending
Fetch trending vehicle listings from Turbo.az to discover popular or newly posted cars, trucks, and other automotive options.
Instructions
Fetches most popular/new listings on Turbo.az.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Category: new, popular, vip | new |
| limit | No | Result count (default: 20) |
Implementation Reference
- src/scraper.py:538-549 (handler)The actual implementation of the get_trending tool logic.
async def get_trending(self, category: str = "new", limit: int = 20) -> dict: """Gets newest/popular listings.""" if category == "vip": url = f"{BASE_URL}/autos?q[extras][]=vip" elif category == "popular": url = f"{BASE_URL}/autos?order=view_count" else: # new url = f"{BASE_URL}/autos" # Use search_cars function return await self.search_cars(limit=limit) - src/server.py:160-178 (registration)Registration of the get_trending tool in the server.
Tool( name="get_trending", description="Fetches most popular/new listings on Turbo.az.", inputSchema={ "type": "object", "properties": { "category": { "type": "string", "description": "Category: new, popular, vip", "default": "new" }, "limit": { "type": "integer", "description": "Result count (default: 20)", "default": 20 } } } ) - src/server.py:236-240 (handler)The tool call handler for get_trending in the server.
elif name == "get_trending": category = arguments.get("category", "new") limit = arguments.get("limit", 20) results = await scraper.get_trending(category, limit) return [TextContent(type="text", text=json.dumps(results, ensure_ascii=False, indent=2))]