KosmoKrator

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, configure, and verify
# 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.

Generic CLI call
kosmo integrations:call pubmed.pubmed_search '{}' --json
Provider shortcut
kosmo integrations:pubmed pubmed_search '{}' --json

Discovery

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

Discovery commands
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 read
Parameters
none
Generic call
kosmo integrations:call pubmed.pubmed_search '{}' --json
Shortcut
kosmo integrations:pubmed pubmed_search '{}' --json

pubmed.pubmed_summary

Retrieve document summaries with ESummary.

Read read
Parameters
none
Generic call
kosmo integrations:call pubmed.pubmed_summary '{}' --json
Shortcut
kosmo integrations:pubmed pubmed_summary '{}' --json

pubmed.pubmed_fetch

Fetch full records or abstracts with EFetch.

Read read
Parameters
none
Generic call
kosmo integrations:call pubmed.pubmed_fetch '{}' --json
Shortcut
kosmo integrations:pubmed pubmed_fetch '{}' --json

pubmed.pubmed_link

Retrieve related records and LinkOut URLs with ELink.

Read read
Parameters
none
Generic call
kosmo integrations:call pubmed.pubmed_link '{}' --json
Shortcut
kosmo integrations:pubmed pubmed_link '{}' --json

pubmed.pubmed_info

Inspect Entrez database fields and link names with EInfo.

Read read
Parameters
none
Generic call
kosmo integrations:call pubmed.pubmed_info '{}' --json
Shortcut
kosmo integrations:pubmed pubmed_info '{}' --json

pubmed.pubmed_post

Post IDs to the NCBI History server with EPost.

Write write
Parameters
none
Generic call
kosmo integrations:call pubmed.pubmed_post '{}' --json
Shortcut
kosmo integrations:pubmed pubmed_post '{}' --json

pubmed.pubmed_spell

Get spelling suggestions with ESpell.

Read read
Parameters
none
Generic call
kosmo integrations:call pubmed.pubmed_spell '{}' --json
Shortcut
kosmo integrations:pubmed pubmed_spell '{}' --json

pubmed.pubmed_global_query

Search all Entrez databases and return hit counts with EGQuery.

Read read
Parameters
none
Generic call
kosmo integrations:call pubmed.pubmed_global_query '{}' --json
Shortcut
kosmo integrations:pubmed pubmed_global_query '{}' --json

pubmed.pubmed_citation_match

Match formatted citation strings to PubMed IDs with ECitMatch.

Read read
Parameters
none
Generic call
kosmo integrations:call pubmed.pubmed_citation_match '{}' --json
Shortcut
kosmo integrations:pubmed pubmed_citation_match '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

pubmed.pubmed_summary 0 parameters
Schema command
kosmo integrations:schema pubmed.pubmed_summary --json
ParameterTypeRequiredDescription
No parameters.
pubmed.pubmed_fetch 0 parameters
Schema command
kosmo integrations:schema pubmed.pubmed_fetch --json
ParameterTypeRequiredDescription
No parameters.
pubmed.pubmed_info 0 parameters
Schema command
kosmo integrations:schema pubmed.pubmed_info --json
ParameterTypeRequiredDescription
No parameters.
pubmed.pubmed_post 0 parameters
Schema command
kosmo integrations:schema pubmed.pubmed_post --json
ParameterTypeRequiredDescription
No parameters.
pubmed.pubmed_spell 0 parameters
Schema command
kosmo integrations:schema pubmed.pubmed_spell --json
ParameterTypeRequiredDescription
No parameters.
pubmed.pubmed_global_query 0 parameters
Schema command
kosmo integrations:schema pubmed.pubmed_global_query --json
ParameterTypeRequiredDescription
No parameters.
pubmed.pubmed_citation_match 0 parameters
Schema command
kosmo integrations:schema pubmed.pubmed_citation_match --json
ParameterTypeRequiredDescription
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.