list_species
Retrieve a list of available species and assemblies from Ensembl based on specified divisions like vertebrates, plants, or fungi.
Instructions
Get list of available species and assemblies
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| division | No | Ensembl division (e.g., vertebrates, plants, fungi) |
Implementation Reference
- src/index.ts:1501-1522 (handler)The main handler function for the 'list_species' tool. It constructs parameters from input args (optionally filtering by Ensembl division), queries the Ensembl REST API endpoint '/info/species', and returns the formatted JSON response as tool content.private async handleListSpecies(args: any) { try { const params: any = {}; if (args.division) { params.division = args.division; } const response = await this.apiClient.get('/info/species', { params }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error) { return this.handleError(error, 'listing species'); } }
- src/index.ts:869-870 (registration)Registers the handler for the 'list_species' tool in the switch statement within the CallToolRequestSchema handler.case 'list_species': return this.handleListSpecies(args);
- src/index.ts:766-776 (registration)Tool registration metadata in the ListToolsRequestSchema response, defining the tool name, description, and input schema for validation.{ name: 'list_species', description: 'Get list of available species and assemblies', inputSchema: { type: 'object', properties: { division: { type: 'string', description: 'Ensembl division (e.g., vertebrates, plants, fungi)' }, }, required: [], }, },
- src/index.ts:108-117 (schema)TypeScript interface defining the structure of Ensembl species data, matching the API response format used by the handler.interface EnsemblSpecies { name: string; display_name: string; taxonomy_id: number; assembly: string; release: number; division: string; strain?: string; strain_collection?: string; }