# `pubmed__pubmed_fetch_articles`

**Pubmed Fetch Articles**

Fetch full article metadata by PubMed IDs. Returns detailed article information including abstract, authors, journal, MeSH terms. Set \`maxResponseCharacters\` to bound the whole response: articles past the ceiling are deferred whole and listed in \`deferred.ids\` for a follow-up call.

- Server: [PubMed](https://gateway.mcpharbor.dev/docs/servers/pubmed) (`dev.mcpharbor.gateway/pubmed`)
- Price per call: $0.0001 (100 micro-USD); only tools/call is charged
- Endpoint: `https://gateway.mcpharbor.dev/mcp` or `https://gateway.mcpharbor.dev/mcp/pubmed`
- Upstream tool: exposed by the provider; called through this gateway as `pubmed__pubmed_fetch_articles`
- Provider terms: <https://www.ncbi.nlm.nih.gov/books/NBK25497/> (verified 2026-09-19)
- Upstream API documentation: <https://www.ncbi.nlm.nih.gov/books/NBK25497/>
- Rate limit: 150 requests per minute
- Attribution required: NCBI's Disclaimer and Copyright notice must be evident to users of your product

## Parameters

- `includeGrants` (boolean, optional): Include grant information Default: `false`.
- `includeMesh` (boolean, optional): Include MeSH terms Default: `true`.
- `maxResponseCharacters` (integer, optional): Opt-in ceiling for the whole response, in characters. Each article is measured as the JSON record it is returned as — title, abstract, authors, journal, MeSH terms, grants, identifiers, every field...
- `pmids` (array, required): PubMed IDs to fetch

## Example call

Request headers and body:

