data
ClinicalTrials.gov CLI for AI Agents
Use the ClinicalTrials.gov CLI from KosmoKrator to call ClinicalTrials.gov tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.ClinicalTrials.gov CLI Setup
ClinicalTrials.gov can be configured headlessly with `kosmokrator integrations:configure clinicaltrials-gov`.
# 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 clinicaltrials-gov --enable --read allow --write ask --json
kosmokrator integrations:doctor clinicaltrials-gov --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 clinicaltrials-gov.clinicaltrials_gov_list_studies '{}' --json kosmo integrations:clinicaltrials-gov clinicaltrials_gov_list_studies '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs clinicaltrials-gov --json
kosmo integrations:docs clinicaltrials-gov.clinicaltrials_gov_list_studies --json
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_list_studies --json
kosmo integrations:search "ClinicalTrials.gov" --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.
clinicaltrials-gov.clinicaltrials_gov_list_studies
Search or list ClinicalTrials.gov studies with API v2 query and filter parameters.
read - Parameters
- none
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_list_studies '{}' --json kosmo integrations:clinicaltrials-gov clinicaltrials_gov_list_studies '{}' --json clinicaltrials-gov.clinicaltrials_gov_fetch_study
Fetch a single study by NCT ID.
read - Parameters
- none
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_fetch_study '{}' --json kosmo integrations:clinicaltrials-gov clinicaltrials_gov_fetch_study '{}' --json clinicaltrials-gov.clinicaltrials_gov_metadata
Retrieve the study data model field tree.
read - Parameters
- none
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_metadata '{}' --json kosmo integrations:clinicaltrials-gov clinicaltrials_gov_metadata '{}' --json clinicaltrials-gov.clinicaltrials_gov_search_areas
Retrieve search documents and search areas.
read - Parameters
- none
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_search_areas '{}' --json kosmo integrations:clinicaltrials-gov clinicaltrials_gov_search_areas '{}' --json clinicaltrials-gov.clinicaltrials_gov_enums
Retrieve enum types and values used in study records.
read - Parameters
- none
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_enums '{}' --json kosmo integrations:clinicaltrials-gov clinicaltrials_gov_enums '{}' --json clinicaltrials-gov.clinicaltrials_gov_size_stats
Retrieve study JSON size statistics.
read - Parameters
- none
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_size_stats '{}' --json kosmo integrations:clinicaltrials-gov clinicaltrials_gov_size_stats '{}' --json clinicaltrials-gov.clinicaltrials_gov_field_values_stats
Retrieve value statistics for study leaf fields.
read - Parameters
- none
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_field_values_stats '{}' --json kosmo integrations:clinicaltrials-gov clinicaltrials_gov_field_values_stats '{}' --json clinicaltrials-gov.clinicaltrials_gov_field_sizes_stats
Retrieve size statistics for list and array fields.
read - Parameters
- none
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_field_sizes_stats '{}' --json kosmo integrations:clinicaltrials-gov clinicaltrials_gov_field_sizes_stats '{}' --json clinicaltrials-gov.clinicaltrials_gov_version
Retrieve API and data version timestamps.
read - Parameters
- none
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_version '{}' --json kosmo integrations:clinicaltrials-gov clinicaltrials_gov_version '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
clinicaltrials-gov.clinicaltrials_gov_list_studies 0 parameters
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_list_studies --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
clinicaltrials-gov.clinicaltrials_gov_fetch_study 0 parameters
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_fetch_study --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
clinicaltrials-gov.clinicaltrials_gov_metadata 0 parameters
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_metadata --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
clinicaltrials-gov.clinicaltrials_gov_search_areas 0 parameters
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_search_areas --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
clinicaltrials-gov.clinicaltrials_gov_enums 0 parameters
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_enums --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
clinicaltrials-gov.clinicaltrials_gov_size_stats 0 parameters
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_size_stats --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
clinicaltrials-gov.clinicaltrials_gov_field_values_stats 0 parameters
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_field_values_stats --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
clinicaltrials-gov.clinicaltrials_gov_field_sizes_stats 0 parameters
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_field_sizes_stats --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
clinicaltrials-gov.clinicaltrials_gov_version 0 parameters
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_version --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.