ensembl_meta
Access Ensembl server metadata, retrieve species-specific data, track versions, and check system status using /info/* and /archive/id endpoints. Simplifies genomic data exploration.
Instructions
Get server metadata, data releases, species info, and system status. Covers /info/* endpoints and /archive/id for version tracking.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| archive_id | No | ID to get version information for (alternative to info_type) (e.g., 'ENSG00000141510', 'rs699') | |
| division | No | Ensembl division name (e.g., 'vertebrates', 'plants', 'fungi', 'metazoa') | |
| info_type | No | Type of information to retrieve | |
| species | No | Species name (required for species-specific info) (e.g., 'homo_sapiens', 'mus_musculus', 'drosophila_melanogaster') |
Implementation Reference
- src/handlers/tools.ts:477-487 (handler)Handler function that normalizes input arguments and delegates to EnsemblApiClient.getMetaInfo for executing the ensembl_meta tool logic.export async function handleMeta(args: any) { try { const normalizedArgs = normalizeEnsemblInputs(args); return await ensemblClient.getMetaInfo(normalizedArgs); } catch (error) { return { error: error instanceof Error ? error.message : "Unknown error", success: false, }; } }
- src/handlers/tools.ts:119-156 (schema)Input schema defining parameters for the ensembl_meta tool, including info_type enum and validation rules.inputSchema: { type: "object", properties: { info_type: { type: "string", enum: [ "ping", "rest", "software", "data", "species", "divisions", "assembly", "biotypes", "analysis", "external_dbs", "variation", ], description: "Type of information to retrieve", }, species: { type: "string", description: "Species name (required for species-specific info) (e.g., 'homo_sapiens', 'mus_musculus', 'drosophila_melanogaster')", }, archive_id: { type: "string", description: "ID to get version information for (alternative to info_type) (e.g., 'ENSG00000141510', 'rs699')", }, division: { type: "string", description: "Ensembl division name (e.g., 'vertebrates', 'plants', 'fungi', 'metazoa')", }, }, anyOf: [{ required: ["info_type"] }, { required: ["archive_id"] }], },
- index.ts:99-107 (registration)Registration of the ensembl_meta tool handler in the MCP server's tool execution switch statement.case "ensembl_meta": return { content: [ { type: "text", text: JSON.stringify(await handleMeta(args), null, 2), }, ], };
- src/handlers/tools.ts:115-157 (registration)Tool registration object in the ensemblTools array used for listing tools in MCP.{ name: "ensembl_meta", description: "Get server metadata, data releases, species info, and system status. Covers /info/* endpoints and /archive/id for version tracking.", inputSchema: { type: "object", properties: { info_type: { type: "string", enum: [ "ping", "rest", "software", "data", "species", "divisions", "assembly", "biotypes", "analysis", "external_dbs", "variation", ], description: "Type of information to retrieve", }, species: { type: "string", description: "Species name (required for species-specific info) (e.g., 'homo_sapiens', 'mus_musculus', 'drosophila_melanogaster')", }, archive_id: { type: "string", description: "ID to get version information for (alternative to info_type) (e.g., 'ENSG00000141510', 'rs699')", }, division: { type: "string", description: "Ensembl division name (e.g., 'vertebrates', 'plants', 'fungi', 'metazoa')", }, }, anyOf: [{ required: ["info_type"] }, { required: ["archive_id"] }], }, },
- src/utils/ensembl-api.ts:157-195 (helper)Core helper method in EnsemblApiClient that implements the logic for ensembl_meta by routing to appropriate Ensembl REST API endpoints based on info_type.async getMetaInfo(args: any): Promise<any> { const { info_type, species, archive_id, division } = args; if (archive_id) { return this.makeRequest(`/archive/id/${archive_id}`); } switch (info_type) { case "ping": return this.makeRequest("/info/ping"); case "rest": return this.makeRequest("/info/rest"); case "software": return this.makeRequest("/info/software"); case "data": return this.makeRequest("/info/data"); case "species": return this.makeRequest("/info/species"); case "divisions": return this.makeRequest("/info/divisions"); case "assembly": if (!species) throw new Error("Species required for assembly info"); return this.makeRequest(`/info/assembly/${species}`); case "biotypes": if (!species) throw new Error("Species required for biotypes info"); return this.makeRequest(`/info/biotypes/${species}`); case "analysis": if (!species) throw new Error("Species required for analysis info"); return this.makeRequest(`/info/analysis/${species}`); case "external_dbs": if (!species) throw new Error("Species required for external_dbs info"); return this.makeRequest(`/info/external_dbs/${species}`); case "variation": if (!species) throw new Error("Species required for variation info"); return this.makeRequest(`/info/variation/${species}`); default: throw new Error(`Unknown info_type: ${info_type}`); } }