Skip to main content
Glama




Why this exists

Most PubMed wrappers either invent missing metadata or bury the original NCBI response. This one does neither. Every field comes from the source. If PubMed left something out, you see it. That makes the output usable in PRISMA workflows and audit trails.


Related MCP server: PubMed MCP Server

Architecture

flowchart TB
    subgraph Client["MCP Clients"]
        A[Claude Desktop]
        B[Cursor / Antigravity]
        C[OpenCode]
        D[Any MCP client]
    end

    subgraph Server["pubmed-mcp"]
        direction TB
        T1[pubmed_search]
        T2[pubmed_get]
        T3[pubmed_fetch / batch_fetch]
        T4[check_access / download_pdfs]
        T5[pubmed_database_info]

        NC["ncbi_client.py<br/>rate-limit · retry · provenance"]
        ACC["access.py<br/>Unpaywall + PMC"]
    end

    subgraph NCBI["NCBI E-utilities"]
        ES[esearch.fcgi]
        EF[efetch.fcgi]
        EI[einfo.fcgi]
    end

    subgraph External["Open Access"]
        UP[Unpaywall]
        PMC[PubMed Central]
    end

    Client --> Server
    T1 & T2 & T3 & T5 --> NC
    T4 --> ACC
    NC --> NCBI
    ACC --> UP
    ACC --> PMC

    style Client fill:#e0f2fe,stroke:#0284c7
    style Server fill:#f0fdfa,stroke:#0d9488
    style NCBI fill:#fef3c7,stroke:#d97706
    style External fill:#fce7f3,stroke:#db2777

Data flow (search → records)

flowchart LR
    Q[User Query] --> S[pubmed_search]
    S --> H{use_history?}
    H -->|yes| WH[WebEnv + QueryKey]
    H -->|no| PMIDs[PMID list]

    WH --> BF[pubmed_batch_fetch]
    PMIDs --> BF
    PMIDs --> GET[pubmed_get]

    BF --> NORM["Normalized records<br/>+ missingness flags"]
    GET --> NORM

    NORM --> PROV[Provenance block]
    NORM --> RET[Retraction / Erratum flags]

    style Q fill:#e0f2fe
    style NORM fill:#ccfbf1
    style PROV fill:#fef3c7
    style RET fill:#fee2e2

Guarantees

Guarantee

Meaning

Source fidelity

Every field comes directly from the NCBI E-utilities response. Nothing is inferred, guessed, paraphrased, or enriched from external sources.

Missingness flagged

A field PubMed does not provide is returned as the literal string "Data not provided in PubMed abstract" — never fabricated.

Not-found reported

PMIDs requested but not returned by NCBI are listed in not_found, never silently dropped or fabricated.

Provenance on every record

Each normalized record carries a provenance block marking every field as directly_sourced or not_returned_by_ncbi.

Anti-inference

false_inference_count == 0 — verified by the offline regression benchmark (benchmark.py).

No paywall bypass

Only legally open-access copies (PubMed Central, Unpaywall gold/green) are indexed and downloaded.

Stdout reserved for MCP

In stdio mode, stdout is reserved for the MCP protocol; all logging goes to stderr.

What this is not

  • No full-text extraction beyond legally open PDFs

  • No evidence-level grading (CEBM/GRADE) added

  • No silent enrichment from Crossref, OpenAlex, Semantic Scholar, or other databases

  • No paywall bypass

  • No LLM-based abstract completion or metadata inference


Install

pip install pubmed-access-mcp

Or run without installing:

uvx pubmed-access-mcp

Tools grouped by phase / purpose

Phase 1 — Evidence provenance & search snapshots

Tool

What it does

pubmed_database_info

NCBI einfo for a database (field list, counts, last update).

pubmed_create_search_snapshot

Save a search query + parameters as a named snapshot for reproducible retrieval.

pubmed_get_snapshot

Retrieve a previously created search snapshot by ID.

pubmed_list_snapshots

