KosmoKrator

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, 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 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.

Generic CLI call
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_list_studies '{}' --json
Provider shortcut
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.

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

clinicaltrials-gov.clinicaltrials_gov_fetch_study

Fetch a single study by NCT ID.

Read read
Parameters
none
Generic call
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_fetch_study '{}' --json
Shortcut
kosmo integrations:clinicaltrials-gov clinicaltrials_gov_fetch_study '{}' --json

clinicaltrials-gov.clinicaltrials_gov_metadata

Retrieve the study data model field tree.

Read read
Parameters
none
Generic call
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_metadata '{}' --json
Shortcut
kosmo integrations:clinicaltrials-gov clinicaltrials_gov_metadata '{}' --json

clinicaltrials-gov.clinicaltrials_gov_search_areas

Retrieve search documents and search areas.

Read read
Parameters
none
Generic call
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_search_areas '{}' --json
Shortcut
kosmo integrations:clinicaltrials-gov clinicaltrials_gov_search_areas '{}' --json

clinicaltrials-gov.clinicaltrials_gov_enums

Retrieve enum types and values used in study records.

Read read
Parameters
none
Generic call
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_enums '{}' --json
Shortcut
kosmo integrations:clinicaltrials-gov clinicaltrials_gov_enums '{}' --json

clinicaltrials-gov.clinicaltrials_gov_size_stats

Retrieve study JSON size statistics.

Read read
Parameters
none
Generic call
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_size_stats '{}' --json
Shortcut
kosmo integrations:clinicaltrials-gov clinicaltrials_gov_size_stats '{}' --json

clinicaltrials-gov.clinicaltrials_gov_field_values_stats

Retrieve value statistics for study leaf fields.

Read read
Parameters
none
Generic call
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_field_values_stats '{}' --json
Shortcut
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 read
Parameters
none
Generic call
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_field_sizes_stats '{}' --json
Shortcut
kosmo integrations:clinicaltrials-gov clinicaltrials_gov_field_sizes_stats '{}' --json

clinicaltrials-gov.clinicaltrials_gov_version

Retrieve API and data version timestamps.

Read read
Parameters
none
Generic call
kosmo integrations:call clinicaltrials-gov.clinicaltrials_gov_version '{}' --json
Shortcut
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
Schema command
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_list_studies --json
ParameterTypeRequiredDescription
No parameters.
clinicaltrials-gov.clinicaltrials_gov_fetch_study 0 parameters
Schema command
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_fetch_study --json
ParameterTypeRequiredDescription
No parameters.
clinicaltrials-gov.clinicaltrials_gov_metadata 0 parameters
Schema command
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_metadata --json
ParameterTypeRequiredDescription
No parameters.
clinicaltrials-gov.clinicaltrials_gov_search_areas 0 parameters
Schema command
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_search_areas --json
ParameterTypeRequiredDescription
No parameters.
clinicaltrials-gov.clinicaltrials_gov_enums 0 parameters
Schema command
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_enums --json
ParameterTypeRequiredDescription
No parameters.
clinicaltrials-gov.clinicaltrials_gov_size_stats 0 parameters
Schema command
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_size_stats --json
ParameterTypeRequiredDescription
No parameters.
clinicaltrials-gov.clinicaltrials_gov_field_values_stats 0 parameters
Schema command
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_field_values_stats --json
ParameterTypeRequiredDescription
No parameters.
clinicaltrials-gov.clinicaltrials_gov_field_sizes_stats 0 parameters
Schema command
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_field_sizes_stats --json
ParameterTypeRequiredDescription
No parameters.
clinicaltrials-gov.clinicaltrials_gov_version 0 parameters
Schema command
kosmo integrations:schema clinicaltrials-gov.clinicaltrials_gov_version --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.