Skip to main content
Glama
cyanheads

pubmed-mcp-server

by cyanheads

Pubmed Find Related

pubmed_find_related
Read-only

Find articles related to a PubMed article by PMID: similar content, articles citing it, or its references, with fallback sources for reliable retrieval.

Instructions

Find articles related to a source article — similar content (similar), articles citing this one (cited_by), or articles this one cites (references). Uses NCBI ELink as the primary source; falls back to Europe PMC then OpenAlex when NCBI is unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pmidYesSource PubMed ID
offsetNoResult offset for pagination (0-based); page through results by incrementing by maxResults
maxResultsNoMaximum related articles
relationshipNoRelationship type: similar (content-based), cited_by (articles citing this one), references (articles this one cites)similar

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when results are empty, a fallback provider answered, offset overshot, a fallback provider could not be reached, or upstream rows were excluded for carrying no PubMed PMID. Absent on a clean NCBI result page.
offsetNoResult offset used
sourceNoProvider that answered this request
articlesNoRelated articles
sourcePmidNoSource PubMed ID
totalCountNoTotal related articles found before windowing. A Europe PMC or OpenAlex total may shrink to the PubMed-addressable count once a request window covers the whole upstream set, since rows without a PubMed PMID cannot be returned.
relationshipNoRelationship type used
coverageFailuresNoReference-coverage fallbacks that failed instead of answering, so the reference set is unverified rather than confirmed absent. Absent when every provider consulted answered.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv2.10.12
    • changedOutput schema / properties / articles / items / properties / authors / description
      Previous value: -"Author string"New value: +"Author string — the first three of the record's own authors, then \"et al.\". On an NCBI Bookshelf chapter these are the chapter's authors; the book's editors are in `editors`."
    • addedOutput schema / properties / articles / items / properties / bookTitle
      Added value: +{
      +  "description": "Title of the book an NCBI Bookshelf record belongs to. Present instead of `source` on a book record; absent on a journal article.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / articles / items / properties / docType
      Added value: +{
      +  "description": "What PubMed classifies this record as: \"chapter\" or \"book\" for an NCBI Bookshelf record, \"citation\" for an ordinary journal article. Absent when PubMed supplies none.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / articles / items / properties / editors
      Added value: +{
      +  "description": "Editors of the containing book, kept out of `authors` so they cannot displace the record's own authors. Absent on a journal article and on a book that credits no editors.",
      +  "items": {
      +    "description": "One editor, \"Surname Initials\" as ESummary renders it",
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / articles / items / properties / publisherName
      Added value: +{
      +  "description": "Publisher of the book an NCBI Bookshelf record belongs to. Present only on a book record; absent on a journal article.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / articles / items / properties / source / description
      Previous value: -"Journal source"New value: +"Journal the article appeared in. Absent on an NCBI Bookshelf record, which has no journal — its venue is in `bookTitle` and `publisherName` instead, and `docType` says which kind of record it is."
    • addedOutput schema / properties / coverageFailures
      Added value: +{
      +  "description": "Reference-coverage fallbacks that failed instead of answering, so the reference set is unverified rather than confirmed absent. Absent when every provider consulted answered.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "One coverage provider that could not be checked",
      +    "properties": {
      +      "provider": {
      +        "description": "Reference-coverage provider that failed",
      +        "enum": [
      +          "europepmc",
      +          "openalex"
      +        ],
      +        "type": "string"
      +      },
      +      "reason": {
      +        "description": "Declared failure reason, e.g. europepmc_unreachable or provider_disabled",
      +        "type": "string"
      +      },
      +      "retryable": {
      +        "description": "Whether a retry can reach this provider",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "provider",
      +      "reason",
      +      "retryable"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when results are empty, a fallback provider answered, offset overshot, or Europe PMC rows were excluded for carrying no PubMed PMID. Absent on a clean NCBI result page."New value: +"Guidance when results are empty, a fallback provider answered, offset overshot, a fallback provider could not be reached, or upstream rows were excluded for carrying no PubMed PMID. Absent on a clean NCBI result page."
    • changedOutput schema / properties / totalCount / description
      Previous value: -"Total related articles found before windowing. A Europe PMC total may shrink to the PubMed-addressable count once a request window covers the whole upstream set, since rows without a PubMed PMID cannot be returned."New value: +"Total related articles found before windowing. A Europe PMC or OpenAlex total may shrink to the PubMed-addressable count once a request window covers the whole upstream set, since rows without a PubMed PMID cannot be returned."
  2. Changed4 schema fields changedv2.10.8
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `queue_full`: Local NCBI request queue is at capacity. `ncbi_unreachable`: NCBI E-utilities is unreachable after all retry attempts. `ncbi_deadline_exceeded`: Total request deadline expired before NCBI returned a response. `ncbi_invalid_response`: NCBI returned a body that could not be parsed (invalid XML/JSON). `ncbi_resource_not_found`: NCBI returned a structured \"not found\" error for the requested ID(s). `europepmc_unreachable`: Europe PMC was unreachable after all retry attempts. `europepmc_invalid_response`: Europe PMC returned a body that could not be parsed (invalid JSON or XML). `europepmc_invalid_input`: Europe PMC rejected the request input (empty query, unknown sort field, malformed parameter). `openalex_unreachable`: OpenAlex was unreachable after all retry attempts. `openalex_invalid_response`: OpenAlex returned a body that could not be parsed (invalid JSON). Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `queue_full`: Local NCBI request queue is at capacity. `ncbi_unreachable`: NCBI E-utilities is unreachable after all retry attempts. `ncbi_deadline_exceeded`: Total request deadline expired before NCBI returned a response. `ncbi_invalid_response`: NCBI returned a body that could not be parsed (invalid XML/JSON). `ncbi_resource_not_found`: NCBI returned a structured \"not found\" error for the requested ID(s). `europepmc_unreachable`: Europe PMC was unreachable after all retry attempts. `europepmc_invalid_response`: Europe PMC returned a body that could not be parsed (invalid JSON or XML). `europepmc_invalid_input`: Europe PMC rejected the request input (empty query, unknown sort field, malformed parameter). `openalex_unreachable`: OpenAlex was unreachable after all retry attempts. `openalex_invalid_response`: OpenAlex returned a body that could not be parsed (invalid JSON). `all_providers_failed`: Every provider eligible for the requested relationship failed; none answered. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "queue_full",
      -  "ncbi_unreachable",
      -  "ncbi_deadline_exceeded",
      -  "ncbi_invalid_response",
      -  "ncbi_resource_not_found",
      -  "europepmc_unreachable",
      -  "europepmc_invalid_response",
      -  "europepmc_invalid_input",
      -  "openalex_unreachable",
      -  "openalex_invalid_response"
      -]New value: +[
      +  "queue_full",
      +  "ncbi_unreachable",
      +  "ncbi_deadline_exceeded",
      +  "ncbi_invalid_response",
      +  "ncbi_resource_not_found",
      +  "europepmc_unreachable",
      +  "europepmc_invalid_response",
      +  "europepmc_invalid_input",
      +  "openalex_unreachable",
      +  "openalex_invalid_response",
      +  "all_providers_failed"
      +]
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when results are empty, a fallback provider answered, or offset overshot. Absent on a clean NCBI result page."New value: +"Guidance when results are empty, a fallback provider answered, offset overshot, or Europe PMC rows were excluded for carrying no PubMed PMID. Absent on a clean NCBI result page."
    • changedOutput schema / properties / totalCount / description
      Previous value: -"Total related articles found before windowing"New value: +"Total related articles found before windowing. A Europe PMC total may shrink to the PubMed-addressable count once a request window covers the whole upstream set, since rows without a PubMed PMID cannot be returned."
  3. Changed6 schema fields changedv2.10.4
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "sourcePmid",
      +      "relationship",
      +      "offset",
      +      "articles",
      +      "totalCount",
      +      "source"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `queue_full`: Local NCBI request queue is at capacity. `ncbi_unreachable`: NCBI E-utilities is unreachable after all retry attempts. `ncbi_deadline_exceeded`: Total request deadline expired before NCBI returned a response. `ncbi_invalid_response`: NCBI returned a body that could not be parsed (invalid XML/JSON). `ncbi_resource_not_found`: NCBI returned a structured \"not found\" error for the requested ID(s). `europepmc_unreachable`: Europe PMC was unreachable after all retry attempts. `europepmc_invalid_response`: Europe PMC returned a body that could not be parsed (invalid JSON or XML). `europepmc_invalid_input`: Europe PMC rejected the request input (empty query, unknown sort field, malformed parameter). `openalex_unreachable`: OpenAlex was unreachable after all retry attempts. `openalex_invalid_response`: OpenAlex returned a body that could not be parsed (invalid JSON). Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "queue_full",
      +            "ncbi_unreachable",
      +            "ncbi_deadline_exceeded",
      +            "ncbi_invalid_response",
      +            "ncbi_resource_not_found",
      +            "europepmc_unreachable",
      +            "europepmc_invalid_response",
      +            "europepmc_invalid_input",
      +            "openalex_unreachable",
      +            "openalex_invalid_response"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "sourcePmid",
      -  "relationship",
      -  "offset",
      -  "articles",
      -  "totalCount",
      -  "source"
      -]
  4. Changed3 schema fields changedv2.9.4
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "Total related articles found before windowing",
      +  "type": "number"
      +}
    • removedOutput schema / properties / totalFound
      Removed value: -{
      -  "description": "Total related articles found before windowing",
      -  "type": "number"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "sourcePmid",
      -  "relationship",
      -  "offset",
      -  "articles",
      -  "totalFound",
      -  "source"
      -]New value: +[
      +  "sourcePmid",
      +  "relationship",
      +  "offset",
      +  "articles",
      +  "totalCount",
      +  "source"
      +]
  5. Changed6 schema fields changedv2.9.1
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Result offset for pagination (0-based); page through results by incrementing by maxResults",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Optional guidance when results are empty — e.g. invalid source PMID, or references requested for a non-PMC source. Absent on successful result pages."New value: +"Guidance when results are empty, a fallback provider answered, or offset overshot. Absent on a clean NCBI result page."
    • addedOutput schema / properties / offset
      Added value: +{
      +  "description": "Result offset used",
      +  "type": "number"
      +}
    • addedOutput schema / properties / source
      Added value: +{
      +  "description": "Provider that answered this request",
      +  "enum": [
      +    "ncbi",
      +    "europepmc",
      +    "openalex"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / totalFound / description
      Previous value: -"Total related articles found before truncation"New value: +"Total related articles found before windowing"
    • changedOutput schema / required
      Previous value: -[
      -  "sourcePmid",
      -  "relationship",
      -  "articles",
      -  "totalFound"
      -]New value: +[
      +  "sourcePmid",
      +  "relationship",
      +  "offset",
      +  "articles",
      +  "totalFound",
      +  "source"
      +]
  6. Addedv2.7.6
  7. Removedv2.7.4
  8. Addedv2.3.2

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, and the description adds genuinely new behavioral context: the data-source fallback chain (NCBI ELink primary, then Europe PMC, then OpenAlex). It does not mention rate limits or result-shape caveats, but the fallback disclosure is real added value.

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?

Two sentences, zero filler, with the purpose front-loaded and the relationship taxonomy immediately following. Every clause 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?

An output schema exists, so return-value explanation is not needed, and the description covers purpose, relationship modes, and source fallback. It omits explicit guidance on routing between this tool and sibling search/fetch tools, which keeps it just below a 5.

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?

Schema description coverage is 100%, so pmid, offset, maxResults, and relationship are already documented in the schema. The description echoes the relationship semantics and the source-article concept but adds no syntax or format detail beyond the schema — baseline 3.

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+resource ('Find articles related to a source article') and enumerates the three relationship modes, so an agent immediately understands the tool's function. It does not explicitly contrast itself with siblings such as pubmed_fetch_articles or pubmed_lookup_citation, so it stops short of 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 usage by listing the three relationship modes, which tells an agent what it can ask for, but it gives no 'when to use this vs. alternatives' guidance and no exclusions. Usage is inferable rather than stated.

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