Skip to main content
Glama

PubMed MCP Server

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

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.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "detailLevel": { "default": "abstract_plus", "description": "Specifies 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'.", "enum": [ "abstract_plus", "full_xml", "medline_text", "citation_data" ], "type": "string" }, "includeGrantInfo": { "default": false, "description": "Include grant info in 'abstract_plus' results. Default: false.", "type": "boolean" }, "includeMeshTerms": { "default": true, "description": "Include MeSH terms in 'abstract_plus' and 'citation_data' results. Default: true.", "type": "boolean" }, "outputFormat": { "default": "json", "description": "Output format. 'json' (default) wraps data in a JSON object. 'raw_text' returns raw text for 'medline_text' or 'full_xml' detail levels.", "enum": [ "json", "raw_text" ], "type": "string" }, "pmids": { "description": "An array of PubMed Unique Identifiers (PMIDs) to fetch. Use this OR queryKey/webEnv.", "items": { "pattern": "^\\d+$", "type": "string" }, "maxItems": 200, "type": "array" }, "queryKey": { "description": "Query key from ESearch history. Requires webEnv. Use this OR pmids.", "type": "string" }, "retmax": { "description": "Maximum number of records to retrieve. Used with queryKey/webEnv.", "minimum": 1, "type": "integer" }, "retstart": { "description": "0-based index of the first record to retrieve. Used with queryKey/webEnv.", "minimum": 0, "type": "integer" }, "webEnv": { "description": "Web environment from ESearch history. Requires queryKey. Use this OR pmids.", "type": "string" } }, "type": "object" }

Other Tools from PubMed MCP Server

Related Tools

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