Skip to main content
Glama

validate_species_name

Validate and correct scientific species names using the MCP FishBase Server, ensuring accuracy for marine biology research and data analysis.

Instructions

Validate and correct species scientific names

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
species_nameYesScientific name to validate

Implementation Reference

  • Core handler function that validates a species name by checking for exact match or providing suggestions using getSpecies and searchSpecies methods.
    async validateSpeciesName(speciesName: string): Promise<{ valid: boolean; suggestions?: string[]; match?: SpeciesData }> { try { const exactMatch = await this.getSpecies(speciesName); if (exactMatch.length > 0) { return { valid: true, match: exactMatch[0] }; } const searchResults = await this.searchSpecies(speciesName, 5); return { valid: false, suggestions: searchResults.map(s => `${s.Genus} ${s.Species}`), }; } catch (error) { throw new Error(`Failed to validate species name: ${error}`); } }
  • Tool schema definition including name, description, and input schema registered in listTools handler.
    name: "validate_species_name", description: "Validate and correct species scientific names", inputSchema: { type: "object", properties: { species_name: { type: "string", description: "Scientific name to validate", }, }, required: ["species_name"], }, },
  • src/index.ts:229-241 (registration)
    Registration and dispatch logic in the CallToolRequestSchema handler that routes calls to the validateSpeciesName method.
    case "validate_species_name": return { content: [ { type: "text", text: JSON.stringify( await fishbaseAPI.validateSpeciesName(args.species_name as string), null, 2 ), }, ], };

Other Tools

Related 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/lundgrenalex/mcp-fishbase'

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