Skip to main content
Glama

get_assembly_info

Retrieve detailed genome assembly data and statistics for specified species, including optional chromosome banding patterns, using the Ensembl REST API.

Instructions

Get genome assembly information and statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bandsNoInclude chromosome banding patterns (default: false)
speciesNoSpecies name (default: homo_sapiens)

Implementation Reference

  • The handler function for the 'get_assembly_info' tool. Validates arguments, fetches assembly information from the Ensembl REST API endpoint `/info/assembly/{species}`, and returns the JSON response.
    private async handleGetAssemblyInfo(args: any) { if (!isValidAssemblyArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid assembly info arguments'); } try { const species = this.getDefaultSpecies(args.species); const params: any = {}; if (args.bands) { params.bands = 1; } const response = await this.apiClient.get(`/info/assembly/${species}`, { params }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleError(error, 'fetching assembly info'); } }
  • src/index.ts:871-872 (registration)
    Registration of the 'get_assembly_info' tool handler in the CallToolRequestSchema switch statement.
    case 'get_assembly_info': return this.handleGetAssemblyInfo(args);
  • Tool registration including name, description, and input schema definition in the ListToolsRequestSchema response.
    { name: 'get_assembly_info', description: 'Get genome assembly information and statistics', inputSchema: { type: 'object', properties: { species: { type: 'string', description: 'Species name (default: homo_sapiens)' }, bands: { type: 'boolean', description: 'Include chromosome banding patterns (default: false)' }, }, required: [], }, },
  • Type guard function for validating input arguments to the 'get_assembly_info' tool.
    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') ); };
  • TypeScript interface defining the structure of the assembly information returned by the Ensembl API.
    interface EnsemblAssemblyInfo { assembly_name: string; assembly_date: string; assembly_accession: string; genebuild_last_geneset_update: string; genebuild_initial_release_date: string; genebuild_start_date: string; genebuild_version: string; genebuild_method: string; golden_path_length: number; total_coding_sequence_length: number; total_genome_length: number; coord_system_versions: string[]; karyotype: string[]; }

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