Data Platform

Tools for managing versioned analytical data stores with DuckDB. Query data, manage schemas, import data, and create Vega dashboards.

/api/tools/data-platform

16 Tools

data_get_schema

Get the schema of a data store. Returns table definitions, columns, relationships, and metadata. Use format='data' for an AI-friendly summary optimized for context windows.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store to get the schema from.
format
string
Output format: 'full' returns complete schema details, 'data' returns a condensed format optimized for AI context. Defaults to 'data'.
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store to get the schema from." }, "format": { "type": "string", "enum": [ "full", "data" ], "description": "Output format: 'full' returns complete schema details, 'data' returns a condensed format optimized for AI context. Defaults to 'data'." } }, "required": [ "store_id" ] }

data_query

[DEPRECATED - Use execute_shell with databases parameter instead] Execute a read-only SQL query against a data store. For better performance and full DuckDB features, sync the database to sandbox using execute_shell with databases:[{store_id}] and query with native DuckDB.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store to query.
sql *
string
The SQL query to execute. Must be a SELECT statement (no INSERT, UPDATE, DELETE, DROP, etc.).
limit
number
Maximum number of rows to return. Defaults to 100, maximum 10000.
version_id
string
Optional version or snapshot ID to query from. If provided, queries against that specific version without modifying the current state. Useful for migrations to read old data format.
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store to query." }, "sql": { "type": "string", "description": "The SQL query to execute. Must be a SELECT statement (no INSERT, UPDATE, DELETE, DROP, etc.)." }, "limit": { "type": "number", "description": "Maximum number of rows to return. Defaults to 100, maximum 10000.", "minimum": 1, "maximum": 10000 }, "version_id": { "type": "string", "description": "Optional version or snapshot ID to query from. If provided, queries against that specific version without modifying the current state. Useful for migrations to read old data format." } }, "required": [ "store_id", "sql" ] }

data_list_tables

List all tables in a data store with their metadata including column count and row count.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store to list tables from.
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store to list tables from." } }, "required": [ "store_id" ] }

data_list_dashboards

List all dashboards for a data store. Returns dashboard names, status, and panel/query counts.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store to list dashboards from.
status
string
Filter by dashboard status. Defaults to 'active'.
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store to list dashboards from." }, "status": { "type": "string", "enum": [ "active", "archived" ], "description": "Filter by dashboard status. Defaults to 'active'." } }, "required": [ "store_id" ] }

data_list_dashboard_versions

List versions of a dashboard. Shows version history and named snapshots.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store.
dashboard_id *
string
The ID of the dashboard.
snapshots_only
boolean
Only show named snapshots, not auto-versions. Default: false.
limit
number
Maximum number of versions to return. Default: 20.
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store." }, "dashboard_id": { "type": "string", "description": "The ID of the dashboard." }, "snapshots_only": { "type": "boolean", "description": "Only show named snapshots, not auto-versions. Default: false." }, "limit": { "type": "number", "description": "Maximum number of versions to return. Default: 20." } }, "required": [ "store_id", "dashboard_id" ] }

data_create_database

Create a new DuckDB database for storing analytical data. Databases support versioning, snapshots, and multi-table atomic operations.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

name *
string
Name for the database. Use lowercase with underscores (e.g., 'customer_analytics').
summary
string
Description of what data this database will contain and its purpose.
View full schema
{ "type": "object", "properties": { "name": { "type": "string", "description": "Name for the database. Use lowercase with underscores (e.g., 'customer_analytics')." }, "summary": { "type": "string", "description": "Description of what data this database will contain and its purpose." } }, "required": [ "name" ] }

data_create_tables