List existing snapshots (paginated).

Phase 2 — Bibliographic exports & download audit

Tool

What it does

pubmed_export_ris

Export records in RIS format (reference managers).

pubmed_export_bibtex

Export records in BibTeX format.

pubmed_export_csv

Export records as CSV.

pubmed_export_json

Export records as JSON.

Phase 3 — Source-linked structured evidence tables

Tool

What it does

pubmed_evidence_table

Build a structured evidence table from records or a snapshot. Every cell carries value + status + optional source quote.

Phase 4 — Europe PMC, deduplication, citation chase, retraction monitoring

Tool

What it does

europe_pmc_search

Search Europe PMC (complementary to PubMed).

europe_pmc_get

Fetch a single Europe PMC record by ID.

pubmed_deduplicate

Deduplicate records by PMID / DOI / title matching.

pubmed_citation_chase

Trace citations forward/backward for a set of PMIDs.

pubmed_retraction_check

Check PMIDs for retraction / erratum notices via NCBI link data.

Phase 5 — Offline evaluation & regression benchmark

Tool

What it does

pubmed_validate

Validate a normalized record against the anti-inference guarantee; returns false_inference_count.

Core retrieval tools (all phases)

Tool

What it does

pubmed_search

Search PubMed via NCBI esearch. Returns PMIDs, total match count, query translation, and Entrez History tokens (webenv / query_key) when use_history=True.

pubmed_get

Fetch a single normalized record by PMID, with full provenance.

pubmed_fetch

Fetch multiple PMIDs in one call (internally chunked, max 200 per chunk).

pubmed_batch_fetch

Retrieve large result sets via PMID list or Entrez History, chunked at batch_size (max 200).


Retrieving full result sets (> 200 records)

pubmed_search returns at most max_results PMIDs per call (default 20, capped at MAX_SEARCH = 9999). To retrieve all matching records when total_matches exceeds that:

# Step 1: Search with Entrez History enabled
result = server.pubmed_search(
    query="your PubMed query",
    use_history=True,        # stores search on NCBI Entrez History server
    max_results=200,         # or higher, up to 9999
)

total_matches = result["search"]["count"]      # total matching records
webenv = result["webenv"]                      # Entrez WebEnv token
query_key = result["query_key"]                # Entrez QueryKey token

# Step 2: Batch-fetch all records in chunks of 200
all_records = server.pubmed_batch_fetch(
    webenv=webenv,
    query_key=query_key,
    total_records=total_matches,
    batch_size=200,         # max 200 per chunk
)

pubmed_batch_fetch iterates retstart from 0 to total_records in chunks of batch_size, returning per-batch results, per-record statuses, and not_found PMIDs.


Examples

Runnable, copy-pasteable snippets for real workflows. No secrets, no real API keys, no emails — every file uses placeholders only.

Example

Description

examples/SYSTEMATIC_REVIEW_EXAMPLE.md

Full-retrieval pattern for systematic reviews: pubmed_search(use_history=True) → pubmed_batch_fetch(...). Covers the E. coli × tetracycline × MGE × 2000–2025 protocol query.

examples/LIVE_SMOKE_EXAMPLE.md

Minimal end-to-end smoke test: search → normalized single record → anti-inference benchmark check.

Each example declares the anti-inference guarantee (false_inference_count == 0) and documents provenance statuses (directly_sourced / not_returned_by_ncbi).


Open-access PDFs

Sources: Unpaywall (DOI) and PubMed Central (PMCID). Set UNPAYWALL_EMAIL or NCBI_EMAIL. NO_OPEN_ACCESS_FOUND means no legal free copy is indexed — it does not mean an institution cannot reach the paper. Every downloaded file is checked for a real %PDF header. Bot-check pages are rejected. Default folder: ~/pubmed_pdfs (override with PUBMED_PDF_DIR). No paywall bypass.


MCP client setup

After pip install

