Skip to main content
Glama
lundgrenalex

MCP FishBase Server

by lundgrenalex

get_species

Retrieve detailed species information from FishBase marine biology database using scientific names. Access ecological data, distribution records, morphological details, and validate species names.

Instructions

Get species information from FishBase

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
species_nameYesScientific name of the species (e.g., 'Salmo trutta')
fieldsNoOptional list of specific fields to return

Implementation Reference

  • Core implementation of get_species tool: queries the species table, matches by scientific name (genus + species), filters optional fields, and returns matching SpeciesData.
    async getSpecies(speciesName: string, fields?: string[]): Promise<SpeciesData[]> {
      try {
        const speciesData = await this.queryTable('species');
        const [genus, species] = speciesName.split(' ');
        
        const filtered = speciesData.filter((row: any) => 
          row.Genus?.toLowerCase() === genus?.toLowerCase() && 
          row.Species?.toLowerCase() === species?.toLowerCase()
        );
    
        if (fields && fields.length > 0) {
          return filtered.map((row: any) => {
            const result: any = {};
            fields.forEach(field => {
              if (row[field] !== undefined) {
                result[field] = row[field];
              }
            });
            return result;
          });
        }
    
        return filtered;
      } catch (error) {
        throw new Error(`Failed to get species data: ${error}`);
      }
    }
  • MCP CallToolRequest handler dispatches 'get_species' calls to FishBaseAPI.getSpecies and returns JSON-formatted response.
    case "get_species":
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              await fishbaseAPI.getSpecies(args.species_name as string, args.fields as string[]),
              null,
              2
            ),
          },
        ],
      };
  • Registration and input schema definition for the 'get_species' tool in ListTools response.
    {
      name: "get_species",
      description: "Get species information from FishBase",
      inputSchema: {
        type: "object",
        properties: {
          species_name: {
            type: "string",
            description: "Scientific name of the species (e.g., 'Salmo trutta')",
          },
          fields: {
            type: "array",
            items: { type: "string" },
            description: "Optional list of specific fields to return",
          },
        },
        required: ["species_name"],
      },
    },
  • TypeScript interface defining the structure of species data returned by getSpecies.
    interface SpeciesData {
      SpecCode?: number;
      Genus?: string;
      Species?: string;
      FBname?: string;
      Length?: number;
      CommonLength?: number;
      MaxLengthRef?: number;
      Weight?: number;
      [key: string]: any;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It states what the tool does but doesn't describe response format, error handling, rate limits, authentication needs, or whether it's a read-only operation. For a tool with zero annotation coverage, this is inadequate.

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 wasted words. It's appropriately sized for a simple lookup tool and front-loads the core purpose immediately.

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 (2 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain what 'species information' includes, how results are structured, or address behavioral aspects like error cases. Without annotations or output schema, the description should provide more context about the operation.

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 both parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, such as explaining field options or providing examples beyond the schema's 'species_name' example. 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 action ('Get') and resource ('species information from FishBase'), providing a specific purpose. However, it doesn't differentiate this tool from sibling tools like 'search_species' or 'get_ecology', which would require explicit comparison to achieve a perfect score.

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 like 'search_species' or other 'get_' siblings. It lacks any context about use cases, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

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

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