| name | pubmed-search |
| description | Search PubMed for scientific literature. Use when the user asks to find papers, search literature, look up research, find publications, or asks about recent studies. Triggers on "pubmed", "papers", "literature", "search PubMed", "find research on". |
| allowed-tools | ["bash","web-search","webfetch"] |
| version | 1.0.0 |
PubMed Search
Search NCBI PubMed for scientific literature using NCBI E-utilities API.
When to Use
- User asks to find papers on a topic
- User wants recent publications in a field
- User asks for references or citations
- User wants to know the state of research on a topic
- Trigger phrases: "pubmed", "papers", "literature", "research", "studies"
How to Execute
Step 1: Search for PMIDs
Use the esearch endpoint to find article IDs:
curl -s "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=YOUR_QUERY&retmax=10&retmode=json&sort=relevance"
Replace YOUR_QUERY with the search topic. Use sort=date for most recent.
Step 2: Fetch Article Details
Use efetch to get abstracts and metadata:
curl -s "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=PMID1,PMID2&retmode=xml"
Step 3: Parse and Display Results
Extract from XML/JSON:
- PMID
- Title
- Authors (first author + et al.)
- Journal name + Year
- Abstract (first 300 chars)
- PubMed URL:
https://pubmed.ncbi.nlm.nih.gov/{PMID}/
Output Format
Return results in this structured format:
*PubMed Search: "[query]"*
_Found X results. Top N:_
*1.* [Article Title]
_First Author et al. — Journal (Year)_
PMID: [PMID]
pubmed.ncbi.nlm.nih.gov/[PMID]
*2.* ...
Advanced Search Tips
- Use quotes for exact phrases:
"thyroid nodule"TI-RADS
- Combine with AND/OR:
diabetes AND hypertension
- Filter by date:
diabetes[dp] 2024:2026[pdat]
- Filter by type:
review[pt] AND hypertension[ti]
- Use MeSH terms:
"Hypertension"[Mesh]
Follow-up Suggestions
After showing results, suggest:
- "Want me to summarize any of these papers?"
- "Should I search with different keywords?"
- "Want me to find related papers?"
Privacy Note
- No PII sent — only search terms transmitted to NCBI
- NCBI E-utilities is a free public API
- Rate limit: ~3 requests/second recommended