Skip to main content
Glama
Augmented-Nature

Ensembl MCP Server

get_karyotype

Retrieve chromosome information and karyotype data for specified species from Ensembl genomic database.

Instructions

Get chromosome information and karyotype

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
speciesNoSpecies name (default: homo_sapiens)

Implementation Reference

  • The handler function that executes the get_karyotype tool. It validates input, queries the Ensembl REST API /info/assembly/{species}?bands=1 endpoint, extracts karyotype and chromosome data, and formats the response.
    private async handleGetKaryotype(args: any) {
      if (!isValidAssemblyArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid karyotype arguments');
      }
    
      try {
        const species = this.getDefaultSpecies(args.species);
    
        const response = await this.apiClient.get(`/info/assembly/${species}`, {
          params: { bands: 1 },
        });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                species,
                assembly_name: response.data.assembly_name,
                karyotype: response.data.karyotype || [],
                chromosomes: response.data.top_level_region || [],
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        return this.handleError(error, 'fetching karyotype');
      }
    }
  • src/index.ts:873-874 (registration)
    The switch case in the CallToolRequestSchema handler that routes calls to the get_karyotype tool to its handler function.
    case 'get_karyotype':
      return this.handleGetKaryotype(args);
  • src/index.ts:790-799 (registration)
    The tool registration entry in the ListToolsRequestSchema response, defining the name, description, and input schema for get_karyotype.
      name: 'get_karyotype',
      description: 'Get chromosome information and karyotype',
      inputSchema: {
        type: 'object',
        properties: {
          species: { type: 'string', description: 'Species name (default: homo_sapiens)' },
        },
        required: [],
      },
    },
  • Type guard function used to validate input arguments for the get_karyotype tool (shared with get_assembly_info).
    const isValidAssemblyArgs = (
      args: any
    ): args is { species?: string; bands?: boolean } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        (args.species === undefined || typeof args.species === 'string') &&
        (args.bands === undefined || typeof args.bands === 'boolean')
      );
    };
  • Utility method used in get_karyotype handler to provide default species value.
    private getDefaultSpecies(species?: string): string {
      return species || 'homo_sapiens';
    }
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 of behavioral disclosure. It states what the tool does but doesn't describe how it behaves—such as whether it's a read-only operation, what format the output takes, potential errors, or performance characteristics. This leaves significant gaps for an agent to understand the tool's behavior.

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 extremely concise with just one short phrase ('Get chromosome information and karyotype'), which is front-loaded and wastes no words. Every part of the description contributes directly to stating the tool's purpose, making it efficient and well-structured.

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 a tool that likely returns complex genomic data. It doesn't explain what 'chromosome information and karyotype' entails, the format of the output, or any limitations, which could hinder an agent's ability to use the tool effectively in a broader 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%, with the single parameter 'species' fully documented in the schema. The description doesn't add any additional meaning or context about parameters beyond what the schema provides, so it meets the baseline score of 3 where 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 ('chromosome information and karyotype'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'get_assembly_info' or 'list_species' which might also provide related genomic information.

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 many sibling tools available (e.g., 'get_assembly_info', 'list_species'), there's no indication of specific use cases, prerequisites, or exclusions that would help an agent choose appropriately.

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/Augmented-Nature/Ensembl-MCP-Server'

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