Resources¶
The Actian MCP Server for the Actian Analytics Engine includes a built-in resource for exploring live schema metadata. This resource is particularly useful for providing context to an LLM, ensuring it understands the table relationships and data types of the specific environment.
Available Resources¶
| Resource URI | Description |
|---|---|
resource://database/schema | Retrieves metadata for the connected database, including tables, columns, and constraints. |
resource://database/schema¶
Use the resource://database/schema URI to fetch the full database schema as a structured JSON object. You can use resource to inspect table and column definitions before you write or execute SQL queries.
Parameters¶
This resource does not require input parameters.
Output Schema¶
On Success
{
"<table_name>": {
"columns": {
"<column_name>": {
"dtype": "<column_datatype>",
"comment": "<column_comment>"
}
},
"keys": ["<constraint_definition>"],
"comment": "<table_comment>"
}
}
Error handling
If the schema cannot be retrieved, the server returns an error message:
The database schema could not be retrieved. Error: <error_message>
Example¶
Request
resource://database/schema
Response
{
"customers": {
"columns": {
"customer_id": {
"dtype": "integer",
"comment": "Primary key"
},
"customer_name": {
"dtype": "varchar",
"comment": "Customer display name"
}
},
"keys": ["PRIMARY KEY (customer_id)"],
"comment": "Customer master data"
},
"orders": {
"columns": {
"order_id": {
"dtype": "integer",
"comment": "Primary key"
},
"customer_id": {
"dtype": "integer",
"comment": "Customer reference"
}
},
"keys": ["PRIMARY KEY (order_id)"],
"comment": "Sales orders"
}
}