Skip to main content
Glama
discava

discava – Business Directory for AI

suggest

Provides autocomplete suggestions for cities or business categories to help users quickly find relevant local businesses in the discava directory.

Instructions

Autocomplete for cities or categories/business names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch text (min 2 chars)
typeNo"city" or "query"query
countryNoISO country code to filter
limitNoMax suggestions

Implementation Reference

  • The 'suggest' tool is registered using `server.tool` and handles the request by building URL parameters and calling the `api` function with the `/suggest` endpoint.
    server.tool(
      'suggest',
      'Autocomplete for cities or categories/business names.',
      {
        query: z.string().describe('Search text (min 2 chars)'),
        type: z.enum(['city', 'query']).optional().default('query').describe('"city" or "query"'),
        country: z.string().optional().describe('ISO country code to filter'),
        limit: z.number().optional().default(10).describe('Max suggestions'),
      },
      async ({ query, type, country, limit }) => {
        const params = new URLSearchParams({ q: query, type });
        if (country) params.set('country', country);
        if (limit) params.set('limit', String(limit));
        return jsonContent(await api(`/suggest?${params}`));
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool is for autocomplete but doesn't cover aspects like rate limits, authentication needs, error handling, or response format. This leaves significant gaps for a tool with 4 parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary elaboration, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (4 parameters, no annotations, no output schema), the description is incomplete. It lacks details on behavioral traits, output format, and usage context, which are crucial for an autocomplete tool that likely returns structured suggestions. The high schema coverage doesn't compensate for these gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value by hinting at the 'type' parameter's purpose (city vs. query), but it doesn't provide additional syntax or format details beyond what the schema offers, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as 'Autocomplete for cities or categories/business names,' which specifies the verb (autocomplete) and resources (cities, categories/business names). It distinguishes from siblings like get_business or search_businesses by focusing on suggestions rather than retrieval or search, though it doesn't explicitly name alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to prefer suggest over search_businesses or get_business, nor does it specify prerequisites or exclusions, leaving usage context implied at best.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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