get_rankings
Retrieve top-ranked businesses by demand score from Discava's global directory. Filter by country, category, or city to find high-demand local businesses.
Instructions
Get top businesses by demand score.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| country | Yes | ISO country code (required) | |
| category | No | Category slug or name | |
| city | No | City name | |
| limit | No | Results (1-20) | |
| lang | No | Language for labels | en |
Implementation Reference
- server.ts:106-124 (handler)The tool 'get_rankings' is defined and implemented within the server.tool() registration in server.ts. It fetches ranking data from the /ranking API endpoint based on provided search parameters.
server.tool( 'get_rankings', 'Get top businesses by demand score.', { country: z.string().describe('ISO country code (required)'), category: z.string().optional().describe('Category slug or name'), city: z.string().optional().describe('City name'), limit: z.number().optional().default(10).describe('Results (1-20)'), lang: z.string().optional().default('en').describe('Language for labels'), }, async ({ country, category, city, limit, lang }) => { const params = new URLSearchParams({ country }); if (category) params.set('category', category); if (city) params.set('city', city); if (limit) params.set('limit', String(limit)); if (lang) params.set('lang', lang); return jsonContent(await api(`/ranking?${params}`)); } );