Skip to main content
Glama

ncbi_esearch

Read-only

Search NCBI databases like Gene, ClinVar, and PubMed to retrieve relevant record IDs using E-utilities esearch, with support for field tags and boolean queries for precise results.

Instructions

Search NCBI databases using E-utilities esearch API.

⚠️ CRITICAL FOR COMPREHENSIVE RESULTS ⚠️ ALWAYS use NCBI field tags for Gene, ClinVar, and similar databases! Without field tags, you may miss 70-80% of relevant results.

MANDATORY FIELD TAGS FOR GENE DATABASE: • [Organism] - Taxonomic filtering (e.g., "Homo sapiens[Organism]", "Archaea[Organism]") • [Gene Name] - Gene symbols (e.g., "TP53[Gene Name]", "nifH[Gene Name]") • [All Fields] - Broad keyword search (e.g., "nitrogenase[All Fields]")

IMPACT OF FIELD TAGS (Gene Database): • Without field tags: ~300 results (20-30% recall) ❌ • With field tags: ~1,300 results (100% recall) ✅ • Performance loss: Missing field tags = 70-80% data loss!

EXAMPLE (Gene): ✅ query="Archaea[Organism] AND (nifH[Gene Name] OR nitrogenase[All Fields])" ❌ query="archaea AND nifH" (missing [Organism]/[Gene Name] tags → ~23% recall)

RETURNS formatted text results carrying the database-specific IDs. On a missing/invalid database or query it returns a single text item whose message begins with "Error:" — check for that prefix before using the IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dbNoAlias for `database`.
termNoAlias for `query`.
queryNoSearch query with NCBI field tags and boolean operators (alias: `term`)
sort_byNoOptional sort order (e.g., "relevance", "pub_date" for PubMed)
databaseNoNCBI database name (alias: `db`). Supported values: - "gene" or "ncbigene": NCBI Gene database ⚠️ FIELD TAGS CRITICAL - "taxonomy": NCBI Taxonomy (organism information) - "clinvar": ClinVar (genetic variants) ⚠️ FIELD TAGS CRITICAL - "medgen": MedGen (medical genetics concepts) - "mesh": MeSH (Medical Subject Headings) - "pubmed": PubMed (biomedical literature) - "pccompound": PubChem Compound - "pcsubstance": PubChem Substance - "pcassay": PubChem BioAssay
max_resultsNoMaximum number of results to return (default: 20)
start_indexNoStarting index for pagination (default: 0)
search_fieldNoOptional specific field to search in
Behavior5/5

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

Beyond the readOnlyHint and openWorldHint annotations, the description discloses important runtime behavior: it returns formatted text with database-specific IDs, and it returns an error-prefixed text item on invalid database or query. It also warns about 70-80% recall loss without field tags, providing valuable behavioral context.

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?

The description is long and uses bolded warnings, emojis, and repeated emphasis on field tags, but it is well organized with clear sections and examples. The verbosity is justified by the critical impact of field tags on result quality, though some repetition could be trimmed.

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

Completeness4/5

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

For a search tool with no output schema, the description covers the critical operational details: query format, field tag requirements, error behavior, and pagination parameters in schema. It does not mention NCBI rate limits or explain how the returned IDs are delimited, but the provided guidance is sufficient for successful invocation.

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?

The input schema already documents all eight parameters, so baseline is 3. The description adds meaningful query-construction semantics, including field tag syntax, boolean operations, and worked examples for the `query` and `database` parameters, going beyond the schema's brief descriptions.

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 opens with a specific action and resource: 'Search NCBI databases using E-utilities esearch API.' It clearly states the tool returns database-specific IDs, which distinguishes it from sibling tools like ncbi_esummary and ncbi_efetch.

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 provides strong, explicit guidance on how to construct queries, especially mandatory field tags for Gene and ClinVar, with concrete examples and performance consequences. It does not explicitly contrast this tool with sibling retrieval tools, but the context for when to search for IDs is clear.

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/dbcls/togomcp'

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