MCP 服务器

ensembl-mcp-server

io.github.cyanheads/ensembl-mcp-server
科学与工程 公开且可连接 MCP 2025-11-25

此 MCP 可以做什么

Queries Ensembl for genes, genomic sequences, variants, homologs, genomic features, and cross-database biological references.

ensembl_get_homology
Get Gene Homologs
Find orthologs and/or paralogs of a gene across species. Returns each homolog's stable ID, species, homology type (ortholog_one2one, ortholog_one2many, paralog_many2many, etc.), perc_id (percent identity), perc_pos (percent positives), and taxonomy level. Essential for cross-species research — for example, "what is the mouse equivalent of human TP53?" or "how conserved is BRCA2 across mammals?". Provide either symbol + species or a stable gene ID. Target species can be filtered to a single species or left open to return all available homologs.
只读 可访问外部资源 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'id': {'type': 'string', 'description': 'Ensembl stable gene ID (e.g. ENSG00000139618). Use ensembl_lookup_gene to get the stable ID from a symbol. Cannot be combined with symbol.'}, 'type': {'enum': ['orthologues', 'paralogues', 'all'], 'type': 'string', 'default': 'orthologues', 'description': 'Type of homologs to return. orthologues: genes related by speciation (cross-species equivalents). paralogues: genes related by duplication (within or across species). all: both orthologs and paralogs.'}, 'symbol': {'type': 'string', 'description': 'Gene symbol in the source species (e.g. BRCA2, TP53). Species defaults to homo_sapiens; set species for other organisms. Cannot be combined with id.'}, 'species': {'type': 'string', 'default': 'homo_sapiens', 'minLength': 1, 'description': 'Source species (the species the query gene belongs to) in Ensembl internal format. Default is homo_sapiens. Use ensembl_list_species to discover valid values.'}, 'max_results': {'type': 'integer', 'default': 25, 'maximum': 9007199254740991, 'minimum': 0, 'description': 'Maximum number of homologs to return. Broad orthology queries (e.g. BRCA2 across all species) can return 150+ homologs; the default keeps responses focused. Set to 0 to return every homolog uncapped. totalCount always reports the true number available before this cap.'}, 'target_species': {'type': 'string', 'description': 'Filter to homologs in a single target species (e.g. mus_musculus for mouse). Omit to return homologs across all available species. Use ensembl_list_species to discover valid values.'}}, 'additionalProperties': False}
输出模式
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['homologs', 'totalCount', 'queryId', 'querySpecies', 'queryType']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'cap': {'type': 'number', 'description': 'The max_results limit applied to the homolog list.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['not_found', 'no_input', 'conflicting_input'], 'description': 'Machine-readable failure mode. Declared by this tool: `not_found`: The gene symbol or stable ID was not found in Ensembl. `no_input`: Neither symbol nor id was provided. `conflicting_input`: Both symbol and id were provided. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'shown': {'type': 'number', 'description': 'Number of homologs returned after the max_results cap.'}, 'notice': {'type': 'string', 'description': 'Guidance when no homologs are found or the list was capped.'}, 'queryId': {'type': 'string', 'description': 'The resolved Ensembl gene ID used for the homology query.'}, 'homologs': {'type': 'array', 'items': {'type': 'object', 'required': ['targetId'], 'properties': {'type': {'type': 'string', 'description': 'Homology type: ortholog_one2one, ortholog_one2many, ortholog_many2many, paralog_many2many, within_species_paralog, or similar.'}, 'percId': {'type': 'number', 'description': 'Percent identity between the query and target gene sequences (0-100). Higher values indicate more conserved sequences.'}, 'percPos': {'type': 'number', 'description': 'Percent positive (similar) positions in the alignment (0-100). Includes conservative substitutions as well as identical residues.'}, 'targetId': {'type': 'string', 'description': 'Ensembl stable ID of the homologous gene in the target species.'}, 'targetSpecies': {'type': 'string', 'description': 'Target species in Ensembl internal format (e.g. mus_musculus).'}, 'taxonomyLevel': {'type': 'string', 'description': 'Last common ancestor taxonomic level for this homology relationship (e.g. Amniota, Vertebrata, Bilateria).'}}, 'description': 'A single homologous gene with its stable ID, species, homology type, and sequence identity metrics.', 'additionalProperties': False}, 'description': 'Homologous genes found for the query gene, capped to max_results. totalCount reports the full count available before the cap.'}, 'queryType': {'type': 'string', 'description': 'The homology type queried (orthologues, paralogues, or all).'}, 'truncated': {'type': 'boolean', 'description': 'True when the homolog list was capped at max_results.'}, 'totalCount': {'type': 'number', 'description': 'Total number of homologs available before the max_results cap. Exceeds the returned homologs count when the list was capped.'}, 'querySpecies': {'type': 'string', 'description': 'The source species used for the query.'}}, 'additionalProperties': False}
ensembl_get_sequence
Get Sequence
Fetch the DNA, cDNA, CDS, or protein sequence for a gene, transcript, protein, or genomic region. Returns a window of the sequence — the first 10,000 characters by default — with its stable ID, molecule type, and full length. When more follows the window, truncated is true and nextOffset is the offset to request next; walking nextOffset reconstructs the whole sequence, and max_length 0 returns everything from offset to the end. The type parameter selects which sequence is fetched: genomic (default, includes introns), cdna (spliced transcript), cds (coding sequence only), protein. For region mode, set id to a region — either species:chr:start-end (e.g. homo_sapiens:13:32315086-32400268) or a bare chr:start-end with species set (e.g. id 13:32315086-32400268, species homo_sapiens), spanning at most 10,000,000 bases; regions return genomic DNA only. Protein sequences require a transcript or protein stable ID (ENST…/ENSP…), not a gene ID — use ensembl_lookup_gene with expand_transcripts=true to get the canonical transcript ID first.
只读 可访问外部资源 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['id'], 'properties': {'id': {'type': 'string', 'minLength': 1, 'description': 'Ensembl stable ID (ENSGâ\x80¦, ENSTâ\x80¦, ENSPâ\x80¦) or a genomic region for region mode. Region accepts species:chr:start-end (e.g. homo_sapiens:13:32315086-32400268) or a bare chr:start-end (e.g. 13:32315086-32400268) when the species field is set. A region needs start at or below end, within the sequence region, and spans at most 10,000,000 bases.'}, 'type': {'enum': ['genomic', 'cdna', 'cds', 'protein'], 'type': 'string', 'default': 'genomic', 'description': 'Sequence type to retrieve. genomic: full genomic DNA including introns (default). cdna: spliced transcript sequence (requires ENSTâ\x80¦ ID). cds: coding sequence only, no UTRs (requires ENSTâ\x80¦ ID with coding transcript). protein: amino acid sequence (requires ENSTâ\x80¦ or ENSPâ\x80¦ ID). Region ids are genomic-only â\x80\x94 request cdna, cds, or protein from a transcript or protein stable ID.'}, 'offset': {'type': 'integer', 'default': 0, 'maximum': 9007199254740991, 'minimum': 0, 'description': '0-based character offset where the returned window starts, counted in the resolved sequence (including any expand_5prime/expand_3prime flank). Default 0. Pass nextOffset from a truncated response to fetch the following window; an offset at or past the end returns an empty window.'}, 'species': {'type': 'string', 'description': 'Species in Ensembl internal format (e.g. homo_sapiens). Required for a bare chr:start-end region; optional for the species:chr:start-end form (the embedded species is used when the field is omitted). Optional for stable ID lookups â\x80\x94 Ensembl infers species from the ID prefix.'}, 'max_length': {'type': 'integer', 'default': 10000, 'maximum': 9007199254740991, 'minimum': 0, 'description': 'Maximum number of characters in the returned window. Default 10000. Set to 0 to return everything from offset to the end, uncapped.'}, 'expand_3prime': {'type': 'integer', 'default': 0, 'maximum': 9007199254740991, 'minimum': 0, 'description': "Number of base pairs to extend downstream (3' direction) of the requested feature. Default 0. Only applies to genomic sequences and region queries."}, 'expand_5prime': {'type': 'integer', 'default': 0, 'maximum': 9007199254740991, 'minimum': 0, 'description': "Number of base pairs to extend upstream (5' direction) of the requested feature. Default 0. Only applies to genomic sequences and region queries."}}, 'additionalProperties': False}
输出模式
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['id', 'type', 'seq', 'length', 'offset', 'truncated']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'id': {'type': 'string', 'description': 'The stable ID or region used for the lookup.'}, 'seq': {'type': 'string', 'description': 'The requested window of the sequence: at most max_length characters starting at offset. DNA sequences use IUPAC nucleotide codes (ACGT + ambiguity codes); protein sequences use single-letter amino acid codes. Empty when offset is at or past the end.'}, 'type': {'type': 'string', 'description': 'Sequence type returned (genomic, cdna, cds, or protein).'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['not_found', 'type_mismatch', 'missing_species', 'invalid_region'], 'description': 'Machine-readable failure mode. Declared by this tool: `not_found`: The stable ID or region was not found in Ensembl. `type_mismatch`: A non-genomic type (cdna, cds, or protein) was requested for a region id or a gene ID. `missing_species`: A bare chr:start-end region was given without a species. `invalid_region`: A region id has its start after its end, starts past the end of its sequence region, spans more than the 10,000,000-base maximum, or names a sequence region the species lacks. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'length': {'type': 'number', 'description': 'Full sequence length in characters, not the window size â\x80\x94 nucleotides for genomic/cdna/cds, amino-acid residues for protein. Includes any expand_5prime/expand_3prime flank.'}, 'notice': {'type': 'string', 'description': 'Guidance about the window: how to continue when truncated, or why it is empty when the offset is past the end.'}, 'offset': {'type': 'number', 'description': '0-based character offset where this window starts.'}, 'truncated': {'type': 'boolean', 'description': 'True when more sequence follows this window; request nextOffset to continue.'}, 'nextOffset': {'type': 'number', 'description': 'Offset of the first character after this window â\x80\x94 pass it as offset to fetch the next window. Present only when truncated.'}, 'description': {'type': 'string', 'description': 'Sequence description from Ensembl, if provided.'}}, 'additionalProperties': False}
ensembl_get_xrefs
Get Cross-Database References
Retrieve cross-database references for a gene or feature — HGNC, UniProt, EntrezGene, OMIM, RefSeq, Reactome, and others. Returns each xref with its database name, primary ID, display ID, and description. The dbname filter narrows to specific databases; omit to return all xrefs. IDs returned here chain to protein (pubchem via UniProt), literature (pubmed via PubMed IDs), disease (OMIM via MIM_GENE), and pathway (Reactome) resources. Requires an Ensembl stable ID — use ensembl_lookup_gene to get the ENSG… ID first. Common dbname values: HGNC, Uniprot_gn, EntrezGene, MIM_GENE, RefSeq_mRNA, RefSeq_peptide, Reactome, GO (Gene Ontology), ChEMBL.
只读 可访问外部资源 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['id'], 'properties': {'id': {'type': 'string', 'minLength': 1, 'description': 'Ensembl stable gene ID (ENSGâ\x80¦) or transcript ID (ENSTâ\x80¦). Use ensembl_lookup_gene to get the stable ID from a gene symbol. xrefs/id returns the full cross-reference set (56+ entries for well-annotated genes like BRCA2).'}, 'dbname': {'type': 'string', 'description': 'Filter to a specific external database by its Ensembl internal name. Examples: HGNC (HGNC gene ID), Uniprot_gn (UniProt gene name), EntrezGene (NCBI Gene ID), MIM_GENE (OMIM disease gene), RefSeq_mRNA (NCBI RefSeq transcript), Reactome (pathway IDs), GO (Gene Ontology terms). Omit to return all available xrefs.'}}, 'additionalProperties': False}
输出模式
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['xrefs', 'totalCount', 'queriedId']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['not_found'], 'description': 'Machine-readable failure mode. Declared by this tool: `not_found`: The Ensembl stable ID was not found or has no cross-references. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'xrefs': {'type': 'array', 'items': {'type': 'object', 'properties': {'dbname': {'type': 'string', 'description': 'Database name in Ensembl internal format (e.g. HGNC, Uniprot_gn, EntrezGene, MIM_GENE, RefSeq_mRNA).'}, 'displayId': {'type': 'string', 'description': 'Display identifier â\x80\x94 often the same as primaryId but may be a formatted accession.'}, 'primaryId': {'type': 'string', 'description': 'Primary identifier in the external database (e.g. HGNC:1101 for BRCA2 in HGNC, P51587 for BRCA2 in UniProt).'}, 'description': {'type': 'string', 'description': 'Description of the cross-reference entry.'}, 'dbDisplayName': {'type': 'string', 'description': 'Human-readable database display name.'}}, 'description': 'A single cross-database reference entry with database name, primary ID, and description.', 'additionalProperties': False}, 'description': 'Cross-database references for the queried Ensembl ID.'}, 'notice': {'type': 'string', 'description': 'Guidance when no cross-references are found.'}, 'queriedId': {'type': 'string', 'description': 'The Ensembl stable ID that was queried.'}, 'totalCount': {'type': 'number', 'description': 'Total number of cross-references returned.'}}, 'additionalProperties': False}
ensembl_list_species
List Ensembl Species
List species supported by Ensembl with display name, common name, assembly, taxon ID, and division. Required discovery step — species names like homo_sapiens are opaque to non-biologists and are the input format every other Ensembl tool expects. Filter by division to select one; use nameContains to find a species by partial name match. With no division, returns the endpoint default division — the vertebrates (~356 species on the default GRCh38 endpoint); pass a division to list that division.
只读 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'division': {'enum': ['EnsemblVertebrates', 'EnsemblPlants', 'EnsemblFungi', 'EnsemblMetazoa', 'EnsemblProtists'], 'type': 'string', 'description': 'Filter to a specific Ensembl division. EnsemblVertebrates includes human, mouse, zebrafish, and other vertebrates. EnsemblPlants covers crop and model plant genomes. EnsemblFungi, EnsemblMetazoa, EnsemblProtists cover non-vertebrate model organisms. Omit to return the endpoint default division (vertebrates).'}, 'nameContains': {'type': 'string', 'description': 'Case-insensitive substring filter applied locally after fetching. Matches against species name, display name, and common name. Example: "sapiens" matches homo_sapiens; "mouse" matches mus_musculus.'}}, 'additionalProperties': False}
输出模式
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['species', 'totalCount']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'description': 'Machine-readable failure mode.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'notice': {'type': 'string', 'description': 'Guidance when the filter matches no species.'}, 'species': {'type': 'array', 'items': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string', 'description': 'Ensembl internal species name in lowercase_underscore format (e.g. homo_sapiens, mus_musculus). This is the value to pass as the species parameter in all other Ensembl tools.'}, 'taxonId': {'type': 'string', 'description': 'NCBI taxonomy ID for this species.'}, 'assembly': {'type': 'string', 'description': 'Current genome assembly name (e.g. GRCh38).'}, 'division': {'type': 'string', 'description': 'Ensembl division this species belongs to (e.g. EnsemblVertebrates, EnsemblPlants).'}, 'commonName': {'type': 'string', 'description': 'Common name (e.g. Human, Mouse).'}, 'displayName': {'type': 'string', 'description': 'Human-readable scientific name (e.g. Homo sapiens).'}}, 'description': 'A single Ensembl species entry.', 'additionalProperties': False}, 'description': 'Species matching the filter criteria, sorted by internal name.'}, 'totalCount': {'type': 'number', 'description': 'Total number of matching species after local filtering.'}}, 'additionalProperties': False}
ensembl_lookup_gene
Lookup Gene
Resolve a gene by symbol + species (or by stable ID) to its Ensembl ID, genomic location (chr:start-end:strand), biotype, description, and transcript list. Entry point for most workflows — the stable ID and coordinates returned here are inputs to other tools. Accepts both symbol lookup (BRCA2 + homo_sapiens) and direct ID lookup (ENSG00000139618). Supports batch lookup of up to 20 IDs or symbols in one call via the ids or symbols field. Provide exactly one of symbol, id, ids, or symbols. For symbol lookups species defaults to homo_sapiens (override for other organisms); for ID lookups species is not needed. Use ensembl_list_species to discover valid species names.
只读 可访问外部资源 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'id': {'type': 'string', 'description': 'Ensembl stable gene ID (e.g. ENSG00000139618 or ENSG00000139618.7 with version). Species is not required for ID lookup.'}, 'ids': {'type': 'array', 'items': {'type': 'string', 'minLength': 1, 'description': 'An Ensembl stable gene or transcript ID to resolve in this batch.'}, 'maxItems': 20, 'description': 'Batch lookup: up to 20 Ensembl stable IDs (ENSGâ\x80¦, ENSTâ\x80¦). Returns a succeeded/failed split. Provide exactly one of symbol, id, ids, or symbols.'}, 'symbol': {'type': 'string', 'description': 'Gene symbol to look up (e.g. BRCA2, TP53, EGFR). Species defaults to homo_sapiens; set species for other organisms. Case-insensitive in most species.'}, 'species': {'type': 'string', 'description': 'Species in Ensembl internal format: lowercase scientific name with underscores (e.g. homo_sapiens, mus_musculus, danio_rerio). Optional for symbol lookups â\x80\x94 defaults to homo_sapiens; set it for other organisms. Use ensembl_list_species to discover valid values.'}, 'symbols': {'type': 'array', 'items': {'type': 'string', 'minLength': 1, 'description': 'A gene symbol to resolve in this batch (e.g. BRCA2, TP53).'}, 'maxItems': 20, 'description': 'Batch lookup: up to 20 gene symbols. Species defaults to homo_sapiens; set species for other organisms. Returns a succeeded/failed split. Provide exactly one of symbol, id, ids, or symbols.'}, 'expand_transcripts': {'type': 'boolean', 'default': False, 'description': 'When true, include the full transcript list in the response. Each transcript has its ID, biotype, canonical flag, and coordinates. Default is false to keep responses compact.'}}, 'additionalProperties': False}
输出模式
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'gene': {'type': 'object', 'required': ['id'], 'properties': {'id': {'type': 'string', 'description': 'Ensembl gene stable ID (ENSGâ\x80¦). Use this as input to other Ensembl tools.'}, 'end': {'type': 'number', 'description': 'Gene end position on the chromosome (1-based).'}, 'start': {'type': 'number', 'description': 'Gene start position on the chromosome (1-based).'}, 'strand': {'type': 'number', 'description': 'Strand: 1 for forward, -1 for reverse.'}, 'biotype': {'type': 'string', 'description': 'Gene biotype (e.g. protein_coding, lncRNA, pseudogene).'}, 'species': {'type': 'string', 'description': 'Species in Ensembl internal format (e.g. homo_sapiens). Echoed from lookup.'}, 'chromosome': {'type': 'string', 'description': 'Chromosome or sequence region name.'}, 'description': {'type': 'string', 'description': 'Brief gene description from Ensembl.'}, 'displayName': {'type': 'string', 'description': 'Gene symbol or display name (e.g. BRCA2, TP53).'}, 'transcripts': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'isCanonical'], 'properties': {'id': {'type': 'string', 'description': 'Ensembl transcript stable ID (ENSTâ\x80¦).'}, 'end': {'type': 'number', 'description': 'Transcript end position on the chromosome (1-based).'}, 'start': {'type': 'number', 'description': 'Transcript start position on the chromosome (1-based).'}, 'strand': {'type': 'number', 'description': 'Strand: 1 for forward, -1 for reverse.'}, 'biotype': {'type': 'string', 'description': 'Transcript biotype (e.g. protein_coding, lncRNA, retained_intron).'}, 'lengthInBp': {'type': 'number', 'description': 'Transcript length in base pairs.'}, 'displayName': {'type': 'string', 'description': 'Transcript display name.'}, 'isCanonical': {'type': 'boolean', 'description': 'True when this is the canonical transcript for the gene.'}}, 'description': 'A single transcript summary entry.', 'additionalProperties': False}, 'description': 'Transcript list. Present only when expand_transcripts is true.'}, 'assemblyName': {'type': 'string', 'description': 'Genome assembly name (e.g. GRCh38). All coordinates are relative to this assembly.'}}, 'description': 'Single gene record. Present for symbol or id lookups.', 'additionalProperties': False}, 'batch': {'type': 'object', 'required': ['succeeded', 'failed'], 'properties': {'failed': {'type': 'array', 'items': {'type': 'object', 'properties': {}, 'description': 'A failed lookup entry with query (the submitted ID or symbol) and error (reason string) fields.', 'additionalProperties': {}}, 'description': 'IDs/symbols that could not be resolved, with per-item query and error fields.'}, 'succeeded': {'type': 'array', 'items': {'type': 'object', 'properties': {}, 'description': 'A resolved gene record with the same shape as the gene output field.', 'additionalProperties': {}}, 'description': 'Gene records for IDs/symbols that resolved successfully. Same shape as gene.'}}, 'description': 'Batch results. Present for ids or symbols lookups.', 'additionalProperties': False}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['not_found', 'invalid_species', 'no_input', 'conflicting_input'], 'description': 'Machine-readable failure mode. Declared by this tool: `not_found`: The gene symbol or stable ID was not found in Ensembl. `invalid_species`: The species string was not recognized by Ensembl. `no_input`: Neither symbol, id, ids, nor symbols was provided. `conflicting_input`: More than one of symbol, id, ids, or symbols was provided. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}}, 'additionalProperties': False}
ensembl_predict_variant
Predict Variant Effect
Predict the functional consequences of a sequence variant using the Ensembl Variant Effect Predictor (VEP). Accepts three input formats: HGVS notation (transcript-relative, e.g. ENST00000380152.8:c.2T>A, or genomic, e.g. 13:g.32316462T>A); region+allele (chr:start:end:strand/allele, e.g. 1:65568:65568:1/T); and a dbSNP rsID (e.g. rs334). Returns the most severe consequence term, affected transcripts and genes, impact level (HIGH/MODERATE/LOW/MODIFIER), and any colocated known variants with clinical significance. HGVS input: provide the full notation including transcript version for best results. Region+allele input: Ensembl normalizes chromosome names and canonical vertebrate output omits the chr prefix (a chr-prefixed name is also accepted). By default the response caps transcript consequences (max_transcript_consequences) and per-variant PubMed IDs (max_pubmed_ids_per_variant) to keep large VEP results compact — well-studied variants like rs334 otherwise carry 60+ consequences and 100+ citations. Truthful totals are always reported; set a cap to 0 (or include_all_colocated_pubmed=true) to retrieve the full set.
只读 可访问外部资源 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['variant'], 'properties': {'species': {'type': 'string', 'default': 'homo_sapiens', 'minLength': 1, 'description': 'Species in Ensembl internal format. Default is homo_sapiens. For non-human variants, set the appropriate species (e.g. mus_musculus for mouse). Use ensembl_list_species to discover valid values.'}, 'variant': {'type': 'string', 'minLength': 1, 'description': 'Variant in one of three formats: (1) HGVS notation â\x80\x94 transcript-relative: ENST00000380152.8:c.2T>A; genomic: 13:g.32316462T>A; (2) Region+allele: chr:start:end:strand/allele â\x80\x94 e.g. 1:65568:65568:1/T (strand is 1 for forward or -1 for reverse); (3) dbSNP rsID â\x80\x94 e.g. rs334. Ensembl normalizes chromosome names; canonical vertebrate output omits the "chr" prefix, though a chr-prefixed name is also accepted.'}, 'max_pubmed_ids_per_variant': {'type': 'integer', 'default': 10, 'maximum': 9007199254740991, 'minimum': 0, 'description': 'Maximum PubMed IDs to return per colocated known variant. Well-studied variants (e.g. rs334) cite 100+ papers; the default trims each list. Set to 0 to return every PubMed ID uncapped. pubmedTotal on each colocated variant reports the true pre-cap count. Ignored when include_all_colocated_pubmed is true.'}, 'max_transcript_consequences': {'type': 'integer', 'default': 10, 'maximum': 9007199254740991, 'minimum': 0, 'description': 'Maximum transcript consequences to return per VEP record. High-impact variants can affect 60+ transcripts; the default keeps the response focused on the top consequences. Set to 0 to return every transcript consequence uncapped. transcriptConsequencesTotal on each record always reports the true pre-cap count.'}, 'include_all_colocated_pubmed': {'type': 'boolean', 'default': False, 'description': 'When true, return every PubMed ID for each colocated variant, overriding max_pubmed_ids_per_variant. Default false to keep responses compact.'}}, 'additionalProperties': False}
输出模式
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['results', 'totalCount']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'cap': {'type': 'number', 'description': 'The max_transcript_consequences limit applied.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['invalid_notation', 'not_found'], 'description': 'Machine-readable failure mode. Declared by this tool: `invalid_notation`: The variant notation is malformed or cannot be parsed by VEP. `not_found`: The variant location falls outside any known transcript or assembly region. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'shown': {'type': 'number', 'description': 'Total transcript consequences returned across all records after the cap.'}, 'notice': {'type': 'string', 'description': 'Guidance when no results are returned or when caps omitted detail.'}, 'results': {'type': 'array', 'items': {'type': 'object', 'required': ['transcriptConsequences', 'colocatedVariants'], 'properties': {'end': {'type': 'number', 'description': 'Variant end position (1-based).'}, 'input': {'type': 'string', 'description': 'The input variant notation as submitted to VEP.'}, 'start': {'type': 'number', 'description': 'Variant start position (1-based).'}, 'chromosome': {'type': 'string', 'description': 'Chromosome the variant is on.'}, 'assemblyName': {'type': 'string', 'description': 'Genome assembly name (e.g. GRCh38).'}, 'colocatedVariants': {'type': 'array', 'items': {'type': 'object', 'properties': {'id': {'type': 'string', 'description': 'Known variant ID (e.g. rs1234567 for dbSNP entries).'}, 'pubmed': {'type': 'array', 'items': {'type': 'number', 'description': 'A PubMed ID for literature citing this variant.'}, 'description': 'PubMed IDs for literature associated with this variant, capped to max_pubmed_ids_per_variant. pubmedTotal reports the full count when the list was capped.'}, 'pubmedTotal': {'type': 'number', 'description': 'Total PubMed IDs available for this variant before the max_pubmed_ids_per_variant cap. Equals the returned pubmed length when the list was not capped.'}, 'alleleString': {'type': 'string', 'description': 'Allele string showing reference/alternate (e.g. A/T).'}, 'clinicalSignificance': {'type': 'array', 'items': {'type': 'string', 'description': 'A clinical significance term for this colocated known variant.'}, 'description': 'Clinical significance terms from ClinVar (e.g. pathogenic, benign).'}}, 'description': 'A known variant at the same genomic position from public databases (dbSNP, ClinVar).', 'additionalProperties': False}, 'description': 'Known variants at the same position from public databases (dbSNP, ClinVar). Empty when the variant is novel.'}, 'mostSevereConsequence': {'type': 'string', 'description': 'Most severe Sequence Ontology consequence term across all transcripts (e.g. stop_gained, missense_variant, synonymous_variant).'}, 'transcriptConsequences': {'type': 'array', 'items': {'type': 'object', 'required': ['consequenceTerms'], 'properties': {'sift': {'type': 'object', 'required': ['prediction', 'score'], 'properties': {'score': {'type': 'number', 'description': 'SIFT score (0-1). Lower scores indicate more deleterious variants.'}, 'prediction': {'type': 'string', 'description': 'SIFT prediction: deleterious or tolerated.'}}, 'description': 'SIFT pathogenicity prediction for missense variants. Omitted when not applicable.', 'additionalProperties': False}, 'hgvsc': {'type': 'string', 'description': 'HGVS notation at the cDNA level (e.g. c.2T>A).'}, 'hgvsp': {'type': 'string', 'description': 'HGVS notation at the protein level (e.g. p.Met1Thr).'}, 'geneId': {'type': 'string', 'description': 'Ensembl gene ID (ENSGâ\x80¦) harboring the affected transcript.'}, 'impact': {'type': 'string', 'description': 'Impact level: HIGH (frameshift, stop_gained), MODERATE (missense), LOW (synonymous), or MODIFIER.'}, 'biotype': {'type': 'string', 'description': 'Transcript biotype (e.g. protein_coding).'}, 'polyphen': {'type': 'object', 'required': ['prediction', 'score'], 'properties': {'score': {'type': 'number', 'description': 'PolyPhen score (0-1). Higher scores indicate more damaging variants.'}, 'prediction': {'type': 'string', 'description': 'PolyPhen prediction: probably_damaging, possibly_damaging, or benign.'}}, 'description': 'PolyPhen pathogenicity prediction for missense variants. Omitted when not applicable.', 'additionalProperties': False}, 'aminoAcids': {'type': 'string', 'description': 'Reference/alternate amino acids separated by "/" (e.g. M/T).'}, 'geneSymbol': {'type': 'string', 'description': 'Gene symbol (e.g. BRCA2, TP53).'}, 'transcriptId': {'type': 'string', 'description': 'Ensembl transcript ID (ENSTâ\x80¦) affected by this variant.'}, 'consequenceTerms': {'type': 'array', 'items': {'type': 'string', 'description': 'A Sequence Ontology consequence term (e.g. missense_variant, stop_gained).'}, 'description': 'Sequence Ontology consequence terms for this transcript.'}}, 'description': 'Consequence details for one affected transcript, including impact, HGVS notation, and pathogenicity scores.', 'additionalProperties': False}, 'description': 'Per-transcript consequence details, capped to max_transcript_consequences. High-impact variants may affect many transcripts; focus on canonical transcripts (isCanonical from ensembl_lookup_gene) for primary effect. transcriptConsequencesTotal reports the full count.'}, 'transcriptConsequencesTotal': {'type': 'number', 'description': 'Total transcript consequences available before the max_transcript_consequences cap. Equals the returned transcriptConsequences length when not capped.'}}, 'description': 'VEP consequence record for one genomic position, with transcript consequences and colocated known variants.', 'additionalProperties': False}, 'description': 'VEP consequence records â\x80\x94 typically one per input variant. Multiple records appear when a single notation matches multiple genomic positions.'}, 'truncated': {'type': 'boolean', 'description': 'True when transcript consequences were capped at max_transcript_consequences.'}, 'totalCount': {'type': 'number', 'description': 'Number of VEP consequence records returned.'}}, 'additionalProperties': False}
ensembl_query_region
Query Genomic Region
Find genomic features overlapping a chromosomal region: genes, transcripts, variants, regulatory elements, or exons. Returns each feature with its stable ID, type, location, biotype, and name, plus the genome assembly the coordinates are on. Useful for "what's in this locus?" and for seeding follow-up lookups. Region format is chr:start-end (e.g. 13:32315086-32400268 for the BRCA2 locus), spanning at most 5,000,000 bases. Ensembl normalizes chromosome names and canonical vertebrate output omits the chr prefix (13, not chr13); a chr-prefixed name like chr13 is also accepted. The feature parameter defaults to gene only — requesting variation in an 85 kb region matches 44,000+ entries. Explicitly include variation, regulatory, transcript, or exon only when needed. The response returns up to max_results features (default 100) while totalCount always reports the full count; set max_results to 0 for every feature, or query a smaller region to see a different slice. Exon rows carry the parent transcript ID, so the same exon appears once per transcript it belongs to.
只读 可访问外部资源 幂等
输入模式
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['species', 'region'], 'properties': {'region': {'type': 'string', 'minLength': 1, 'description': 'Genomic region in chr:start-end format (e.g. 13:32315086-32400268). Ensembl serves at most 5,000,000 bases per region; split a larger area into smaller windows. Ensembl normalizes chromosome names and canonical vertebrate output omits the chr prefix (13, not chr13); a chr-prefixed name like chr13 is also accepted. For large regions (>100 kb), limit to gene feature type to avoid overwhelming results.'}, 'biotype': {'type': 'string', 'description': 'Optional biotype filter (e.g. protein_coding, lncRNA, SNV). Applied server-side by Ensembl. Not all feature types support biotype filtering.'}, 'feature': {'type': 'array', 'items': {'enum': ['gene', 'transcript', 'variation', 'regulatory', 'exon'], 'type': 'string', 'description': 'A feature type to retrieve: gene, transcript, variation, regulatory, or exon.'}, 'default': ['gene'], 'minItems': 1, 'description': 'Feature types to retrieve â\x80\x94 at least one. Default is gene only. Requesting variation in a large region can match tens of thousands of features. Include variation only for targeted small regions (single gene loci or smaller).'}, 'species': {'type': 'string', 'minLength': 1, 'description': 'Species in Ensembl internal format (e.g. homo_sapiens, mus_musculus). Use ensembl_list_species to discover valid values.'}, 'max_results': {'type': 'integer', 'default': 100, 'maximum': 9007199254740991, 'minimum': 0, 'description': 'Maximum number of features to return. A gene-length region can hold tens of thousands of variation features; the default keeps the response compact. Set to 0 to return every feature uncapped. totalCount always reports the true number found before this cap.'}}, 'additionalProperties': False}
输出模式
{'type': 'object', 'anyOf': [{'not': {'required': ['error']}, 'required': ['features', 'totalCount', 'region', 'species']}, {'required': ['error']}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'cap': {'type': 'number', 'description': 'The max_results limit applied to the feature list.'}, 'error': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991, 'description': 'JSON-RPC error code for this failure.'}, 'data': {'type': 'object', 'properties': {'reason': {'type': 'string', 'examples': ['invalid_region', 'invalid_species'], 'description': 'Machine-readable failure mode. Declared by this tool: `invalid_region`: The region string could not be parsed, contains invalid coordinates, or spans more than the 5,000,000-base maximum. `invalid_species`: The species string was not recognized by Ensembl. Other values are possible when a failure originates below the handler.'}, 'recovery': {'type': 'object', 'required': ['hint'], 'properties': {'hint': {'type': 'string'}}, 'description': 'Actionable next step for the caller.', 'additionalProperties': {}}, 'retryable': {'type': 'boolean', 'description': 'Whether retrying may succeed.'}}, 'additionalProperties': {}}, 'message': {'type': 'string', 'description': 'Human-readable description of what went wrong.'}}, 'description': 'Present when the call failed. Absent on success.', 'additionalProperties': {}}, 'shown': {'type': 'number', 'description': 'Number of features returned after the max_results cap.'}, 'notice': {'type': 'string', 'description': 'Guidance about the result set: empty, large, capped, or missing assembly.'}, 'region': {'type': 'string', 'description': 'The region queried, as provided.'}, 'species': {'type': 'string', 'description': 'The species queried.'}, 'features': {'type': 'array', 'items': {'type': 'object', 'required': ['featureType', 'chromosome', 'start', 'end'], 'properties': {'id': {'type': 'string', 'description': 'Ensembl stable ID for this feature (e.g. ENSGâ\x80¦, rsâ\x80¦).'}, 'end': {'type': 'number', 'description': 'End position on the chromosome (1-based).'}, 'name': {'type': 'string', 'description': 'External name or symbol for this feature.'}, 'rank': {'type': 'number', 'description': 'Position (1-based) of an exon within its parent transcript.'}, 'start': {'type': 'number', 'description': 'Start position on the chromosome (1-based).'}, 'strand': {'type': 'number', 'description': 'Strand: 1 for forward, -1 for reverse.'}, 'biotype': {'type': 'string', 'description': 'Biotype of the feature (e.g. protein_coding, lncRNA, SNV).'}, 'parentId': {'type': 'string', 'description': 'Parent transcript ID (ENSTâ\x80¦) for exon features. An exon is reported once per parent transcript it belongs to, so the same exon ID can appear on multiple rows that differ only by this field â\x80\x94 not duplicates.'}, 'chromosome': {'type': 'string', 'description': 'Chromosome or sequence region name.'}, 'description': {'type': 'string', 'description': 'Feature description when provided.'}, 'featureType': {'type': 'string', 'description': 'Feature type: gene, transcript, variation, regulatory, or exon.'}, 'consequenceType': {'type': 'string', 'description': 'Most severe consequence type for variation features.'}, 'clinicalSignificance': {'type': 'array', 'items': {'type': 'string', 'description': 'A clinical significance term for this variant.'}, 'description': 'Clinical significance terms for variation features (e.g. pathogenic, benign).'}}, 'description': 'A single genomic feature overlapping the queried region.', 'additionalProperties': False}, 'description': 'Genomic features found in the requested region, capped to max_results. totalCount reports the full count found before the cap.'}, 'truncated': {'type': 'boolean', 'description': 'True when the feature list was capped at max_results.'}, 'totalCount': {'type': 'number', 'description': 'Total number of features found in the region before the max_results cap. Exceeds the returned features count when the list was capped.'}, 'assemblyName': {'type': 'string', 'description': 'Genome assembly the coordinates are on (e.g. GRCh38). Omitted only when it could not be resolved, in which case the notice says so.'}}, 'additionalProperties': False}
已更改
ensembl_get_xrefs
2026年9月25日 02:51
已更改
ensembl_get_homology
2026年9月25日 02:51
已更改
ensembl_predict_variant
2026年9月25日 02:51
已更改
ensembl_query_region
2026年9月25日 02:51
已更改
ensembl_get_sequence
2026年9月25日 02:51
已更改
ensembl_lookup_gene
2026年9月25日 02:51
已添加
ensembl_get_xrefs
2026年9月17日 12:41
已添加
ensembl_get_homology
2026年9月17日 12:41
已添加
ensembl_predict_variant
2026年9月17日 12:41
已添加
ensembl_query_region
2026年9月17日 12:41
已添加
ensembl_get_sequence
2026年9月17日 12:41
已添加
ensembl_lookup_gene
2026年9月17日 12:41
已添加
ensembl_list_species
2026年9月17日 12:41