Skip to main content
Glama
knustx

ITIS MCP Server

by knustx

search_by_vernacular_name

Search the ITIS database for organisms using common names like 'human', 'dog', or 'oak tree' to retrieve taxonomic information and scientific classifications.

Instructions

Search for organisms by their common/vernacular names in ITIS database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vernacularNameYesCommon/vernacular name to search for (e.g., "human", "dog", "oak tree")
rowsNoNumber of results to return (default: 10)
startNoStarting index for pagination (default: 0)

Implementation Reference

  • MCP tool handler implementation for search_by_vernacular_name: extracts parameters (vernacularName, rows, start), invokes ITISClient.searchByVernacularName, processes results by extracting key fields and formatting common names using processVernacularNames, returns JSON response with search metadata and mapped results.
    case 'search_by_vernacular_name': {
      const { vernacularName, rows, start } = args as any;
      const result = await itisClient.searchByVernacularName(vernacularName, { rows, start });
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              searchTerm: vernacularName,
              searchType: 'vernacular/common name',
              totalResults: result.response.numFound,
              start: result.response.start,
              results: result.response.docs.map((doc: any) => ({
                tsn: doc.tsn,
                scientificName: doc.nameWInd,
                kingdom: doc.kingdom,
                rank: doc.rank,
                commonNames: processVernacularNames(doc.vernacular, 'English'),
                usage: doc.usage,
              })),
            }, null, 2),
          },
        ],
      };
    }
  • Tool definition including name, description, and input schema for search_by_vernacular_name, defining required vernacularName and optional pagination parameters.
    {
      name: 'search_by_vernacular_name',
      description: 'Search for organisms by their common/vernacular names in ITIS database.',
      inputSchema: {
        type: 'object',
        properties: {
          vernacularName: {
            type: 'string',
            description: 'Common/vernacular name to search for (e.g., "human", "dog", "oak tree")',
          },
          rows: {
            type: 'number',
            description: 'Number of results to return (default: 10)',
          },
          start: {
            type: 'number',
            description: 'Starting index for pagination (default: 0)',
          },
        },
        required: ['vernacularName'],
      },
    },
  • src/tools.ts:11-257 (registration)
    The tools array exports all MCP tools including search_by_vernacular_name, used by ListToolsRequestHandler to list available tools.
    export const tools: Tool[] = [
      {
        name: 'search_itis',
        description: 'Search ITIS database using SOLR queries. Supports general search with flexible query parameters.',
        inputSchema: {
          type: 'object',
          properties: {
            query: {
              type: 'string',
              description: 'SOLR query string (e.g., "nameWInd:Homo*", "kingdom:Plantae", or "*:*" for all)',
            },
            start: {
              type: 'number',
              description: 'Starting index for pagination (default: 0)',
            },
            rows: {
              type: 'number',
              description: 'Number of results to return (default: 10, max: 100)',
            },
            sort: {
              type: 'string',
              description: 'Sort order (e.g., "nameWInd asc", "tsn desc")',
            },
            fields: {
              type: 'array',
              items: { type: 'string' },
              description: 'Specific fields to return (default: all available fields)',
            },
            filters: {
              type: 'object',
              additionalProperties: { type: 'string' },
              description: 'Additional filters as key-value pairs (e.g., {"kingdom": "Animalia", "rank": "Species"})',
            },
          },
        },
      },
      {
        name: 'search_by_scientific_name',
        description: 'Search for organisms by their scientific name in ITIS database.',
        inputSchema: {
          type: 'object',
          properties: {
            name: {
              type: 'string',
              description: 'Scientific name to search for (e.g., "Homo sapiens", "Quercus")',
            },
            rows: {
              type: 'number',
              description: 'Number of results to return (default: 10)',
            },
            start: {
              type: 'number',
              description: 'Starting index for pagination (default: 0)',
            },
          },
          required: ['name'],
        },
      },
      {
        name: 'search_by_tsn',
        description: 'Search for organisms by their Taxonomic Serial Number (TSN) in ITIS database.',
        inputSchema: {
          type: 'object',
          properties: {
            tsn: {
              type: 'string',
              description: 'Taxonomic Serial Number (TSN) to search for',
            },
          },
          required: ['tsn'],
        },
      },
      {
        name: 'search_by_kingdom',
        description: 'Search for organisms within a specific kingdom in ITIS database.',
        inputSchema: {
          type: 'object',
          properties: {
            kingdom: {
              type: 'string',
              description: 'Kingdom name (e.g., "Animalia", "Plantae", "Fungi", "Bacteria")',
            },
            rows: {
              type: 'number',
              description: 'Number of results to return (default: 10)',
            },
            start: {
              type: 'number',
              description: 'Starting index for pagination (default: 0)',
            },
          },
          required: ['kingdom'],
        },
      },
      {
        name: 'search_by_rank',
        description: 'Search for organisms by their taxonomic rank in ITIS database.',
        inputSchema: {
          type: 'object',
          properties: {
            rank: {
              type: 'string',
              description: 'Taxonomic rank (e.g., "Species", "Genus", "Family", "Order", "Class", "Phylum", "Kingdom")',
            },
            rows: {
              type: 'number',
              description: 'Number of results to return (default: 10)',
            },
            start: {
              type: 'number',
              description: 'Starting index for pagination (default: 0)',
            },
          },
          required: ['rank'],
        },
      },
      {
        name: 'get_hierarchy',
        description: 'Get the complete taxonomic hierarchy for a given TSN.',
        inputSchema: {
          type: 'object',
          properties: {
            tsn: {
              type: 'string',
              description: 'Taxonomic Serial Number (TSN) to get hierarchy for',
            },
          },
          required: ['tsn'],
        },
      },
      {
        name: 'autocomplete_search',
        description: 'Search for organisms with autocomplete functionality using partial names.',
        inputSchema: {
          type: 'object',
          properties: {
            partialName: {
              type: 'string',
              description: 'Partial scientific name for autocomplete (e.g., "Homo", "Quer")',
            },
            rows: {
              type: 'number',
              description: 'Number of results to return (default: 10)',
            },
          },
          required: ['partialName'],
        },
      },
      {
        name: 'get_statistics',
        description: 'Get basic statistics about the ITIS database (total number of records).',
        inputSchema: {
          type: 'object',
          properties: {},
        },
      },
      {
        name: 'search_by_vernacular_name',
        description: 'Search for organisms by their common/vernacular names in ITIS database.',
        inputSchema: {
          type: 'object',
          properties: {
            vernacularName: {
              type: 'string',
              description: 'Common/vernacular name to search for (e.g., "human", "dog", "oak tree")',
            },
            rows: {
              type: 'number',
              description: 'Number of results to return (default: 10)',
            },
            start: {
              type: 'number',
              description: 'Starting index for pagination (default: 0)',
            },
          },
          required: ['vernacularName'],
        },
      },
      {
        name: 'explore_taxonomy',
        description: 'Explore taxonomic relationships by finding related organisms at different taxonomic levels.',
        inputSchema: {
          type: 'object',
          properties: {
            scientificName: {
              type: 'string',
              description: 'Scientific name to explore (e.g., "Homo sapiens")',
            },
            level: {
              type: 'string',
              description: 'Taxonomic level to explore: "siblings" (same genus), "family" (same family), "order" (same order), "class" (same class)',
              enum: ['siblings', 'family', 'order', 'class']
            },
            rows: {
              type: 'number',
              description: 'Number of results to return (default: 10)',
            },
          },
          required: ['scientificName', 'level'],
        },
      },
      {
        name: 'get_random_species',
        description: 'Get random species from ITIS database with optional taxonomic filters.',
        inputSchema: {
          type: 'object',
          properties: {
            kingdom: {
              type: 'string',
              description: 'Kingdom filter (e.g., "Animalia", "Plantae", "Fungi")',
            },
            phylum: {
              type: 'string',
              description: 'Phylum filter (e.g., "Chordata", "Arthropoda")',
            },
            class: {
              type: 'string',
              description: 'Class filter (e.g., "Mammalia", "Aves", "Reptilia")',
            },
            order: {
              type: 'string',
              description: 'Order filter (e.g., "Carnivora", "Primates")',
            },
            family: {
              type: 'string',
              description: 'Family filter (e.g., "Felidae", "Canidae")',
            },
            genus: {
              type: 'string',
              description: 'Genus filter (e.g., "Panthera", "Canis")',
            },
            count: {
              type: 'number',
              description: 'Number of random species to return (default: 1, max: 10)',
            },
            requireVernacular: {
              type: 'boolean',
              description: 'Only return species that have common names (default: false)',
            },
            vernacularLanguage: {
              type: 'string',
              description: 'Language for vernacular names (default: "English"). Other options: "French", "Spanish", etc.',
            },
          },
        },
      },
    ];
  • Core search logic in ITISClient: transforms vernacular name by replacing spaces with wildcards for SOLR query on vernacular field, delegates to general search method.
    async searchByVernacularName(vernacularName: string, options: Partial<ITISSearchOptions> = {}): Promise<ITISResponse> {
      // Replace spaces with asterisks for SOLR wildcard search in vernacular field
      const searchTerm = vernacularName.replace(/\s+/g, '*');
      return this.search({
        ...options,
        query: `vernacular:*${searchTerm}*`,
        sort: options.sort || 'nameWInd asc'
      });
    }
  • Utility function to parse and format vernacular names from ITIS data: extracts names/languages from delimited strings, prioritizes preferred language (English), sorts preferred first, deduplicates case-insensitively. Used in tool handler response formatting.
    export function processVernacularNames(vernacularArray: string[] = [], preferredLanguage: string = 'English'): string[] {
      if (!vernacularArray || vernacularArray.length === 0) return [];
      
      const processed: { name: string; language: string; preferred: boolean }[] = [];
      
      vernacularArray.forEach(vernacularString => {
        // Parse format: $name$language$preferred$id$date$
        const parts = vernacularString.split('$');
        if (parts.length >= 4) {
          const name = parts[1]?.trim();
          const language = parts[2]?.trim();
          const preferred = parts[3]?.trim() === 'Y';
          
          if (name && language) {
            processed.push({ name, language, preferred });
          }
        }
      });
      
      // Filter to preferred language first, then others as fallback
      const preferredLanguageNames = processed.filter(item => item.language === preferredLanguage);
      const otherLanguageNames = processed.filter(item => item.language !== preferredLanguage);
      
      // Sort within each language group: preferred names first, then alphabetical
      const sortByPreference = (a: any, b: any) => {
        if (a.preferred && !b.preferred) return -1;
        if (b.preferred && !a.preferred) return 1;
        return a.name.localeCompare(b.name);
      };
      
      preferredLanguageNames.sort(sortByPreference);
      otherLanguageNames.sort(sortByPreference);
      
      // Combine: preferred language first, then others
      const sortedProcessed = [...preferredLanguageNames, ...otherLanguageNames];
      
      // Remove duplicates and return just the names
      const uniqueNames = new Set<string>();
      return sortedProcessed
        .map(item => item.name)
        .filter(name => {
          const lowerName = name.toLowerCase();
          if (uniqueNames.has(lowerName)) return false;
          uniqueNames.add(lowerName);
          return true;
        });
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions searching in the ITIS database but doesn't disclose behavioral traits like whether it's read-only, potential rate limits, authentication needs, or what the output looks like (e.g., format, pagination details). For a search tool with zero annotation coverage, this is a significant gap.

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 purpose without unnecessary words. It's appropriately sized for a simple search tool, with zero waste or redundancy.

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 pagination), lack of annotations, and no output schema, the description is incomplete. It doesn't explain return values, error handling, or behavioral context, leaving gaps for an AI agent to understand how to use it effectively beyond basic input.

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 three parameters (vernacularName, rows, start) with clear descriptions. The description adds no additional parameter semantics beyond what's in the schema, such as examples or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

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: 'Search for organisms by their common/vernacular names in ITIS database.' It specifies the verb ('Search'), resource ('organisms'), and scope ('ITIS database'), distinguishing it from siblings like search_by_scientific_name. However, it doesn't explicitly differentiate from search_itis or autocomplete_search, which might also involve searching.

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 this over search_by_scientific_name or other search siblings, nor does it specify prerequisites or exclusions. Usage is implied by the name but not explicitly stated.

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/knustx/itis-mcp-server'

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