data
PubMed CLI for AI Agents
Use the PubMed CLI from KosmoKrator to call PubMed tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.PubMed CLI Setup
PubMed can be configured headlessly with `kosmokrator integrations:configure pubmed`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure pubmed --enable --read allow --write ask --json
kosmokrator integrations:doctor pubmed --json
kosmokrator integrations:status --json Credentials
Authentication type: No credentials none. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
No credentials are required.
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call pubmed.pubmed_search '{}' --json kosmo integrations:pubmed pubmed_search '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs pubmed --json
kosmo integrations:docs pubmed.pubmed_search --json
kosmo integrations:schema pubmed.pubmed_search --json
kosmo integrations:search "PubMed" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
pubmed.pubmed_search
Search PubMed or another Entrez database with ESearch.
read - Parameters
- none
kosmo integrations:call pubmed.pubmed_search '{}' --json kosmo integrations:pubmed pubmed_search '{}' --json pubmed.pubmed_summary
Retrieve document summaries with ESummary.
read - Parameters
- none
kosmo integrations:call pubmed.pubmed_summary '{}' --json kosmo integrations:pubmed pubmed_summary '{}' --json pubmed.pubmed_fetch
Fetch full records or abstracts with EFetch.
read - Parameters
- none
kosmo integrations:call pubmed.pubmed_fetch '{}' --json kosmo integrations:pubmed pubmed_fetch '{}' --json pubmed.pubmed_link
Retrieve related records and LinkOut URLs with ELink.
read - Parameters
- none
kosmo integrations:call pubmed.pubmed_link '{}' --json kosmo integrations:pubmed pubmed_link '{}' --json pubmed.pubmed_info
Inspect Entrez database fields and link names with EInfo.
read - Parameters
- none
kosmo integrations:call pubmed.pubmed_info '{}' --json kosmo integrations:pubmed pubmed_info '{}' --json pubmed.pubmed_post
Post IDs to the NCBI History server with EPost.
write - Parameters
- none
kosmo integrations:call pubmed.pubmed_post '{}' --json kosmo integrations:pubmed pubmed_post '{}' --json pubmed.pubmed_spell
Get spelling suggestions with ESpell.
read - Parameters
- none
kosmo integrations:call pubmed.pubmed_spell '{}' --json kosmo integrations:pubmed pubmed_spell '{}' --json pubmed.pubmed_global_query
Search all Entrez databases and return hit counts with EGQuery.
read - Parameters
- none
kosmo integrations:call pubmed.pubmed_global_query '{}' --json kosmo integrations:pubmed pubmed_global_query '{}' --json pubmed.pubmed_citation_match
Match formatted citation strings to PubMed IDs with ECitMatch.
read - Parameters
- none
kosmo integrations:call pubmed.pubmed_citation_match '{}' --json kosmo integrations:pubmed pubmed_citation_match '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
pubmed.pubmed_search 0 parameters
kosmo integrations:schema pubmed.pubmed_search --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pubmed.pubmed_summary 0 parameters
kosmo integrations:schema pubmed.pubmed_summary --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pubmed.pubmed_fetch 0 parameters
kosmo integrations:schema pubmed.pubmed_fetch --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pubmed.pubmed_link 0 parameters
kosmo integrations:schema pubmed.pubmed_link --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pubmed.pubmed_info 0 parameters
kosmo integrations:schema pubmed.pubmed_info --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pubmed.pubmed_post 0 parameters
kosmo integrations:schema pubmed.pubmed_post --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pubmed.pubmed_spell 0 parameters
kosmo integrations:schema pubmed.pubmed_spell --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pubmed.pubmed_global_query 0 parameters
kosmo integrations:schema pubmed.pubmed_global_query --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
pubmed.pubmed_citation_match 0 parameters
kosmo integrations:schema pubmed.pubmed_citation_match --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.