{
  "mcpServers": {
    "pubmed-scraper": {
      "command": "pubmed-access-mcp",
      "args": [],
      "env": {
        "NCBI_EMAIL": "you@example.com",
        "UNPAYWALL_EMAIL": "you@example.com"
      }
    }
  }
}

With uvx (no install)

{
  "mcpServers": {
    "pubmed-scraper": {
      "command": "uvx",
      "args": ["pubmed-access-mcp"],
      "env": {
        "NCBI_EMAIL": "you@example.com",
        "UNPAYWALL_EMAIL": "you@example.com"
      }
    }
  }
}

OpenCode

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "pubmed-scraper": {
      "type": "local",
      "command": ["uvx", "pubmed-access-mcp"],
      "environment": {
        "NCBI_EMAIL": "you@example.com",
        "UNPAYWALL_EMAIL": "you@example.com"
      }
    }
  }
}

Optional env vars: NCBI_API_KEY (raises rate limit), NCBI_TOOL. Keep real keys in your global config, never in a committed file.


Deploy (Google Cloud Run)

Free tier covers ~2 M requests/month with scale-to-zero.

export NCBI_EMAIL="you@example.com"
export UNPAYWALL_EMAIL="you@example.com"
export NCBI_API_KEY="your-key"   # optional

chmod +x deploy.sh
./deploy.sh                     # or ./deploy.sh my-project us-east1

After deploy the endpoint looks like:

https://pubmed-mcp-HASH-REGION.a.run.app/mcp

Point any MCP client that supports remote servers at that URL.

One-click public tunnel (Windows):

run_cloudflare_tunnel.bat

Development

git clone https://github.com/ahsanmandhar-ui/pubmed-mcp.git
cd pubmed-mcp
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

python tests/test_server.py   # offline
python tests/test_access.py

Run the full offline test suite:

python -m pytest tests/ -v

All 68 tests pass with false_inference_count == 0.


Limitations

  • Abstracts only. Full text is not returned (unless the paper is in the PMC open-access subset and you download the PDF).

  • Search quality depends on your query. Always check query_translation.

  • Open-access coverage varies; some publishers block automated downloads.

  • Live network behaviour is not covered by the offline test suite.


License

Apache License 2.0 — see LICENSE. Copyright © ahsanmandhar-ui. M8ven Score

Available Tools

10 tools
check_accessA

Classify each PMID as open-access PDF, open-access landing page only, no open access found (likely paywalled), or unchecked.

Uses DOI -> Unpaywall and PMCID -> PubMed Central. 'no_open_access_found' means no legal free copy is indexed; it does not prove the paper cannot be reached through an institution. Max 100 PMIDs per call. Needs UNPAYWALL_EMAIL (or NCBI_EMAIL) for the Unpaywall lookup; without it only PubMed Central links are found.

ParametersJSON Schema
NameRequiredDescriptionDefault
pmidsYes

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations present the description carries the full burden, and it delivers: it discloses the credential requirement (UNPAYWALL_EMAIL or NCBI_EMAIL) and the degraded behavior without it (only PubMed Central links found), plus the 100-PMID ceiling. The semantic caveat about false negatives is exactly the kind of context an agent cannot infer from structured fields.

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?

Front-loads the classification outcome, then layers in mechanism, caveat, limit and prerequisite in four tight sentences. No filler and no repetition of the tool name.

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?

There is no output schema, so the description appropriately defines the return categories itself, along with the lookup mechanisms and environment prerequisites. An agent has everything needed to call it correctly and interpret results.

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% for the single pmids parameter, so the description must compensate; it contributes the hard constraint of max 100 PMIDs per call, which the schema does not express. It stops short of specifying the PMID format (string vs numeric), leaving a minor gap.

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?

Uses a precise verb ('Classify each PMID') and enumerates the exact output taxonomy — open-access PDF, landing page only, no open access found, unchecked — so the tool's function is unmistakable. This clearly separates it from siblings like download_pdfs and pubmed_fetch, which retrieve rather than classify access status.

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?

