Skip to main content
Glama
kmaneesh

BioPython MCP Server

by kmaneesh

entrez_fetch

Retrieve full records from NCBI Entrez by UID across databases like PubMed, nucleotide, gene, and protein. Choose from formats such as XML, FASTA, or abstract with caching for static data.

Instructions

Fetch full records from NCBI Entrez by UID.

Args: database: Database name (e.g., 'pubmed', 'nucleotide', 'gene', 'protein') ids: Single ID, comma-separated string, or list of IDs rettype: Return type - 'xml', 'gb', 'fasta', 'abstract', etc. (default: 'xml') retmode: Return mode - 'xml', 'text', 'json' (default: 'xml') use_cache: Whether to use cached results (default: True, TTL: 7 days)

Returns: Dictionary containing: - data: Raw data in requested format (parsed if XML, raw text otherwise) - ids: List of IDs fetched - count: Number of records retrieved - format: Return type/mode used - database: Database queried - cached: Whether result was from cache (if use_cache=True)

Examples: >>> entrez_fetch("pubmed", "12345678", rettype="abstract", retmode="xml") >>> entrez_fetch("nucleotide", ["NM_000207", "NM_001127"], rettype="fasta", retmode="text") >>> entrez_fetch("gene", "672", rettype="xml") >>> entrez_fetch("protein", "NP_000198.1", rettype="fasta", retmode="text")

Notes: - For >100 IDs, consider batching to avoid timeouts - Valid rettype/retmode combinations depend on database - XML mode returns parsed Python dict/list structure - Text mode returns raw string data - Rate limited to 3 req/sec (or 10 req/sec with API key) - Cached results have 7 day TTL since record data is relatively static

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseYes
idsYes
rettypeNoxml
retmodeNoxml
use_cacheNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description fully shoulders behavioral transparency. It discloses rate limits (3 req/sec, 10 with API key), caching with 7-day TTL, return format handling (XML parsed, text raw), and batching advice. This is substantial, though it could mention potential timeout behaviors explicitly.

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 well-structured with clear sections (Args, Returns, Examples, Notes) and is concise given the complexity. Every sentence adds value, and the information is front-loaded with the essential purpose and parameters. No redundancy or fluff.

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?

Given the tool's complexity (5 parameters, output schema present), the description covers all necessary aspects: parameter semantics, return value structure, caching behavior, rate limits, and multiple examples. It is sufficiently complete for an agent to select and invoke correctly.

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 0%, so the description must compensate heavily. It does so by explaining each parameter (database, ids, rettype, retmode, use_cache) with types, defaults, and examples. The Returns section also adds meaning to the output schema, making the tool's usage clear without needing the schema alone.

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?

The description clearly states 'Fetch full records from NCBI Entrez by UID' and provides parameter details and examples. However, it does not explicitly differentiate this tool from sibling tools like entrez_search or entrez_summary, relying on the user to infer the distinction based on the 'by UID' focus.

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?

The description includes notes on batching, rate limits, and caching, which provide implicit usage guidance. However, it lacks explicit when-to-use vs. alternatives (e.g., when to use this vs. entrez_search or fetch_genbank), and no when-not-to-use scenarios are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kmaneesh/biopython-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server