Table structure
get_table_schemaRetrieve the full structure of a table or view: columns, types, constraints, and indexes, to learn exact column names and types before querying. For view SQL text, use get_view_definition.
Instructions
Returns the full structure of one table or view: columns with an unambiguous type_declaration (such as 'nvarchar(250)'), max_length_chars, every extended property, computed-column definitions and whether they are persisted; plus primary key, foreign keys, check and unique constraints, and indexes with key column order and declared key width. Call it before query_table to learn exact column names and types; for a view's SQL text use get_view_definition. max_length is the raw sys.columns value in BYTES, so reason about text length with type_declaration or max_length_chars.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"database": "<database>",
"table": "<table>"
},
"name": "get_table_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name, bare, with no schema prefix. Example: 'GenericSecurity' | |
| schema | No | Table schema. Empty searches every schema. Example: 'Feeder' | |
| database | Yes | Name of the database as registered in the configuration. |