Skip to main content
Glama
discava

discava – Business Directory for AI

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
NameRequiredDescriptionDefault
countryYesISO country code (required)
categoryNoCategory slug or name
cityNoCity name
limitNoResults (1-20)
langNoLanguage for labelsen

Implementation Reference

  • 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}`));
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/discava/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server