Skip to main content
Glama

search_pubmed

Search PubMed using NCBI esearch to get PMIDs exactly as NCBI returns them for field-tagged, MeSH, Boolean, and date-limited queries, plus match counts and query translation.

Instructions

Search PubMed (NCBI esearch) and return PMIDs exactly as NCBI returns them.

Args: query: PubMed query; supports field tags, MeSH and Boolean, e.g. '"hypertrophic cardiomyopathy"[MeSH] AND mavacamten[tiab] AND randomized controlled trial[pt]'. max_results: 1-200 (default 20). total_matches reports the full hit count. sort: 'relevance' or 'pub_date' (newest first). date_from / date_to: optional publication-year bounds (e.g. 2018, 2025). Returns pmids, total_matches and query_translation (how PubMed interpreted the query; log it for reproducibility).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNorelevance
queryYes
date_toNo
date_fromNo
max_resultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that it returns PMIDs exactly as NCBI returns them and mentions the reproducibility benefit of query_translation. However, it doesn't cover rate limits, authentication, error behavior, or whether results are cached, and the fact that it's a search tool implies a read-only profile that could be stated explicitly.

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 front-loaded with the core purpose, followed by a compact argument list and return summary. Every section earns its place, though the Args block is on the verbose side for a description and could be slightly 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 5-parameter search tool with no annotations and no output schema, the description covers inputs thoroughly and even describes the return payload (pmids, total_matches, query_translation). It lacks sibling differentiation and some operational behavior (rate limits, authentication), but overall it is nearly complete for correct 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?

Schema coverage is 0%, so the description must compensate, and it does so well: it documents each parameter (query syntax with MeSH/Boolean, max_results range and default, sort options, date_from/date_to as publication-year bounds) and even explains returned metadata (total_matches, query_translation). This adds substantial meaning beyond the bare schema titles.

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 ('Search PubMed (NCBI esearch) and return PMIDs exactly as NCBI returns them'), which is clear. However, it doesn't distinguish itself from the sibling 'pubmed_search' or 'search_with_access', leaving ambiguity about which search tool to choose in the presence of similarly named siblings.

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

Usage Guidelines2/5

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

The description explains argument formats but provides no guidance on when to use this tool versus alternatives like pubmed_search or pubmed_fetch. No explicit when/when-not or alternative routing is present, leaving the agent to infer context.

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