Search and Fetch
eutils_search_then_fetchSearch an Entrez database and download matching records in one call, skipping a separate fetch step.
Instructions
Search a database and download the matching records in one call.
This is the shortcut for the common "find me the papers about X" request. It runs ESearch with a History handle, then EFetch, saving a round trip. Use the individual tools when you want to screen titles before downloading.
Args:
db (string): database to search, for example "pubmed".
term (string): Entrez query.
retmax (number, optional): records to download. Default 20, max 500.
rettype (string, optional): "abstract" (pubmed default), "fasta" (sequence default), ...
retmode ('text' | 'xml', optional): default "text".
response_format ('markdown' | 'json'): output format. Default 'markdown'.
Returns: { database, term, total, retrieved, rettype, retmode, history, text }
Examples:
Use when: "summarize recent papers on CRISPR delivery" -> db="pubmed", term="CRISPR delivery AND 2024[pdat]"
Use when: "get the sequences for these gene records" -> db="nuccore", term="..."
Don't use when: you want to inspect titles first (use eutils_esearch then eutils_esummary)
Don't use when: the result set is huge; search with retmax=0 first to see the count
Error Handling:
Returns a friendly empty result, with spelling advice, when nothing matches
Refuses retmax above 500
Reports the ESearch count so you can judge whether to page
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"db": "<db>",
"term": "<term>"
},
"name": "eutils_search_then_fetch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| db | Yes | Entrez database to search, for example "pubmed". | |
| term | Yes | Entrez query, for example "CRISPR AND 2024[pdat]". | |
| retmax | No | Records to download (default 20, max 500). | |
| retmode | No | Response encoding. Default "text". | |
| rettype | No | Record format. Defaults to "abstract" for pubmed, "fasta" for sequences. | |
| response_format | No | Output format: 'markdown' for human-readable text, or 'json' for machine-readable data. Default: 'markdown'. | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | Yes | ||
| text | Yes | ||
| total | Yes | ||
| history | Yes | ||
| retmode | No | ||
| rettype | No | ||
| database | Yes | ||
| retrieved | Yes |