data
Xata CLI for AI Agents
Use the Xata CLI from KosmoKrator to call Xata tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Xata CLI Setup
Xata can be configured headlessly with `kosmokrator integrations:configure xata`.
# 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 xata --enable --read allow --write ask --json
kosmokrator integrations:doctor xata --json
kosmokrator integrations:status --json Credentials
Authentication type: API key api_key. 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 xata.xata_list_databases '{}' --json kosmo integrations:xata xata_list_databases '{}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs xata --json
kosmo integrations:docs xata.xata_list_databases --json
kosmo integrations:schema xata.xata_list_databases --json
kosmo integrations:search "Xata" --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.
xata.xata_list_databases
List databases in a Xata workspace.
read - Parameters
- none
kosmo integrations:call xata.xata_list_databases '{}' --json kosmo integrations:xata xata_list_databases '{}' --json xata.xata_create_database
Create a Xata database in a workspace.
write - Parameters
- none
kosmo integrations:call xata.xata_create_database '{}' --json kosmo integrations:xata xata_create_database '{}' --json xata.xata_list_branches
List branches for a Xata database.
read - Parameters
- none
kosmo integrations:call xata.xata_list_branches '{}' --json kosmo integrations:xata xata_list_branches '{}' --json xata.xata_create_branch
Create a branch for a Xata database.
write - Parameters
- none
kosmo integrations:call xata.xata_create_branch '{}' --json kosmo integrations:xata xata_create_branch '{}' --json xata.xata_get_schema
Read schema for a database branch.
read - Parameters
- none
kosmo integrations:call xata.xata_get_schema '{}' --json kosmo integrations:xata xata_get_schema '{}' --json xata.xata_update_schema
Update schema for a database branch.
write - Parameters
- none
kosmo integrations:call xata.xata_update_schema '{}' --json kosmo integrations:xata xata_update_schema '{}' --json xata.xata_query_table
Query records from a table.
read - Parameters
- none
kosmo integrations:call xata.xata_query_table '{}' --json kosmo integrations:xata xata_query_table '{}' --json xata.xata_search_branch
Search records across a branch.
read - Parameters
- none
kosmo integrations:call xata.xata_search_branch '{}' --json kosmo integrations:xata xata_search_branch '{}' --json xata.xata_get_record
Get one record by table and id.
read - Parameters
- none
kosmo integrations:call xata.xata_get_record '{}' --json kosmo integrations:xata xata_get_record '{}' --json xata.xata_insert_record
Insert a record into a table.
write - Parameters
- none
kosmo integrations:call xata.xata_insert_record '{}' --json kosmo integrations:xata xata_insert_record '{}' --json xata.xata_update_record
Patch a record by table and id.
write - Parameters
- none
kosmo integrations:call xata.xata_update_record '{}' --json kosmo integrations:xata xata_update_record '{}' --json xata.xata_delete_record
Delete a record by table and id.
write - Parameters
- none
kosmo integrations:call xata.xata_delete_record '{}' --json kosmo integrations:xata xata_delete_record '{}' --json xata.xata_aggregate_table
Run table aggregation queries.
read - Parameters
- none
kosmo integrations:call xata.xata_aggregate_table '{}' --json kosmo integrations:xata xata_aggregate_table '{}' --json xata.xata_vector_search
Run vector similarity search for a table.
read - Parameters
- none
kosmo integrations:call xata.xata_vector_search '{}' --json kosmo integrations:xata xata_vector_search '{}' --json xata.xata_transaction
Execute a branch transaction.
write - Parameters
- none
kosmo integrations:call xata.xata_transaction '{}' --json kosmo integrations:xata xata_transaction '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
xata.xata_list_databases 0 parameters
kosmo integrations:schema xata.xata_list_databases --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_create_database 0 parameters
kosmo integrations:schema xata.xata_create_database --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_list_branches 0 parameters
kosmo integrations:schema xata.xata_list_branches --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_create_branch 0 parameters
kosmo integrations:schema xata.xata_create_branch --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_get_schema 0 parameters
kosmo integrations:schema xata.xata_get_schema --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_update_schema 0 parameters
kosmo integrations:schema xata.xata_update_schema --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_query_table 0 parameters
kosmo integrations:schema xata.xata_query_table --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_search_branch 0 parameters
kosmo integrations:schema xata.xata_search_branch --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_get_record 0 parameters
kosmo integrations:schema xata.xata_get_record --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_insert_record 0 parameters
kosmo integrations:schema xata.xata_insert_record --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_update_record 0 parameters
kosmo integrations:schema xata.xata_update_record --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_delete_record 0 parameters
kosmo integrations:schema xata.xata_delete_record --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_aggregate_table 0 parameters
kosmo integrations:schema xata.xata_aggregate_table --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_vector_search 0 parameters
kosmo integrations:schema xata.xata_vector_search --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
xata.xata_transaction 0 parameters
kosmo integrations:schema xata.xata_transaction --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.