Create one or more tables in a data store atomically. Pass an array of table definitions - all tables are created in a single transaction.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store to create the tables in.
tables *
array
Array of table definitions to create.
message *
string
Commit message describing the schema change.
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store to create the tables in." }, "tables": { "type": "array", "description": "Array of table definitions to create.", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "The table name. Use snake_case (e.g., 'customer_orders')." }, "description": { "type": "string", "description": "A description of what this table contains." }, "columns": { "type": "array", "description": "Array of column definitions.", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Column name in snake_case." }, "type": { "type": "string", "enum": [ "STRING", "INTEGER", "BIGINT", "FLOAT", "DOUBLE", "DECIMAL", "BOOLEAN", "DATE", "TIMESTAMP", "JSON" ], "description": "The data type for this column." }, "description": { "type": "string", "description": "Description of what this column contains." }, "nullable": { "type": "boolean", "description": "Whether NULL values are allowed. Defaults to true." }, "primary_key": { "type": "boolean", "description": "Whether this column is the primary key." }, "unique": { "type": "boolean", "description": "Whether values must be unique." }, "default": { "type": "string", "description": "Default value expression." }, "semantic_type": { "type": "string", "enum": [ "email", "phone", "url", "currency", "percentage", "person_name", "address", "country", "date_iso", "identifier" ], "description": "Semantic type hint for AI understanding." } }, "required": [ "name", "type" ] } }, "foreign_keys": { "type": "array", "description": "Foreign key constraints.", "items": { "type": "object", "properties": { "column": { "type": "string", "description": "Column in this table." }, "references_table": { "type": "string", "description": "Referenced table name." }, "references_column": { "type": "string", "description": "Referenced column name." }, "on_delete": { "type": "string", "enum": [ "CASCADE", "SET NULL", "NO ACTION" ], "description": "Action on delete. Defaults to NO ACTION." } }, "required": [ "column", "references_table", "references_column" ] } } }, "required": [ "name", "columns" ] } }, "message": { "type": "string", "description": "Commit message describing the schema change." } }, "required": [ "store_id", "tables", "message" ] }

data_alter_table

Modify an existing table schema. Add, drop, or modify columns. Creates a version snapshot before changes.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store containing the table.
table_name *
string
The name of the table to alter.
add_columns
array
Columns to add to the table.
drop_columns
array
Names of columns to remove.
rename_columns
array
Columns to rename.
modify_columns
array
Column modifications (type changes, nullability, etc.).
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store containing the table." }, "table_name": { "type": "string", "description": "The name of the table to alter." }, "add_columns": { "type": "array", "description": "Columns to add to the table.", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "STRING", "INTEGER", "DECIMAL", "BOOLEAN", "DATE", "TIMESTAMP", "JSON", "BLOB" ] }, "description": { "type": "string" }, "nullable": { "type": "boolean" }, "default": { "type": "string" }, "semanticType": { "type": "string", "enum": [ "email", "phone", "url", "currency", "percentage", "date", "datetime", "address", "name", "id", "count", "amount" ] } }, "required": [ "name", "type" ] } }, "drop_columns": { "type": "array", "description": "Names of columns to remove.", "items": { "type": "string" } }, "rename_columns": { "type": "array", "description": "Columns to rename.", "items": { "type": "object", "properties": { "from": { "type": "string", "description": "Current column name." }, "to": { "type": "string", "description": "New column name." } }, "required": [ "from", "to" ] } }, "modify_columns": { "type": "array", "description": "Column modifications (type changes, nullability, etc.).", "items": { "type": "object", "properties": { "name": { "type": "string" }, "type": { "type": "string", "enum": [ "STRING", "INTEGER", "DECIMAL", "BOOLEAN", "DATE", "TIMESTAMP", "JSON", "BLOB" ] }, "nullable": { "type": "boolean" }, "default": { "type": "string" } }, "required": [ "name" ] } } }, "required": [ "store_id", "table_name" ] }

data_import

