Skip to main content
Glama

get_karyotype

Retrieve chromosome details and karyotype data for specified species using Ensembl MCP Server. Simplify genomic analysis by accessing structured chromosomal information.

Instructions

Get chromosome information and karyotype

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
speciesNoSpecies name (default: homo_sapiens)

Implementation Reference

  • Executes the get_karyotype tool: validates args, fetches assembly info from Ensembl API with bands=1, formats response highlighting karyotype and chromosomes.
    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'); } }
  • Input schema definition for the get_karyotype tool, specifying optional species parameter.
    inputSchema: { type: 'object', properties: { species: { type: 'string', description: 'Species name (default: homo_sapiens)' }, }, required: [], },
  • src/index.ts:873-874 (registration)
    Registers the handler for 'get_karyotype' tool in the CallToolRequestSchema switch statement.
    case 'get_karyotype': return this.handleGetKaryotype(args);
  • src/index.ts:789-799 (registration)
    Registers the get_karyotype tool in the ListToolsRequestSchema response, including name, description, and schema.
    { 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 validating input arguments for assembly-related tools including get_karyotype (species and optional bands).
    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') ); };

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