Explains the meaning and limits of the result ('no_open_access_found' is not proof of inaccessibility) and states the operational cap of 100 PMIDs per call. It does not explicitly name when to prefer this over siblings such as search_with_access, but the usage context is clear.

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

download_pdfsA

Download open-access PDFs for the given PMIDs (max 50) as PMID.pdf. Paywalled papers are skipped, never bypassed.

folder: absolute path, or a sub-folder name under PUBMED_PDF_DIR (default ~/pubmed_pdfs). Every file is verified to be a real PDF (starts with %PDF); HTML login/bot-check pages are rejected and reported as failed.

ParametersJSON Schema
NameRequiredDescriptionDefault
pmidsYes
folderNo

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does a solid job: it discloses the 50-item cap, that paywalled content is skipped and never bypassed, the naming convention, folder resolution rules including the default, and that files are validated by the %PDF magic bytes with HTML login/bot-check pages rejected and reported as failures. It does not state rate limits or authentication requirements, which keeps it from a 5.

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 the core action and its limits, and the second paragraph is dense with operational detail rather than filler. The mid-paragraph 'folder:' label is slightly awkward but the text is otherwise tight and every sentence earns its place.

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 two-parameter tool with no annotations and no output schema, the description covers the critical unknowns: which papers are downloadable, where files land, how they are named, and how unverifiable files surface as failures. Missing return-value structure (e.g., counts or per-PMID status list) is a minor gap.

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 description coverage is 0%, so the description must compensate, and it does so well for 'folder': absolute path vs. a sub-folder name resolved under PUBMED_PDF_DIR with a stated default of ~/pubmed_pdfs. For 'pmids' it adds only the max-50 constraint and the PMID<id>.pdf output mapping, leaving the expected ID format implicit.

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 ('Download open-access PDFs for the given PMIDs') plus the output artifact ('as PMID<id>.pdf'), which clearly separates it from abstract/fetch siblings like fetch_abstracts and pubmed_fetch. It stops short of naming an alternative tool explicitly, so it lands at 4 rather than 5.

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 conveys scope constraints that imply usage (open-access only, max 50 PMIDs, paywalled papers skipped rather than bypassed), which tells the agent this is not a general access tool. However, it never states when to prefer this over check_access or search_with_access, nor any prerequisite step for obtaining PMIDs, so guidance remains implicit.

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

fetch_abstractsA

Fetch exact PubMed records (NCBI efetch) for up to 200 PMIDs.

Per record: pmid, title, authors, journal, pub_date, doi, publication_types, has_retraction_notice, abstract (structured abstracts keep their section labels), url. Any field PubMed does not provide is the literal string 'Data not provided in PubMed abstract'. PMIDs NCBI did not return are listed in not_found. Never infer or complete missing text.

ParametersJSON Schema
NameRequiredDescriptionDefault
pmidsYes

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it declares the missing-field sentinel string, the `not_found` behavior for PMIDs NCBI omits, the presence of a retraction-notice flag, and an explicit instruction never to infer or complete missing text. It omits auth/rate-limit behavior and any failure modes, which keeps it short of a 5.

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 the action, then a compact enumeration of returned fields, then two behavioral rules. The field list is long but justified because no output schema exists. No wasted sentences.

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?

With no output schema and no annotations, the description fully specifies the return shape, the sentinel for absent data, and the `not_found` channel, plus an anti-hallucination rule. That is everything an agent needs to consume the result correctly.

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

Parameters3/5

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

One parameter at 0% schema description coverage, so the description must compensate. It does add real meaning — the input is a list of PMIDs and is capped at 200 — but says nothing about PMID formatting, duplicates, or empty-list behavior. Partial compensation only.

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 — fetching exact PubMed records via NCBI efetch for up to 200 PMIDs — so the agent knows exactly what it does. However, the sibling set (pubmed_fetch, pubmed_get, pubmed_batch_fetch) is highly overlapping, and the description never names or distinguishes itself from those alternatives.

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?

