Skip to main content
Glama
lundgrenalex

MCP FishBase Server

by lundgrenalex

get_ecology

Retrieve ecological data for marine species from FishBase, including habitat, diet, and environmental requirements, using scientific names.

Instructions

Get ecological information for a species

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
species_nameYesScientific name of the species

Implementation Reference

  • MCP CallToolRequest handler for the 'get_ecology' tool. It calls fishbaseAPI.getEcology with the species_name argument and returns the result as JSON-formatted text content.
    case "get_ecology":
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              await fishbaseAPI.getEcology(args.species_name as string),
              null,
              2
            ),
          },
        ],
      };
  • src/index.ts:68-81 (registration)
    Registration of the 'get_ecology' tool in the ListTools response, including its name, description, and input schema definition.
    {
      name: "get_ecology",
      description: "Get ecological information for a species",
      inputSchema: {
        type: "object",
        properties: {
          species_name: {
            type: "string",
            description: "Scientific name of the species",
          },
        },
        required: ["species_name"],
      },
    },
  • Core logic for retrieving ecology data: fetches species to get SpecCode, queries the 'ecology' table, and filters rows matching the species.
    async getEcology(speciesName: string): Promise<any[]> {
      try {
        const speciesData = await this.getSpecies(speciesName);
        if (speciesData.length === 0) {
          throw new Error(`Species not found: ${speciesName}`);
        }
        
        const specCode = speciesData[0].SpecCode;
        const ecoData = await this.queryTable('ecology');
        
        return ecoData.filter((row: any) => row.SpecCode === specCode);
      } catch (error) {
        throw new Error(`Failed to get ecology data: ${error}`);
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states a read operation ('Get'), implying it's likely non-destructive, but doesn't address critical aspects like authentication needs, rate limits, error conditions, or what 'ecological information' specifically entails (e.g., habitat, diet, conservation status). This leaves significant gaps for safe and effective use.

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 front-loaded with the core purpose ('Get ecological information'), making it immediately scannable and appropriately sized for a simple tool with one parameter.

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 lack of annotations and output schema, the description is incomplete for effective use. It doesn't clarify what 'ecological information' includes (e.g., structured data vs. text), how it relates to sibling tools, or behavioral constraints. For a tool in a rich sibling context with no structured safety or output guidance, this leaves too many open questions.

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%, with the single parameter 'species_name' clearly documented in the schema as 'Scientific name of the species'. The description adds no additional parameter semantics beyond implying the tool operates on a species, which the schema already covers. 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 with a specific verb ('Get') and resource ('ecological information for a species'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_distribution' or 'get_morphology', which likely provide related but different ecological data subsets.

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. With siblings like 'get_distribution' (likely for geographic data) and 'get_morphology' (likely for physical traits), there's clear potential for overlap or confusion, but the description offers no explicit when/when-not instructions or named alternatives.

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