Resources¶
The Actian MCP Server for HCL Informix® provides a built-in resource that enables comprehensive database schema discovery.
Available Resources¶
Use the following resource to retrieve metadata for the database:
| Resource URI | Description |
|---|---|
resource://database/schema | Returns JSON metadata for the connected database, including table names, column definitions, and constraints. |
resource://database/schema¶
This resource returns the database schema as a structured JSON object. The response includes details for every user table, such as data types, column lengths, nullability, and key constraints.
Parameters¶
This resource does not require any input parameters.
Output Schema¶
On Success
{
"<table_name>": {
"columns": {
"<column_name>": {
"dtype": "<column_datatype>",
"length": "<column_length>",
"nullable": "<NULL value>",
"key": "<Constraint type>"
}
}
}
}
Error handling
If the schema cannot be retrieved, the server returns the following error:
The database schema could not be retrieved. Error: <error_message>
Example¶
Request
resource://database/schema
Response
{
"customers":
{
"columns": {"email": {"dtype": "VARCHAR(50)", "length": "50", "nullable": "NOT NULL", "key": "None"},
"customer_id": {"dtype": "INTEGER", "length": "4", "nullable": "NULL ", "key": "P "}},
},
"orders":
{
"columns": {"order_id": {"dtype": "INTEGER", "length": "4", "nullable": "NOT NULL", "key": "None"},
"order_date": {"dtype": "DATE", "length": "4", "nullable": "NOT NULL", "key": "None"},
"customer_id": {"dtype": "INTEGER", "length": "4", "nullable": "NOT NULL", "key": "None"},
"total_amount": {"dtype": "MONEY", "length": "4098", "nullable": "NOT NULL", "key": "None"}},
}
}