Skip to main content
Glama

Get Sequence

ensembl_get_sequence
Read-onlyIdempotent

Fetch the DNA, cDNA, CDS, or protein sequence for a gene, transcript, protein, or genomic region. Returns the sequence with its stable ID, molecule type, and character count — large sequences are returned in full but the length is stated so callers can budget context. 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). 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesEnsembl stable ID (ENSG…, ENST…, ENSP…) 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.
typeNoSequence type to retrieve. genomic: full genomic DNA including introns (default). cdna: spliced transcript sequence (requires ENST… ID). cds: coding sequence only, no UTRs (requires ENST… ID with coding transcript). protein: amino acid sequence (requires ENST… or ENSP… ID).genomic
speciesNoSpecies 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 — Ensembl infers species from the ID prefix.
expand_3primeNoNumber of base pairs to extend downstream (3' direction) of the requested feature. Default 0. Only applies to genomic sequences and region queries.
expand_5primeNoNumber of base pairs to extend upstream (5' direction) of the requested feature. Default 0. Only applies to genomic sequences and region queries.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoThe stable ID or region used for the lookup.
seqNoThe full sequence. DNA sequences use IUPAC nucleotide codes (ACGT + ambiguity codes). Protein sequences use single-letter amino acid codes. Large genomic sequences (e.g. 85 kb for BRCA2) are returned in full.
typeNoSequence type returned (genomic, cdna, cds, or protein).
errorNoPresent when the call failed. Absent on success.
lengthNoSequence length in characters — nucleotides for genomic/cdna/cds, amino-acid residues for protein. Use this to budget context window usage before processing the sequence.
descriptionNoSequence description from Ensembl, if provided.

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Read-only and idempotency are already covered by annotations, so the description adds useful behavior beyond those: it warns that large sequences are returned in full and that the character count is provided so callers can budget context. It also clarifies molecule-type restrictions, which is valuable operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but every sentence contributes practical guidance: return behavior, sequence-type semantics, region formats, and the protein workflow. Nothing is redundant or padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only sequence retrieval tool with five parameters, an output schema, and full schema coverage, the description covers the essential decisions an agent must make: which ID type to pass, which sequence type to request, how to specify regions, and where to get a transcript ID when needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage, the schema already documents each parameter, but the description adds concrete region format examples and cross-parameter constraints, such as protein sequences requiring ENST/ENSP IDs and the expand parameters applying only to genomic/region queries. This goes beyond what the schema alone provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Fetch') and resource ('DNA, cDNA, CDS, or protein sequence') and immediately clarifies the supported input identifiers and modes. Its scope is distinct from the sibling tools, which handle homology, xrefs, variants, and region metadata rather than sequence retrieval.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context on which sequence type to request and explains how to provide genomic regions. It also explicitly tells the caller to use ensembl_lookup_gene with expand_transcripts=true when a protein sequence is needed from a gene ID, though it does not directly contrast itself with all sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool targets a distinct genomic resource: homology, sequence, xrefs, species metadata, gene lookup, variant prediction, and region query. There is no overlap in their purposes, and the descriptions clearly delineate when to use each.

Naming Consistency5/5

All tool names follow the consistent pattern 'ensembl_' plus an action verb (get, list, lookup, predict, query) and a noun. The naming style is uniformly snake_case and lowercase, making the tool set predictable and easy to navigate.

Tool Count5/5

With 7 tools, the server is well-scoped for its purpose. Each tool addresses a core Ensembl query need without redundancy or bloat, fitting comfortably in the ideal range for a domain-specific toolkit.

Completeness5/5

The tool set covers the primary lifecycle of genomic investigation: discovering species, resolving gene identifiers, fetching sequences, obtaining cross-references, querying regions, finding homologs, and predicting variant consequences. There are no critical gaps for typical use cases.