ClickHouse connects to a Nagent workspace. Once it is connected, agents can call 6 ClickHouse actions, such as "Get Database Schema", "Get ClickHouse Play Interface" and "Get Table Schema". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against ClickHouse, with input parameters and output schema.
CLICKHOUSE_EXECUTE_QUERYExecute a SQL query in ClickHouse and return the results. This is the primary action for querying data from ClickHouse databases.
Input parameters
The SQL query to execute in ClickHouse
Output format for the query results. Common formats: JSONEachRow, JSON, CSV, TSV
Database to use for the query (overrides connection default)
Additional ClickHouse settings for the query execution
Maximum query execution time in seconds
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLICKHOUSE_GET_DATABASE_SCHEMAGet comprehensive schema overview of an entire database including all tables and optionally their column definitions. Essential for AI agents to understand the complete database structure in a single call.
Input parameters
Database name (overrides connection default). If not specified, uses connection default or 'default'
Whether to include full column schemas for all tables. Set to false for quick overview, true for complete schema details.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLICKHOUSE_GET_PLAY_INTERFACEGet the ClickHouse Play web user interface for interactive query execution. Returns HTML page with Monaco Editor for writing queries and visualizing results.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLICKHOUSE_GET_TABLE_SCHEMAGet detailed schema information for a specific table including column definitions, types, keys, and optionally sample data. This is essential for AI agents to understand table structure before constructing queries.
Input parameters
Database name (overrides connection default)
Name of the table to describe
Number of sample rows to return (only if include_sample_data is true)
Whether to include sample rows from the table
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLICKHOUSE_LIST_DATABASESList all databases in the ClickHouse instance. Useful for discovering available databases before querying tables.
Input parameters
Optional LIKE pattern to filter databases (e.g., 'prod_%' or '%test')
Whether to include list of table names for each database
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
CLICKHOUSE_LIST_TABLESList tables in ClickHouse databases. Returns information about tables including their engine, size, and row count.
Input parameters
Optional LIKE pattern to filter table names (e.g., 'user_%' or '%_log')
Database name to list tables from. If not provided, lists tables from all databases
Whether to include views in the results
Whether to include column names for each table
Whether to include primary key information for each table
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 6 ClickHouse actions on Nagent, including "Get Database Schema", "Get ClickHouse Play Interface" and "Get Table Schema". Get Database Schema: Get comprehensive schema overview of an entire database including all tables and optionally their column definitions. Each action is listed on this page with its input parameters and its output.
It also takes 2 optional inputs: database and include_table_schemas. It returns data, error and successful.