Skill: NCBI E-utilities Assistant
Use When
- A user wants to query NCBI Entrez databases such as
pubmed,gene,protein,nuccore,assembly, orsnpthrough the official E-utilities API. - A user needs deterministic command-line access to
einfo,esearch,esummary,efetch,elink, orepost. - A user wants a higher-level PubMed workflow that searches, summarizes, and optionally fetches abstracts/full records in one command.
- A user wants a PubMed literature-review workflow that extracts titles, abstracts, authors, MeSH terms, keywords, and article IDs into structured JSON/JSONL.
- A user wants a time-bounded PubMed research update brief, such as "show me the last 7 days of CRISPR progress" or "summarize the last month of base editing papers."
- A user wants to retrieve records in batches, page through results, or use the Entrez History server (
WebEnv+query_key) instead of issuing one request per ID. - A user wants the exact request URL, method, and parameters before making the network call.
Inputs
- Required:
- target endpoint:
info,search,summary,fetch,link, orpost - target database, such as
pubmed,gene,protein,nuccore, or another Entrez database - one of:
- search term for
search - ID list or ID file for
summary,fetch,link, andpost WebEnv+query_keyfor history-basedsummary,fetch, andlink
- search term for
- target endpoint:
- Optional:
- for the high-level PubMed flow:
- search term
- output directory
- whether to run
efetch efetchretmode/rettype, defaulting to PubMed abstract-oriented retrieval
- for the PubMed review flow:
- search term
- output directory
- optional date and sort filters
- optional explicit
records.json/records.jsonloutput paths
- for the PubMed update brief flow:
- topic term, such as
CRISPR,base editing, orprime editing - relative date window such as 7 or 30 days, or explicit date range
- maximum number of papers to include
- output directory and optional markdown brief path
- topic term, such as
email,tool, andapi_keyretmode,rettype,retmax,retstart,sort, and date filters- output path
--dry-runto print the exact request plan without making the network call
- for the high-level PubMed flow:
Workflow
- Read eutilities-reference.md when endpoint semantics or limits are uncertain.
- Translate the request into one of the deterministic wrapper commands:
scripts/run.sh infoscripts/run.sh searchscripts/run.sh summaryscripts/run.sh fetchscripts/run.sh linkscripts/run.sh postscripts/run.sh pubmed-workflowscripts/run.sh pubmed-reviewscripts/run.sh pubmed-update-brief
- Include
--emailwhenever available. Keep--toolset unless the user has a strong reason to override it. Include--api-keywhen higher request throughput is needed. - Prefer
search --usehistory yfor large result sets, then continue withsummaryorfetchusing--webenvand--query-key. - For PubMed-first tasks, prefer
pubmed-workflowover hand-building three separate commands unless the user explicitly wants raw endpoint-level control. - For literature-review preparation, prefer
pubmed-review; it performs PubMed retrieval and extracts structured records fromefetchXML. - For recurring "latest progress" requests, prefer
pubmed-update-brief; it writes a deterministicbrief.mddraft plus the raw retrieval artifacts. - Use
--dry-runbefore live calls when the user wants to inspect or approve the request shape. - For long ID lists or
--id-file, let the script auto-selectPOST. - Report the exact command, endpoint, database, key parameters, and where the response was written.
Output Contract
- Exact command(s) run
- Endpoint name and target database(s)
- Key request parameters:
- search term, IDs, or history parameters
retmode/rettype- paging controls such as
retmaxandretstart
- Response destination:
- inline output summary, or
- saved file path
- For
pubmed-workflow:esearch.jsonesummary.jsonwhen hits are returnedefetch.*when--include-fetch yesmanifest.jsondescribing counts, IDs,WebEnv,query_key, and output paths
- For
pubmed-review:esearch.jsonesummary.jsonefetch.xmlrecords.jsonrecords.jsonlmanifest.json
- For
pubmed-update-brief:esearch.jsonesummary.jsonefetch.xmlrecords.jsonrecords.jsonlbrief.mdmanifest.json
- For history workflows:
- whether the response contains
WebEnv/query_key - the recommended next command
- whether the response contains
- When
--dry-runis used:- request method
- request URL
- request body when applicable
Limits
- This skill depends on live access to
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/. - NCBI recommends no more than 3 requests per second without an API key, and up to 10 requests per second by default with an API key.
EFetchoutput formats vary by database;retmodeandrettypemust match what the target database supports.- JSON output is not uniformly available for every endpoint/database combination, so XML or text may still be required.
- Common failure cases:
- missing or wrong
db - providing IDs when the workflow should use
WebEnv+query_key, or vice versa - omitting
email/toolin repeated or high-volume use - exceeding NCBI rate limits
- assuming
retmode=jsonis available for every request - trying to retrieve large result sets one ID at a time instead of using history
- missing or wrong
Scan to join WeChat group