Skip to main content
Glama

genbank_get

Read-only

Fetch GenBank/RefSeq nucleotide records by accession as GenBank flat-file or FASTA text, including sequence regions for large records.

Instructions

Fetch a GenBank/RefSeq nucleotide record as text (GenBank flat file or FASTA).

Whole-record fetches are capped at 2,000,000 bp — larger records require a seq_start/seq_stop region (1-based, inclusive, up to 10 Mb span; set strand=2 for a reverse-strand slice where seq_start > seq_stop — the region field echoes the request as given, while NCBI's text shows complement(min..max)). Output: records up to 1,000 characters are returned inline (sequence_text with char_count/truncated). Anything larger defaults to file mode — the FULL text is written to a server-side cache file and the reply carries mode:"file", file_path, char_count, and total_char_count instead of sequence_text (never truncated); Read/Grep the file selectively. The cache is ephemeral (pruned after ~7 days / 500 files) and the path is server-local; re-call to regenerate. sequence_output:"inline" opts back into inline text capped at 200,000 characters — use it only if you cannot read server-side files.

Input Schema

NameRequiredDescriptionDefault
formatNoRecord format: genbank flat file (default) or fastagenbank
strandNoStrand: 1=plus (default), 2=minus (reverse slice; allows seq_start > seq_stop)
seq_stopNoRegion stop (1-based, inclusive)
accessionYesGenBank/RefSeq accession, versioned or bare — NC_000023.11, NG_017013.2, KJ668569.1, NC_000908.2
seq_startNoRegion start (1-based, inclusive) — required with seq_stop for records over 2 Mb
sequence_outputNoOutput mode: "file" (default) writes records over 1,000 characters whole to a server-side cache file and returns file_path + char counts (full data, never truncated); "inline" returns sequence_text inline, capped at 200,000 characters — use only if you cannot read server-side files
max_response_bytesNoHard cap on the raw NCBI response in characters (default 30,000,000) — oversized responses error instead of truncating

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.6.0-alpha.10
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / max_response_bytes / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / seq_start / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / seq_stop / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / strand / anyOf
      Added value: +[
      +  {
      +    "const": 1,
      +    "type": "number"
      +  },
      +  {
      +    "const": 2,
      +    "type": "number"
      +  }
      +]
    • removedInput schema / properties / strand / enum
      Removed value: -[
      -  1,
      -  2
      -]
    • removedInput schema / properties / strand / type
      Removed value: -"number"
  2. Changed3 schema fields changedv1.6.0-alpha.7
    • addedInput schema / properties / accession / minLength
      Added value: +1
    • addedInput schema / properties / accession / pattern
      Added value: +"^[A-Z]{1,6}_?\\d+(?:\\.\\d+)?$"
    • addedInput schema / properties / sequence_output
      Added value: +{
      +  "description": "Output mode: \"file\" (default) writes records over 1,000 characters whole to a server-side cache file and returns file_path + char counts (full data, never truncated); \"inline\" returns sequence_text inline, capped at 200,000 characters — use only if you cannot read server-side files",
      +  "enum": [
      +    "file",
      +    "inline"
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changedv1.6.0-alpha.3
    • changedInput schema / properties / accession / description
      Previous value: -"GenBank/RefSeq accession, versioned or bare — NC_000023.11, NG_017013.2, KJ668569.2"New value: +"GenBank/RefSeq accession, versioned or bare — NC_000023.11, NG_017013.2, KJ668569.1, NC_000908.2"
  4. Addedv0.7.1

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld annotations: discloses the 2 Mb whole-record cap, the 1,000-character inline threshold, file-mode caching with path/char counts, cache ephemerality (~7 days / 500 files), server-local path caveat, the 200,000-char inline cap, and that max_response_bytes errors rather than truncates.

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

Conciseness4/5

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

Front-loaded with purpose and the size caps, and nearly every clause carries operational information. Some redundancy remains — the file/inline tradeoff is explained in the prose and again in the sequence_output schema description, which lengthens an already dense paragraph.

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?

Seven parameters, two enums, and no output schema, so the description bears the full burden of describing returns — it does, enumerating sequence_text/char_count/truncated versus mode/file_path/char_count/total_char_count. An agent has everything needed to call and interpret results.

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

Parameters5/5

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

Schema coverage is already 100%, yet the description adds genuinely non-obvious semantics: the reverse-strand slice convention (strand=2 with seq_start > seq_stop), and the fact that the echoed region field preserves the request order while NCBI text renders complement(min..max). That resolves a real ambiguity the schema cannot express.

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

Purpose4/5

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

States a specific verb and resource: 'Fetch a GenBank/RefSeq nucleotide record as text', and names both output formats. The distinction from the sibling genbank_search (search vs. fetch by accession) is implied by the name and required accession parameter but never stated explicitly.

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

Usage Guidelines3/5

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

Gives conditional guidance for parameters — region required for records over 2 Mb, inline mode only if server-side files are unreadable — but never says when to choose this over genbank_search, sra_get, or ensembl_region. Usage must be inferred from the verb.

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