No statement of when to use this tool versus pubmed_fetch, pubmed_get, or pubmed_batch_fetch, even though those siblings appear functionally similar. The only usable context is an implicit one: batch retrieval by PMID list. Nothing tells the agent when this is the wrong choice.

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

pubmed_batch_fetchA

Batch fetch PubMed records in chunks supporting long PMID lists (>200) or NCBI Entrez History.

Supports two retrieval modes:

  1. Direct PMID batching: Accepts an arbitrary list of PMIDs, chunking them into batch_size (max 200).

  2. Entrez History batching: Accepts webenv and query_key from a prior pubmed_search(..., use_history=True), iterating retstart up to total_records in chunks of batch_size.

Args: pmids: Optional list of PMIDs (arbitrary length; chunked into batch_size). webenv: Optional NCBI WebEnv token from a prior pubmed_search(..., use_history=True). query_key: Optional NCBI QueryKey token from a prior pubmed_search. retstart: Starting offset for pagination (default 0). total_records: Total records to retrieve in Entrez History mode (if omitted, queries history count). batch_size: Number of records per chunk (1-200, default 200).

Returns: Comprehensive batch execution report, per-batch results, per-record statuses ('status': 'success'), not_found PMIDs, and audit provenance.

ParametersJSON Schema
NameRequiredDescriptionDefault
pmidsNo
webenvNo
retstartNo
query_keyNo
batch_sizeNo
total_recordsNo

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses chunking into batch_size, the 1-200 cap, retstart pagination up to total_records, the fallback of querying the history count when total_records is omitted, and the per-record status/not_found reporting. It omits auth/API-key requirements and NCBI rate-limit behavior, which matter for large batches.

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 one-line summary followed by organized mode, Args, and Returns sections; all content is relevant. Minor redundancy where the chunking/max-200 rule is stated in both the intro and the batch_size entry.

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 two-mode, six-parameter tool with no annotations and no output schema, the description covers modes, prerequisites, parameter meanings, and return shape, which is close to sufficient. Missing only operational caveats such as token expiry, rate limits, and error behavior.

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 description coverage is 0%, so the description must compensate, and it does: every one of the six parameters is explained with meaning, defaults, and ranges (batch_size 1-200 default 200, retstart default 0, total_records fallback, webenv/query_key provenance). This is meaningfully richer than the bare schema.

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?

States a specific verb+resource (batch fetch PubMed records) plus the differentiating scope: long PMID lists (>200) and Entrez History retrieval. An agent can distinguish it from pubmed_fetch/pubmed_get, which have no such batching framing.

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?

Gives clear mode-selection conditions: direct PMID batching when you have an arbitrary PMID list, versus Entrez History mode when webenv/query_key come from a prior pubmed_search(..., use_history=True). It stops short of explicitly stating when to prefer this over pubmed_fetch for small lists, so no true exclusion rule.

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

pubmed_database_infoA

Get metadata, last update date, record count, and search field tags for an NCBI database (default: 'pubmed').

Provides audit-grade database metadata and field definitions directly from NCBI EInfo.

ParametersJSON Schema
NameRequiredDescriptionDefault
dbNopubmed

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the data comes 'directly from NCBI EInfo' and is 'audit-grade,' which is useful provenance context, but it does not describe read-only safety, rate limits, or error behavior.

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?

Two sentences, front-loaded with the return contents and followed by provenance. No filler, though slightly terse for a tool whose main value is a list of returned fields.

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

Completeness3/5

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