Import data into one or more tables atomically. Supports inline data or external files (GCS, HTTPS). Creates a version snapshot before import for rollback.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store to import into.
mode
string
Import mode: 'append' adds to existing data, 'replace' clears table first. Defaults to 'append'.
message
string
A message describing this import for the version history.
tables *
object
Map of table names to import configurations.
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store to import into." }, "mode": { "type": "string", "enum": [ "append", "replace" ], "description": "Import mode: 'append' adds to existing data, 'replace' clears table first. Defaults to 'append'." }, "message": { "type": "string", "description": "A message describing this import for the version history." }, "tables": { "type": "object", "description": "Map of table names to import configurations.", "additionalProperties": { "type": "object", "properties": { "source": { "type": "string", "enum": [ "inline", "gcs", "url", "artifact" ], "description": "Data source type. 'inline': data in 'data' field. 'gcs': Google Cloud Storage (gs://bucket/path). 'url': HTTPS URL. 'artifact': file from sandbox output (out/filename.csv). Use 'artifact' for files written to /home/daytona/out/ in execute_shell." }, "uri": { "type": "string", "description": "URI for external data. For 'gcs': gs://bucket/path. For 'url': https://... For 'artifact': relative path like 'out/data.csv' (files from sandbox /home/daytona/out/)." }, "format": { "type": "string", "enum": [ "csv", "json", "parquet" ], "description": "Format of the source file. Auto-detected from extension if not specified. Only needed for 'gcs' or 'url' sources." }, "data": { "type": "array", "description": "Inline data as array of row objects. Required when source is 'inline'. Read files with Python, transform as needed, then pass the data array here.", "items": { "type": "object" } } }, "required": [ "source" ] } } }, "required": [ "store_id", "tables" ] }

data_preview_dashboard

Preview a dashboard without saving it. Renders the dashboard to a PNG image. Use this to iterate on dashboard design before creating.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store containing the data to visualize.
query *
string
SQL query that returns all data for the dashboard. Use JOINs/CTEs to combine data from multiple tables.
queryLimit
number
Maximum rows to return from the query (default: 10000).
queryParameters
object
Default values for SQL {{param}} placeholders.
spec *
object
Complete Vega-Lite specification. Use vconcat/hconcat for multiple panels. Data is injected at runtime.
scale
number
Scale factor for higher resolution (default: 1, use 2 for retina).
backgroundColor
string
Background color for the image (default: '#ffffff').
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store containing the data to visualize." }, "query": { "type": "string", "description": "SQL query that returns all data for the dashboard. Use JOINs/CTEs to combine data from multiple tables." }, "queryLimit": { "type": "number", "description": "Maximum rows to return from the query (default: 10000)." }, "queryParameters": { "type": "object", "description": "Default values for SQL {{param}} placeholders.", "additionalProperties": { "type": "string" } }, "spec": { "type": "object", "description": "Complete Vega-Lite specification. Use vconcat/hconcat for multiple panels. Data is injected at runtime." }, "scale": { "type": "number", "description": "Scale factor for higher resolution (default: 1, use 2 for retina)." }, "backgroundColor": { "type": "string", "description": "Background color for the image (default: '#ffffff')." } }, "required": [ "store_id", "query", "spec" ] }

data_create_dashboard

Create a new Vega-Lite dashboard linked to a data store. Use data_preview_dashboard first to iterate on the design before saving.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store containing the data to visualize.
name *
string
Dashboard name (unique within the store).
summary
string
Description of the dashboard's purpose.
query *
string
SQL query that returns all data for the dashboard. Use JOINs/CTEs to combine data from multiple tables.
queryLimit
number
Maximum rows to return from the query (default: 10000).
queryParameters
object
Default values for SQL {{param}} placeholders.
spec *
object
Complete Vega-Lite specification. Use vconcat/hconcat for multiple panels. Data is injected at runtime.
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store containing the data to visualize." }, "name": { "type": "string", "description": "Dashboard name (unique within the store)." }, "summary": { "type": "string", "description": "Description of the dashboard's purpose." }, "query": { "type": "string", "description": "SQL query that returns all data for the dashboard. Use JOINs/CTEs to combine data from multiple tables." }, "queryLimit": { "type": "number", "description": "Maximum rows to return from the query (default: 10000)." }, "queryParameters": { "type": "object", "description": "Default values for SQL {{param}} placeholders.", "additionalProperties": { "type": "string" } }, "spec": { "type": "object", "description": "Complete Vega-Lite specification. Use vconcat/hconcat for multiple panels. Data is injected at runtime." } }, "required": [ "store_id", "name", "query", "spec" ] }

data_update_dashboard

Update an existing dashboard. Modify query, spec, or metadata.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store.
dashboard_id *
string
The ID of the dashboard to update.
name
string
New dashboard name.
summary
string
New description.
query
string
Updated SQL query.
queryLimit
number
Maximum rows to return (default: 10000).
queryParameters
object
Default values for SQL {{param}} placeholders.
spec
object
Updated Vega-Lite specification.
skip_versioning
boolean
Skip auto-version creation. Default: false.
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store." }, "dashboard_id": { "type": "string", "description": "The ID of the dashboard to update." }, "name": { "type": "string", "description": "New dashboard name." }, "summary": { "type": "string", "description": "New description." }, "query": { "type": "string", "description": "Updated SQL query." }, "queryLimit": { "type": "number", "description": "Maximum rows to return (default: 10000)." }, "queryParameters": { "type": "object", "description": "Default values for SQL {{param}} placeholders.", "additionalProperties": { "type": "string" } }, "spec": { "type": "object", "description": "Updated Vega-Lite specification." }, "skip_versioning": { "type": "boolean", "description": "Skip auto-version creation. Default: false." } }, "required": [ "store_id", "dashboard_id" ] }

data_render_dashboard

Render a saved dashboard to a PNG image. Executes all queries and renders panels according to their Vega specifications.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store.
dashboard_id *
string
The ID of the dashboard to render.
scale
number
Scale factor for higher resolution (default: 1, use 2 for retina).
backgroundColor
string
Background color for the image (default: '#ffffff').
parameter_values
object
Runtime override values for query parameters. Overrides any defaults defined in dashboard queries.
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store." }, "dashboard_id": { "type": "string", "description": "The ID of the dashboard to render." }, "scale": { "type": "number", "description": "Scale factor for higher resolution (default: 1, use 2 for retina)." }, "backgroundColor": { "type": "string", "description": "Background color for the image (default: '#ffffff')." }, "parameter_values": { "type": "object", "description": "Runtime override values for query parameters. Overrides any defaults defined in dashboard queries.", "additionalProperties": { "type": "string" } } }, "required": [ "store_id", "dashboard_id" ] }

data_snapshot_dashboard

Create a named snapshot of the current dashboard state. Use to save important checkpoints like 'v1-final' or 'before-redesign'. Snapshots are protected from auto-cleanup.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store.
dashboard_id *
string
The ID of the dashboard.
name *
string
Snapshot name (e.g., 'v1-final', 'before-redesign'). Must be unique within the dashboard.
message *
string
Description of what this snapshot represents.
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store." }, "dashboard_id": { "type": "string", "description": "The ID of the dashboard." }, "name": { "type": "string", "description": "Snapshot name (e.g., 'v1-final', 'before-redesign'). Must be unique within the dashboard." }, "message": { "type": "string", "description": "Description of what this snapshot represents." } }, "required": [ "store_id", "dashboard_id", "name", "message" ] }

data_promote_dashboard_version

Promote a specific version to be the current/active dashboard. This restores that version's content (queries, panels, layout) and creates a new version record.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store.
dashboard_id *
string
The ID of the dashboard.
version_id *
string
The ID of the version to promote.
message
string
Reason for promoting this version (optional).
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store." }, "dashboard_id": { "type": "string", "description": "The ID of the dashboard." }, "version_id": { "type": "string", "description": "The ID of the version to promote." }, "message": { "type": "string", "description": "Reason for promoting this version (optional)." } }, "required": [ "store_id", "dashboard_id", "version_id" ] }

data_set_dashboard_versioning

Enable or disable automatic versioning for a dashboard. When disabled, updates won't create new versions. Useful for dashboards that don't need version history.

Tool

Endpoint

POST /api/tools/data-platform

Input Schema

store_id *
string
The ID of the data store.
dashboard_id *
string
The ID of the dashboard.
enabled *
boolean
Whether versioning should be enabled (true) or disabled (false).
View full schema
{ "type": "object", "properties": { "store_id": { "type": "string", "description": "The ID of the data store." }, "dashboard_id": { "type": "string", "description": "The ID of the dashboard." }, "enabled": { "type": "boolean", "description": "Whether versioning should be enabled (true) or disabled (false)." } }, "required": [ "store_id", "dashboard_id", "enabled" ] }