```http
POST /mcp HTTP/1.1
Host: gateway.mcpharbor.dev
Authorization: Bearer <your gateway API key>
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: pubmed__pubmed_fetch_articles
```

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "_meta": {
      "io.modelcontextprotocol/clientCapabilities": {},
      "io.modelcontextprotocol/clientInfo": {
        "name": "example-agent",
        "version": "1.0.0"
      },
      "io.modelcontextprotocol/protocolVersion": "2026-07-28"
    },
    "arguments": {
      "pmids": []
    },
    "name": "pubmed__pubmed_fetch_articles"
  }
}
```

A successful response:

```json
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "_meta": {
      "dev.mcpharbor.gateway/call": {
        "chargedMicroUsd": 100,
        "id": "<the id of this charge>"
      }
    },
    "content": [
      {
        "text": "<whatever the upstream tool returned>",
        "type": "text"
      }
    ],
    "resultType": "complete"
  }
}
```

This call costs $0.0001 (100 micro-USD). Reading this page and listing the tool cost nothing.
The `dev.mcpharbor.gateway/call` record in the result is the receipt for that charge. Each
POST is metered separately, so sending the same call again buys another one: see
[agent.txt](https://gateway.mcpharbor.dev/agent.txt), section 7, before retrying.

## Attribution

This provider requires the attribution below wherever you use results from its tools.
Reproduce it verbatim:

> NCBI's Disclaimer and Copyright notice must be evident to users of your product

## Tool definition

Exactly as `tools/list` returns it (free):

```json
{
  "_meta": {
    "dev.mcpharbor.gateway/pricing": {
      "currency": "USD",
      "pricePerCallMicroUsd": 100
    }
  },
  "annotations": {
    "openWorldHint": true,
    "readOnlyHint": true
  },
  "description": "Fetch full article metadata by PubMed IDs. Returns detailed article information including abstract, authors, journal, MeSH terms. Set `maxResponseCharacters` to bound the whole response: articles past the ceiling are deferred whole and listed in `deferred.ids` for a follow-up call.",
  "inputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "properties": {
      "includeGrants": {
        "default": false,
        "description": "Include grant information",
        "type": "boolean"
      },
      "includeMesh": {
        "default": true,
        "description": "Include MeSH terms",
        "type": "boolean"
      },
      "maxResponseCharacters": {
        "description": "Opt-in ceiling for the whole response, in characters. Each article is measured as the JSON record it is returned as — title, abstract, authors, journal, MeSH terms, grants, identifiers, every field it carries. Articles are kept in response order until the next one would cross the ceiling; that article and the rest are deferred whole (never partially populated) and listed in `deferred.ids`. Response envelope fields — counts, `unavailablePmids`, `deferred` itself — are not counted. Omit to return every resolved article.",
        "maximum": 1000000,
        "minimum": 1,
        "type": "integer"
      },
      "pmids": {
        "description": "PubMed IDs to fetch",
        "items": {
          "pattern": "^\\d+$",
          "type": "string"
        },
        "maxItems": 200,
        "minItems": 1,
        "type": "array"
      }
    },
    "required": [
      "pmids"
    ],
    "type": "object"
  },
  "name": "pubmed__pubmed_fetch_articles",
  "outputSchema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "additionalProperties": false,
    "anyOf": [
      {
        "not": {
          "required": [
            "error"
          ]
        },
        "required": [
          "articles",
          "totalReturned"
        ]
      },
      {
        "required": [
          "error"
        ]
      }
    ],
    "properties": {
      "articles": {
        "description": "Parsed articles",
        "items": {
          "additionalProperties": false,
          "description": "Parsed PubMed article",
          "properties": {
            "abstractText": {
              "description": "Abstract text",
              "type": "string"
            },
            "affiliations": {
              "description": "Deduplicated author affiliations",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "articleDates": {
              "description": "Article dates",
              "items": {
                "additionalProperties": false,
                "description": "Dated article event",
                "properties": {
                  "dateType": {
                    "description": "Date type",
                    "type": "string"
                  },
                  "day": {
                    "description": "Day",
                    "type": "string"
                  },
                  "month": {
                    "description": "Month",
                    "type": "string"
                  },
                  "year": {
                    "description": "Year",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "authors": {
              "description": "Author list. On a `book-chapter` these are the chapter's own authors, never the book's editors, which are in `book.editors`. Empty on a Bookshelf record that credits neither.",
              "items": {
                "additionalProperties": false,
                "description": "Author record",
                "properties": {
                  "affiliationIndices": {
                    "description": "Indices into the top-level affiliations array",
                    "items": {
                      "type": "number"
                    },
                    "type": "array"
                  },
                  "collectiveName": {
                    "description": "Group/collective author name",
                    "type": "string"
                  },
                  "firstName": {
                    "description": "First/given name",
                    "type": "string"
                  },
                  "initials": {
                    "description": "Author initials",
                    "type": "string"
                  },
                  "lastName": {
                    "description": "Last name",
                    "type": "string"
                  },
                  "orcid": {
                    "description": "ORCID identifier",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "book": {
              "additionalProperties": false,
              "description": "The containing book of a `book-chapter`, or the book itself on a `book` record. Present only on those two record types, and never a stand-in for `journalInfo`.",
              "properties": {
                "accession": {
                  "description": "NCBI Bookshelf accession from `ArticleIdList` (`bookaccession`), e.g. \"NBK1247\". The record is readable at `https://www.ncbi.nlm.nih.gov/books/<accession>/`.",
                  "type": "string"
                },
                "beginningDate": {
                  "description": "First year of a continuously-updated book, from `Book/BeginningDate` (GeneReviews runs from 1993). Absent on a book published once.",
                  "type": "string"
                },
                "collectionTitle": {
                  "description": "Series the book belongs to, from `Book/CollectionTitle` (e.g. \"ADA Clinical Compendia Series\"). Absent for a book outside a series.",
                  "type": "string"
                },
                "doi": {
                  "description": "The book's own DOI, from `Book/ELocationID` with `EIdType=\"doi\"`. Distinct from the record-level `doi`, which is the chapter's: a chapter does not inherit this one.",
                  "type": "string"
                },
                "edition": {
                  "description": "Edition statement from `Book/Edition`. Rare on Bookshelf titles — absent unless NCBI supplies one.",
                  "type": "string"
                },
                "editors": {
                  "description": "Editors of the containing book, from `Book/AuthorList` marked `Type=\"editors\"`. Kept out of `authors`, which carries the chapter's own writers. Absent when the book credits no editors.",
                  "items": {
                    "additionalProperties": false,
                    "description": "One editor of the containing book. Name parts only — editors are a citation credit, not a contributor record, so no affiliations or ORCID are reported for them.",
                    "properties": {
                      "collectiveName": {
                        "description": "Group or committee credited as editor, when the entry names an organization rather than a person. Mutually exclusive with the name-part fields.",
                        "type": "string"
                      },
                      "firstName": {
                        "description": "Editor given name as NCBI supplies it (`ForeName`, often \"Margaret P\"). Absent when NCBI carries initials only, or on a group editor.",
                        "type": "string"
                      },
                      "initials": {
                        "description": "Editor initials with no separators (e.g. \"MP\"). Absent when NCBI supplies none, or on a group editor.",
                        "type": "string"
                      },
                      "lastName": {
                        "description": "Editor surname, from the book's `Book/AuthorList Type=\"editors\"` entry. Absent on a group editor, which carries `collectiveName` instead.",
                        "type": "string"
                      }
                    },
                    "type": "object"
                  },
                  "type": "array"
                },
                "endingDate": {
                  "description": "Last year of a closed date range, from `Book/EndingDate`. Absent while a book is still being updated, which leaves the range open-ended.",
                  "type": "string"
                },
                "isbns": {
                  "description": "Every `Book/Isbn` on the record. A book commonly carries a print and an electronic ISBN, so this is a list. Absent for a Bookshelf title with no ISBN, which is most of them.",
                  "items": {
                    "description": "One ISBN, verbatim as NCBI reports it — leading zeros intact",
                    "type": "string"
                  },
                  "type": "array"
                },
                "medium": {
                  "description": "Medium the book is published in, from `Book/Medium` — \"Internet\" wherever NCBI supplies it. Absent when NCBI supplies none; it is never defaulted.",
                  "type": "string"
                },
                "pubDate": {
                  "description": "Publication year from `Book/PubDate`. Year only — NCBI's month and day are not reported, since no citation style uses them for a book.",
                  "type": "string"
                },
                "publisher": {
                  "description": "Publisher of the book, from `Book/Publisher/PublisherName`.",
                  "type": "string"
                },
                "publisherLocation": {
                  "description": "Place of publication, from `Book/Publisher/PublisherLocation` (e.g. \"Seattle (WA)\"). Absent when NCBI supplies no place.",
                  "type": "string"
                },
                "title": {
                  "description": "Title of the containing book, from `Book/BookTitle` (e.g. \"GeneReviews®\"). On a `book` record this is the same value as the record's own `title`.",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "doi": {
              "description": "DOI, cased as NCBI reports it (usually the publisher's mixed case). DOIs are case-insensitive by spec and no case normalization is applied here, so the same DOI can arrive in a different case from `pubmed_europepmc_search` and `pubmed_europepmc_fetch` (NCBI `10.1056/NEJMoa2212948`, Europe PMC `10.1056/nejmoa2212948`) — a byte-for-byte comparison across the two reports a false mismatch.",
              "type": "string"
            },
            "grantList": {
              "description": "Grant information",
              "items": {
                "additionalProperties": false,
                "description": "Grant record",
                "properties": {
                  "acronym": {
                    "description": "Grant acronym",
                    "type": "string"
                  },
                  "agency": {
                    "description": "Funding agency",
                    "type": "string"
                  },
                  "country": {
                    "description": "Agency country",
                    "type": "string"
                  },
                  "grantId": {
                    "description": "Grant identifier",
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "journalInfo": {
              "additionalProperties": false,
              "description": "Journal information. Present on `journal-article` records only — absent on `book-chapter` and `book` records, because a Bookshelf record has no journal and its book title is never reported as one; read `book` for those. (#114)",
              "properties": {
                "eIssn": {
                  "description": "Electronic ISSN",
                  "type": "string"
                },
                "elocationId": {
                  "description": "Electronic article locator from NCBI `ELocationID` — the publisher-assigned article number (e.g. \"2400512\"). Journals that assign article numbers instead of pages often omit pagination entirely, leaving this the only locator. Never a substitute for `pages`, and never the DOI: a DOI-typed `ELocationID` is reported in `doi` instead. Absent when the only locator NCBI supplies is marked invalid.",
                  "type": "string"
                },
                "elocationIdType": {
                  "description": "Type of `elocationId`, from NCBI's `EIdType` attribute — \"pii\" in practice. Free-form: NCBI does not close the set, so treat an unfamiliar value as opaque.",
                  "type": "string"
                },
                "isoAbbreviation": {
                  "description": "ISO journal abbreviation",
                  "type": "string"
                },
                "issn": {
                  "description": "Print ISSN",
                  "type": "string"
                },
                "issue": {
                  "description": "Issue number",
                  "type": "string"
                },
                "pages": {
                  "description": "Page range (e.g. \"48-55\")",
                  "type": "string"
                },
                "publicationDate": {
                  "additionalProperties": false,
                  "description": "Journal publication date",
                  "properties": {
                    "day": {
                      "description": "Publication day",
                      "type": "string"
                    },
                    "medlineDate": {
                      "description": "Non-standard date string (e.g. \"2000 Spring\")",
                      "type": "string"
                    },
                    "month": {
                      "description": "Publication month",
                      "type": "string"
                    },
                    "year": {
                      "description": "Publication year",
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "title": {
                  "description": "Full journal title",
                  "type": "string"
                },
                "volume": {
                  "description": "Volume number",
                  "type": "string"
                }
              },
              "type": "object"
            },
            "keywords": {
              "description": "Keywords",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "meshTerms": {
              "description": "MeSH terms",
              "items": {
                "additionalProperties": false,
                "description": "MeSH descriptor term",
                "properties": {
                  "descriptorName": {
                    "description": "MeSH descriptor name",
                    "type": "string"
                  },
                  "descriptorUi": {
                    "description": "MeSH descriptor unique ID",
                    "type": "string"
                  },
                  "isMajorTopic": {
                    "description": "Whether this is a major topic of the article",
                    "type": "boolean"
                  },
                  "qualifiers": {
                    "description": "MeSH qualifiers/subheadings",
                    "items": {
                      "additionalProperties": false,
                      "description": "MeSH qualifier/subheading",
                      "properties": {
                        "isMajorTopic": {
                          "description": "Whether this qualifier is a major topic",
                          "type": "boolean"
                        },
                        "qualifierName": {
                          "description": "Qualifier/subheading name",
                          "type": "string"
                        },
                        "qualifierUi": {
                          "description": "Qualifier unique ID",
                          "type": "string"
                        }
                      },
                      "required": [
                        "qualifierName",
                        "isMajorTopic"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "isMajorTopic"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "pmcId": {
              "description": "PMC ID",
              "type": "string"
            },
            "pmcUrl": {
              "description": "PMC full text URL",
              "type": "string"
            },
            "pmid": {
              "description": "PubMed ID",
              "type": "string"
            },
            "publicationTypes": {
              "description": "Publication types",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "pubmedUrl": {
              "description": "PubMed article URL",
              "type": "string"
            },
            "recordType": {
              "description": "Which kind of PubMed record this is, set from the XML element it arrived in: `journal-article` for an ordinary article, `book-chapter` for an NCBI Bookshelf chapter, `book` for a whole Bookshelf book. Read this to tell the three apart — `publicationTypes` cannot, because PubMed labels a Bookshelf record \"Review\" or \"Study Guide\". `journalInfo` is present only on `journal-article`; `book` only on the other two.",
              "enum": [
                "journal-article",
                "book-chapter",
                "book"
              ],
              "type": "string"
            },
            "title": {
              "description": "Article title — the chapter title on a `book-chapter`, and the book title on a `book` record, where it repeats `book.title`.",
              "type": "string"
            }
          },
          "required": [
            "recordType"
          ],
          "type": "object"
        },
        "type": "array"
      },
      "deferred": {
        "additionalProperties": false,
        "description": "Continuation state for articles the whole-response budget withheld. Present only when `maxResponseCharacters` deferred at least one article.",
        "properties": {
          "deferredCount": {
            "description": "Articles that resolved but were withheld to stay under the ceiling",
            "type": "number"
          },
          "ids": {
            "description": "PMIDs of the deferred articles, in response order. Re-call `pubmed_fetch_articles` with these as `pmids` and the same other inputs to retrieve them. Never contains a PMID from `unavailablePmids`.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "maxResponseCharacters": {
            "description": "The `maxResponseCharacters` ceiling this response was budgeted against",
            "type": "number"
          },
          "nextDeferredCharacters": {
            "description": "Serialized size of the next deferred article — the first entry in `ids`, where the response stopped. Raise `maxResponseCharacters` to at least this to make progress; a smaller article further down `ids` cannot be reached until this one fits.",
            "type": "number"
          },
          "returnedCharacters": {
            "description": "Serialized characters the returned article records account for",
            "type": "number"
          }
        },
        "required": [
          "maxResponseCharacters",
          "returnedCharacters",
          "deferredCount",
          "ids",
          "nextDeferredCharacters"
        ],
        "type": "object"
      },
      "error": {
        "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). `invalid_efetch_response`: NCBI EFetch returned a payload missing the PubmedArticleSet wrapper. 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",
                  "invalid_efetch_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"
      },
      "notice": {
        "description": "Optional guidance when no articles were returned — points to discovery tools — or when `maxResponseCharacters` deferred articles, naming how to retrieve them. Absent on successful unbudgeted fetches.",
        "type": "string"
      },
      "totalReturned": {
        "description": "Number of articles in this response. Under a `maxResponseCharacters` budget this counts the kept articles only; `deferred.deferredCount` covers the rest.",
        "type": "number"
      },
      "truncated": {
        "description": "True when `maxResponseCharacters` withheld at least one resolved article. Absent when the response carries every article that resolved. The continuation state is in `deferred`.",
        "type": "boolean"
      },
      "unavailablePmids": {
        "description": "PMIDs PubMed returned no record for. That is all this reports: PubMed omits an unknown PMID silently, with no error and no reason, so the absence says nothing about whether the PMID exists. Reported in full regardless of where a `maxResponseCharacters` cutoff lands — these are misses, not deferrals. Use `pubmed_search_articles` to find PMIDs that do resolve.",
        "items": {
          "type": "string"
        },
        "type": "array"
      }
    },
    "type": "object"
  },
  "title": "Pubmed Fetch Articles"
}
```