For a single-parameter, no-output-schema tool, the description covers what fields are returned and the parameter default, which is adequate. However, with no annotations and no output schema, it could say more about the read-only, non-destructive nature and the expected response shape.

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 description coverage is 0%, so the description must compensate for the single 'db' parameter. It explicitly identifies the parameter as an 'NCBI database' and states the default is 'pubmed', covering the only parameter's meaning.

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 states a specific verb ('Get') and resource ('metadata, last update date, record count, and search field tags for an NCBI database'), making its purpose clear and distinct from search/fetch siblings. It doesn't explicitly contrast itself against those siblings, which keeps it from a 5.

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 implies this is an informational/metadata tool by listing what it returns, but it gives no explicit when-to-use guidance, prerequisites, or conditions for choosing it over siblings like pubmed_search or pubmed_fetch. Usage is only implied.

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

pubmed_fetchA

Fetch exact PubMed records (NCBI efetch) with per-record status and provenance.

Every field comes strictly from the NCBI response; missing fields are flagged and never inferred. Returns records with 'status': 'success' and unretrieved items with 'status': 'not_found'.

ParametersJSON Schema
NameRequiredDescriptionDefault
pmidsYes

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it discloses provenance guarantees ('every field comes strictly from the NCBI response'), no-inference policy for missing fields, and the concrete status values 'success' and 'not_found'. It omits auth requirements and rate-limit behavior, so it falls short of a 5.

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?

Three short sentences, front-loaded with the core action and method, with the return-status detail following. No filler, though the two return-value sentences could be compressed into one.

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?

With no output schema, the description appropriately explains the return contract (per-record status and provenance). For a single-parameter fetch tool this is nearly sufficient; the main gap is the absence of any routing guidance relative to the many similar sibling tools.

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

Parameters3/5

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

There is one parameter (pmids) at 0% schema description coverage, so the description must compensate. It implies exact-identifier lookup via 'exact PubMed records', which loosely conveys that pmids are precise identifiers, but it never states the format (bare PMID strings vs. prefixed), nor whether order is preserved or how many IDs are accepted.

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 (fetch), resource (PubMed records), and method (NCBI efetch), and the word 'exact' signals the precise-lookup nature of the tool. However, it does not distinguish itself from siblings like pubmed_get or pubmed_batch_fetch, leaving the agent to infer the boundary.

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?

There is no explicit when-to-use or when-not-to-use guidance, and none of the closely related siblings (pubmed_get, pubmed_batch_fetch, fetch_abstracts) are named as alternatives. The intended usage (retrieve records by exact PMIDs) is only implied by the phrase 'exact PubMed records'.

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

pubmed_getA

Retrieve a single PubMed record by PMID in normalized mode or raw verbatim XML.

Args: pmid: PubMed identifier (1-9 digits). mode: 'normalized' (default) returns deterministic schema with structured missingness indicators; 'raw' returns verbatim XML with SHA-256 integrity hash for auditing.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNonormalized
pmidYes

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose meaningful mode behavior – normalized returns a deterministic schema with structured missingness indicators, raw returns verbatim XML with a SHA-256 integrity hash – which is real added context. But it is silent on error/not-found behavior, auth or rate limits, and whether normalized output is lossy, leaving significant disclosure gaps for a no-annotation tool.

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 lead sentence is front-loaded and states purpose and payload in one breath, and the Args list is compact with no redundant prose. Slightly heavier than necessary but every line carries information.

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?

With no output schema, the description takes on return-value explanation and does so at a useful level (normalized schema vs raw XML + hash). Combined with the documented parameters, an agent has enough to call it correctly; only edge-case/error handling is unaddressed.

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 description coverage is 0%, so the description must compensate, and it does: it documents both parameters, gives the PMID format constraint (1-9 digits), and supplies the enum-like mode values 'normalized'/'raw' plus their semantics, which the schema itself lacks. Only minor gaps remain (e.g., what 'deterministic schema' concretely contains).

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 – 'Retrieve a single PubMed record by PMID' – and the singular scope contrasts implicitly with pubmed_batch_fetch. However, it never explicitly differentiates itself from close siblings like pubmed_fetch or search_pubmed, so an agent must infer which retrieval tool to pick.

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?

Usage is only implied: retrieve when you already hold a PMID. There is no explicit when-to-use, when-not-to-use, or named alternative among the many retrieval/search siblings, and no stated prerequisite that the caller must already have resolved an identifier.

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

