fetch_pubmed_content
Retrieve detailed PubMed content by PMIDs, queryKey/webEnv, or pagination. Supports abstract_plus, full_xml, medline_text, or citation_data detail levels. Returns JSON or raw text for analysis or citation purposes.
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 title, abstract, authors, journal, keywords, DOI, optional MeSH/grant info), 'full_xml' (JSON representation of the PubMedArticle XML structure), 'medline_text' (MEDLINE format), or 'citation_data' (minimal data for citations). Returns a JSON object containing results, any PMIDs not found (if applicable), and EFetch details.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
detailLevel | No | Specifies the level of detail for the fetched content. Options: 'abstract_plus' (parsed details including abstract, authors, journal, DOI, etc.), 'full_xml' (raw PubMedArticle XML), 'medline_text' (MEDLINE format), 'citation_data' (minimal parsed data for citations). Defaults to 'abstract_plus'. | abstract_plus |
includeGrantInfo | No | Applies to 'abstract_plus' if parsed from XML. | |
includeMeshTerms | No | Applies to 'abstract_plus' and 'citation_data' if parsed from XML. | |
outputFormat | No | Specifies the final output format of the tool. - 'json' (default): Wraps the data in a standard JSON object. - 'raw_text': Returns raw text for 'medline_text' or 'full_xml' detailLevels. For other detailLevels, 'outputFormat' defaults to 'json'. | json |
pmids | No | An array of PubMed Unique Identifiers (PMIDs) for which to fetch content. Use this OR queryKey/webEnv. | |
queryKey | No | Query key from ESearch history server. If used, webEnv must also be provided. Use this OR pmids. | |
retmax | No | Maximum number of records to retrieve. Used with queryKey/webEnv. | |
retstart | No | Sequential index of the first record to retrieve (0-based). Used with queryKey/webEnv. | |
webEnv | No | Web environment from ESearch history server. If used, queryKey must also be provided. Use this OR pmids. |