Skip to main content
Glama
kshayk

AviBase MCP Server

by kshayk

search_birds

Find bird species by scientific or common name using fuzzy matching to identify avian data from the AviBase dataset.

Instructions

Search for birds by scientific or common name with fuzzy matching support.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch term (bird name to search for)
exactNoWhether to use exact matching (default: false for fuzzy search)
limitNoMaximum number of results to return (default: 20)

Implementation Reference

  • The main handler function that implements the search_birds tool logic. It constructs an API endpoint based on query parameters, fetches data from the bird API, maps the response to a simplified format, and returns a formatted markdown text response listing the matching birds with details.
      async handleSearchBirds(args) {
        const { query, exact = false, limit = 20 } = args;
        const endpoint = `/search?q=${encodeURIComponent(query)}&exact=${exact}&limit=${limit}`;
        const response = await this.makeAPIRequest(endpoint);
    
        const results = response.data.map(bird => ({
          scientific_name: bird.Scientific_name,
          common_name: bird.English_name_AviList || 'No common name',
          family: bird.Family,
          order: bird.Order,
          conservation_status: bird.IUCN_Red_List_Category || 'Not assessed',
          authority: bird.Authority,
        }));
    
        return {
          content: [
            {
              type: 'text',
              text: `# Search Results for "${query}"
    
    Found **${response.pagination.totalItems}** birds matching "${query}" (showing ${results.length}):
    
    ${results.map((bird, i) => `${i + 1}. **${bird.scientific_name}**
       - Common name: ${bird.common_name}
       - Family: ${bird.family}
       - Order: ${bird.order}
       - Conservation: ${bird.conservation_status}
       - Authority: ${bird.authority || 'Unknown'}`).join('\n\n')}
    
    ${response.pagination.hasNext ? `\n*Note: ${response.pagination.totalItems - results.length} more results available. Use a higher limit to see more.*` : ''}`,
            },
          ],
        };
      }
  • The input schema definition for the search_birds tool, specifying the expected parameters: query (string, required), exact (boolean, optional), and limit (number, optional). This is returned by the listTools handler.
      name: 'search_birds',
      description: 'Search for birds by scientific or common name with fuzzy matching support.',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search term (bird name to search for)',
          },
          exact: {
            type: 'boolean',
            description: 'Whether to use exact matching (default: false for fuzzy search)',
            default: false,
          },
          limit: {
            type: 'number',
            description: 'Maximum number of results to return (default: 20)',
            default: 20,
          },
        },
        required: ['query'],
      },
    },
  • mcp-server.js:291-292 (registration)
    The switch case in the CallToolRequestSchema handler that registers and dispatches calls to the search_birds tool by invoking the handleSearchBirds method.
    case 'search_birds':
      return await this.handleSearchBirds(args);
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 mentions 'fuzzy matching support' and implies a search operation, but lacks details on permissions, rate limits, error handling, or what the response looks like (e.g., result format, pagination). For a search tool with zero annotation coverage, this leaves significant behavioral gaps.

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 that front-loads the core functionality ('Search for birds') and includes essential details without waste. Every word contributes to understanding the tool's purpose and key feature.

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 moderate complexity (search with parameters), no annotations, and no output schema, the description is incomplete. It lacks information on behavioral traits (e.g., safety, performance), output format, and differentiation from siblings, making it inadequate for full agent understanding in this context.

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?

The schema description coverage is 100%, so the input schema fully documents all three parameters (query, exact, limit). The description adds minimal value beyond the schema by hinting at 'fuzzy matching' (related to the 'exact' parameter) but does not provide additional syntax or format details. This meets the baseline for high schema 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 with a specific verb ('Search for birds') and resource ('birds'), and specifies search criteria ('by scientific or common name') and a key feature ('fuzzy matching support'). However, it does not explicitly differentiate this tool from its many siblings (e.g., get_birds_by_region, get_birds_by_taxonomy), which limits its clarity in a crowded toolset.

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 its siblings, such as custom_bird_query or get_birds_by_region. It implies usage for name-based searches but does not specify exclusions or alternatives, leaving the agent to infer context without explicit direction.

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/kshayk/avibase-mcp'

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