Pubmed Search Articles
pubmed_search_articlesSearch PubMed articles with full query syntax and filters for author, journal, MeSH terms, date range, language, species, and free full text; returns PMIDs plus brief summaries with offset pagination.
Instructions
Search PubMed with full query syntax, filters, and date ranges. Returns PMIDs and optional brief summaries. Supports field-specific filters (author, journal, MeSH terms), common filters (language, species, free full text), and pagination via offset for paging through large result sets.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "pubmed_search_articles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort order: relevance (default), pub_date (publication date, newest first), author (first author A–Z), or journal (journal name A–Z) | relevance |
| query | No | PubMed search query (supports full NCBI syntax), sent as written apart from inline formatting tags such as `<i>`, which are removed. Omit it or pass an empty string to search on the filters alone, which needs `author`, `journal`, `meshTerms`, or `publicationTypes`; `all[sb]` selects the whole database for a slice by the other filters. A query given must carry a search term: a value that is blank once markup, bracketed field tags (`[pdat]`), parentheses, and invisible characters such as a zero-width space are disregarded is rejected rather than sent to PubMed. | |
| author | No | Filter by author name (e.g. "Smith J"). An empty string applies no filter; a value of only whitespace, invisible characters, markup, parentheses, brackets, or double quotes is rejected. | |
| offset | No | Result offset for pagination (0-based). PubMed serves at most the first 9999 records of a result set, so this caps at 9998; narrow the query or add filters to reach anything beyond it. | |
| journal | No | Filter by journal: its NLM title abbreviation (e.g. "N Engl J Med") or ISSN; a full title matches only as NLM records it. An empty string applies no filter; a value of only whitespace, invisible characters, markup, parentheses, brackets, or double quotes is rejected. | |
| species | No | Filter by species: `humans` adds `humans[MeSH Terms]`, `animals` adds `"animals"[mh:noexp]` (animals other than humans; a record indexed for both stays in). Both match only records with MEDLINE species indexing, which preprints and ahead-of-print citations lack. | |
| language | No | Filter by language: its English name or three-letter NLM code (e.g. "english" or "eng"); a two-letter code such as "en" matches nothing. An empty string applies no filter; a value of only whitespace, invisible characters, markup, parentheses, brackets, or double quotes is rejected. | |
| dateRange | No | Filter by date range. The filter is applied only when both `minDate` and `maxDate` are non-empty; either one empty disables the entire date range. A partial date covers its whole year or month, and a range whose `minDate` falls after its `maxDate` is rejected: `2024/06` to `2024` is valid, `2024/07` to `2024/06/30` is not. | |
| meshTerms | No | Filter by MeSH headings, each searched as `"term"[MeSH Terms]`. Multiple terms are AND'd — all must match. A supplementary concept, as many drugs are, is not a heading and matches nothing here: search it in `query` as the `searchTerm` pubmed_lookup_mesh returns, such as `"dapagliflozin"[nm]`. Empty strings are skipped; an element of only whitespace, invisible characters, markup, parentheses, brackets, or double quotes is rejected. | |
| maxResults | No | Maximum results to return, up to 1000 per call; a larger value returns 1000 with a notice naming the next `offset`. 0 returns only `totalCount`. | |
| hasAbstract | No | Only include articles with abstracts | |
| freeFullText | No | Only include free full text articles | |
| summaryCount | No | Fetch brief summaries for the top N results (0 = PMIDs only), up to 50 per call; a larger value fetches 50 with a notice. Pass the PMIDs past the cap to pubmed_fetch_articles. | |
| publicationTypes | No | Filter by publication type (e.g. "Review", "Clinical Trial", "Meta-Analysis"). Multiple values are OR'd — any match qualifies. Empty strings are skipped; an element of only whitespace, invisible characters, markup, parentheses, brackets, or double quotes is rejected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| pmids | No | PubMed IDs | |
| query | No | Original query; empty when the search ran on the filters alone | |
| notice | No | Optional guidance when the result set does not reflect what was asked for — a field tag PubMed ignored, a phrase it matched nothing for (with advice by the clause's field), a dateRange dropped for having one bound, no matches at all, paging past the end, a page that ends at PubMed's 9,999-record window with matches past it that no `offset` reaches, or a `maxResults` or `summaryCount` past its per-call cap, served at the cap. Absent when nothing applies. | |
| offset | No | Result offset used | |
| searchUrl | No | PubMed search URL | |
| summaries | No | Brief summaries (empty array when summaryCount is 0) | |
| totalCount | No | Total matching articles | |
| appliedFilters | No | Filter values applied to the PubMed query, as sent: each text value as written, formatting tags removed, and dates in YYYY/MM/DD form | |
| effectiveQuery | No | The term sent to PubMed: the query as written, with a clause appended for each active filter, or the filter clauses alone, joined by AND, when no query was given. Only inline formatting tags with no attributes (`<i>`, `<b>`, `<em>`, `<strong>`, `<u>` and their closers) are removed; `&`, `<`, and `>` are sent as written. |