Resources¶
The Actian MCP Server for Actian Ingres provides a built-in resource that helps to discover and understand your database schema.
Available Resources¶
The following resource is available for schema discovery:
| Resource URI | Description |
|---|---|
resource://database/schema | Returns metadata for the connected database, including tables, columns, and constraints. |
resource://database/schema¶
Use this resource to retrieve a comprehensive view of the database structure in JSON format. The output includes column definitions, data types, comments, and constraint information.
Parameters¶
This resource does not require any 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
The server returns a nested JSON object where each top-level key is a table name.
{
"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"
}
}