一键导入
pm-search
// Search PubMed for biomedical literature by keywords. Returns structured results with PMID, title, authors, journal, date, DOI. Use when the user wants to find papers on a topic.
// Search PubMed for biomedical literature by keywords. Returns structured results with PMID, title, authors, journal, date, DOI. Use when the user wants to find papers on a topic.
Perform advanced PubMed search with field qualifiers - author, title, journal, MeSH, date range, article type. Constructs proper PubMed query syntax from natural language. Use for precise filtered searches.
Export PubMed paper(s) to Zotero or save as RIS file. Supports single paper by PMID or batch export from search results. Use when user wants to save papers to their reference manager.
Find full-text download links for a PubMed paper by PMID - DOI, PMC open access, Sci-Hub, and publisher links. Use when user wants to read or download a paper's full text.
Navigate PubMed search result pages or change sort order. Use when user wants to see more results or change ordering.
Get full paper details for a PubMed article by PMID - title, authors with affiliations, abstract, MeSH terms, keywords, publication types, DOI, and citation info. Use when user needs detailed information about a specific paper.
| name | pm-search |
| description | Search PubMed for biomedical literature by keywords. Returns structured results with PMID, title, authors, journal, date, DOI. Use when the user wants to find papers on a topic. |
| argument-hint | [search keywords] |
Search PubMed for papers using keyword(s). Returns result count and structured result list via NCBI E-utilities API.
$ARGUMENTS contains the search keyword(s) in English or Chinese.
Use mcp__chrome-devtools__navigate_page:
https://pubmed.ncbi.nlm.nih.gov/?term={URL_ENCODED_KEYWORDS}&size=20Replace YOUR_KEYWORDS with the actual search terms from $ARGUMENTS:
async () => {
const query = "YOUR_KEYWORDS";
const page = 1, size = 20;
const retstart = (page - 1) * size;
// E-utilities esearch: get PMID list
const searchResp = await fetch(
`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=${encodeURIComponent(query)}&retmax=${size}&retstart=${retstart}&retmode=json&sort=relevance`
);
const searchData = await searchResp.json();
const ids = searchData.esearchresult?.idlist || [];
const total = parseInt(searchData.esearchresult?.count || '0');
const queryTranslation = searchData.esearchresult?.querytranslation || '';
if (ids.length === 0) return { query, total: 0, results: [] };
// E-utilities esummary: batch get metadata
const sumResp = await fetch(
`https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=${ids.join(',')}&retmode=json`
);
const sumData = await sumResp.json();
const results = ids.map((id, i) => {
const r = sumData.result?.[id] || {};
const doi = (r.articleids || []).find(a => a.idtype === 'doi')?.value || '';
return {
n: retstart + i + 1,
pmid: id,
title: r.title || '',
authors: (r.authors || []).map(a => a.name).join(', '),
journal: r.fulljournalname || '',
source: r.source || '',
pubdate: r.pubdate || '',
volume: r.volume || '',
issue: r.issue || '',
pages: r.pages || '',
doi,
pubtype: (r.pubtype || []).join(', ')
};
});
return { query, queryTranslation, total, page, size, results };
}
Present results as a numbered list:
Searched PubMed for "$ARGUMENTS": found {total} results (page {page}, showing {size} per page).
1. {title}
PMID: {pmid} | DOI: {doi}
Authors: {authors}
Journal: {journal} ({pubdate}) | Vol {volume}({issue}):{pages}
2. ...
When the user wants to:
pm-paper-detail with the PMIDpm-navigate-pages to go to next pagepm-fulltext with the PMIDpm-export with the PMID(s)The sort parameter in esearch accepts:
relevance (default, best match)date (most recent first)pub_date (publication date)first_author (alphabetical by first author)journal (alphabetical by journal)To change sort, modify the sort= parameter in the esearch URL.
retstart: 0-indexed offset (page 1 = 0, page 2 = 20, page 3 = 40, ...)retmax: results per page (default 20, max 10000)navigate_page + evaluate_script