Tools¶
The Actian MCP Server for HCL Informix® provides built-in tools for database discovery and read-only query execution.
Available Tools¶
Use the following tools to interact with the database:
| Tool | Description |
|---|---|
execute_query |
Runs a SQL query against the connected database. Reads are always allowed; writes run only when the server permits them. |
list_tables |
Lists available user tables and views. |
describe_table |
Displays column definitions, data types, and key information for a table. |
list_functions |
Lists available user-defined functions and procedures. |
execute_query¶
Use this tool to run SQL queries. The results are returned as structured JSON.
By default, the tool accepts only SELECT. When the server runs with query_mode set to read-write, it also accepts the Data Manipulation Language (DML) statements INSERT, UPDATE, and DELETE. See Write support.
Result truncation
If the number of rows exceeds the max_rows configuration, the response includes the truncated and warning fields.
Data Definition Language is not permitted
This tool does not run Data Definition Language (DDL) or administrative statements in any mode. CREATE, ALTER, DROP, GRANT, SET, ENABLE, DISABLE, and SELECT ... INTO are rejected.
Parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
query |
string |
✓ | The SQL query you want to execute. SELECT is always accepted. INSERT, UPDATE, and DELETE require query_mode set to read-write. |
Output Schema¶
On Success
{
"success": true,
"columns": ["<result_columns>"],
"rows": [["<result_rows>"]],
"row_count": "<num_rows>",
"truncated": true,
"warning": "Results were truncated to <max_rows> rows."
}
On Error
{
"success": false,
"error": "<error_message>"
}
Example¶
User Request
Show me all the rows in the customers table
Input
{
"query": "SELECT * FROM customers"
}
Response
{
"success": true,
"columns": ["customer_id", "customer_email"],
"rows": [
[101, "alice@tech.com"],
[102, "bob@corp.net"]
],
"row_count": 2
}
Example: Writing a Row¶
This example requires query_mode set to read-write.
User Request
Add a customer named Contoso Supply
Input
{
"query": "INSERT INTO customers (customer_id, customer_name) VALUES (103, 'Contoso Supply')"
}
Before running the statement, the server asks you to approve it in the client. The response depends on your answer.
Response, when you approve
{
"success": true,
"columns": [],
"rows": [],
"row_count": 1
}
Response, when you decline, do not answer, or the client cannot show the prompt
{
"success": false,
"error": "Write operation was not approved by the user."
}
Write Errors¶
The following errors apply when query_mode is read-write.
The token lacks the mcp:write scope
The server checks the scope before it asks you to approve the statement, so no prompt appears.
{
"success": false,
"error": "write operations require the 'mcp:write' scope, which the access token does not carry"
}
The statement is DDL or administrative
{
"success": false,
"error": "DDL and administrative statements (CREATE/ALTER/DROP/GRANT/SET/ENABLE/...) are not permitted."
}
list_tables¶
Returns all user tables and views available in the connected database as structured JSON.
Parameters¶
This tool does not require any input parameters.
Output Schema¶
On Success
{
"success": true,
"columns": ["table_name"],
"rows": [["<table_name>"]],
"row_count": 1
}
On Error
{
"success": false,
"error": "<error_message>"
}
Example¶
User Request
Show me all the tables in my database
Response
{
"success": true,
"columns": ["table_name"],
"rows": [
["customers"],
["orders"]
],
"row_count": 2
}
describe_table¶
Returns schema details for a table, including column names, data types, lengths, scales, and column comments.
Parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
table_name |
string |
✓ | Name of the table to describe. Accepts a plain name, such as orders, or an owner-qualified name, such as actian.customers. |
Qualify the name when several owners have the same table
Given a plain name, the server describes a table you own if one exists with that name. Otherwise it selects a table from one of the other owners. Pass owner.table to describe a specific table.
Output Schema¶
On Success
{
"success": true,
"columns": [
"column_name",
"column_datatype",
"column_length",
"null_column",
"key_type"
],
"rows": [["<column_name>", "<column_datatype>", "<column_length>", "<null_column>", "<key_type>"]],
"row_count": "<num_rows>"
}
On Error
{
"success": false,
"error": "<error_message>"
}
Example¶
User Request
Show me schema information about the customers table
Input
{
"table_name": "customers"
}
Success Response
{
"success": true,
"columns": [
"column_name",
"column_datatype",
"column_length",
"column_scale",
"column_comment"
],
"rows": [
["customer_id", "integer", "4", "YES", "P"],
["email", "varchar", "50", "NO", "None"]
],
"row_count": 2
}
Error Response
{
"success": false,
"error": "No permission to access table 'table name'"
}
Example: Naming the Owner¶
User Request
Describe the customers table owned by actian
Input
{
"table_name": "actian.customers"
}
The response has the same shape as the previous example. If no table matches both the name and the owner, rows is empty and row_count is 0.
list_functions¶
Returns user-defined functions and procedures, including their stored definitions, as structured JSON.
Parameters¶
This tool does not require any input parameters.
Output Schema¶
On Success
{
"success": true,
"columns": ["function_name","type", "function_ddl"],
"rows": [["<function_name>", "<type>","<function_ddl>"]],
"row_count": 1
}
On Error
{
"success": false,
"error": "<error_message>"
}
Example¶
User Request
Show me all the functions in my database
Response
{
"success": true,
"columns": ["function_name", "function_ddl"],
"rows": [
["calculate_discount","FUNCTION", "CREATE FUNCTION calculate_discount(...) ..."],
["refresh_sales_summary","PROCEDURE", "CREATE PROCEDURE refresh_sales_summary() ..."]
],
"row_count": 2
}