Skip to main content
Glama

pubmed_fetch_contents

Retrieve detailed PubMed article information using PMIDs or search history keys. Supports pagination and multiple detail levels like abstract_plus, full_xml, and MEDLINE format. Returns results in JSON.

Instructions

Fetches detailed information from PubMed using NCBI EFetch. Can be used with a direct list of PMIDs or with queryKey/webEnv from an ESearch history entry. Supports pagination (retstart, retmax) when using history. Available 'detailLevel' options: 'abstract_plus' (parsed details), 'full_xml' (raw PubMedArticle XML), 'medline_text' (MEDLINE format), or 'citation_data' (minimal citation data). Returns a JSON object containing results, any PMIDs not found (if applicable), and EFetch details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
detailLevelNoSpecifies the level of detail for the fetched content. Options: 'abstract_plus' (parsed details), 'full_xml' (raw PubMedArticle XML), 'medline_text' (MEDLINE format), 'citation_data' (minimal citation data). Defaults to 'abstract_plus'.abstract_plus
includeGrantInfoNoInclude grant info in 'abstract_plus' results. Default: false.
includeMeshTermsNoInclude MeSH terms in 'abstract_plus' and 'citation_data' results. Default: true.
outputFormatNoOutput format. 'json' (default) wraps data in a JSON object. 'raw_text' returns raw text for 'medline_text' or 'full_xml' detail levels.json
pmidsNoAn array of PubMed Unique Identifiers (PMIDs) to fetch. Use this OR queryKey/webEnv.
queryKeyNoQuery key from ESearch history. Requires webEnv. Use this OR pmids.
retmaxNoMaximum number of records to retrieve. Used with queryKey/webEnv.
retstartNo0-based index of the first record to retrieve. Used with queryKey/webEnv.
webEnvNoWeb environment from ESearch history. Requires queryKey. Use this OR pmids.

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/pubmed-mcp-server'

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