search_pubmedB

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNorelevance
queryYes
date_toNo
date_fromNo
max_resultsNo

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.

search_with_accessB

Run a PubMed search, then report for every hit whether a legal open-access PDF exists or the paper looks paywalled.

max_results is capped at 100 here. Returns query_translation and total_matches (as search_pubmed) plus counts and four lists: open_access_pdf, open_access_landing_page_only, no_open_access_found, unchecked.

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNorelevance
queryYes
date_toNo
date_fromNo
max_resultsNo

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does useful work: it discloses a real constraint not present in the schema ('max_results is capped at 100 here') and describes the result categorization into four lists, which tells the agent how to interpret the response. It still omits error behavior, whether access lookups are rate-limited or slow, and any explicit read-only statement.

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-loads the core purpose in one sentence, then gives the cap and return shape efficiently. No filler, though the cap sentence sits between purpose and returns rather than at the end.

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

Completeness3/5

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

Because there is no output schema, describing the returned fields and the four categorization lists is necessary and is provided. However, with 5 parameters at 0% schema coverage and no annotations, the missing semantics for sort/date_from/date_to leave an agent guessing about filtering behavior.

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

Parameters2/5

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

Schema description coverage is 0% for five parameters, and the description only adds meaning for max_results (the 100 cap). The sort, date_from, and date_to parameters are entirely undocumented in both schema and description, so the description fails to compensate for the coverage gap.

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 ('Run a PubMed search') plus the distinguishing value-add ('report for every hit whether a legal open-access PDF exists or the paper looks paywalled'). This differentiates it from plain search siblings, though it never names pubmed_search or search_pubmed as the alternative to pick when access status is not needed.

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?

Usage context is only implied: the user picks this tool when they want OA status alongside search results, and the description mentions search_pubmed as the source of the shared return fields. There is no explicit when-to-use/when-not guidance relative to siblings like search_pubmed or check_access, so the agent must infer the routing.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 10 tool updatesv0.2.0
    • First observedcheck_access
    • First observeddownload_pdfs
    • First observedfetch_abstracts
    • First observedpubmed_batch_fetch
    • First observedpubmed_database_info
    • First observedpubmed_fetch
    • First observedpubmed_get
    • First observedpubmed_search
    • First observedsearch_pubmed
    • First observedsearch_with_access

TDQS

B3.4/5.0

Scored across 10 tools

Disambiguation2/5

pubmed_search and search_pubmed are functionally near-identical (both run NCBI esearch and return PMIDs/query translation), and pubmed_fetch, fetch_abstracts, and pubmed_batch_fetch all wrap efetch with only minor output differences. check_access vs search_with_access also overlap, leaving several boundaries unclear despite good descriptions.

Naming Consistency2/5

Names mix a pubmed_ prefix (pubmed_search, pubmed_fetch, pubmed_get, pubmed_batch_fetch, pubmed_database_info) with bare verb_noun forms (fetch_abstracts, check_access, download_pdfs) and an unconventional reversed form (search_pubmed). The search pair differing only by word order is especially confusing.

Tool Count4/5

Ten tools is a reasonable scope for a PubMed retrieval server, but several tools are redundant variants of the same underlying operation rather than distinct capabilities. The count itself is fine; the duplication is the issue.

Completeness4/5

The surface covers the core retrieval lifecycle well: search, single/multi/batch fetch, normalized or raw output, access classification, and PDF download. Minor gaps exist (no citation/related-article or export formats like RIS/BibTeX), which agents can work around.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables searching and retrieving scientific articles from PubMed using NCBI E-utilities API with features like rate limiting and caching.
    3
    10 npm
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables searching PubMed's biomedical literature database and retrieving article metadata, abstracts, and full content through the E-utilities API. Supports advanced queries, batch operations, and multiple output formats with automatic rate limiting.
    2
    -