Show database schema
db_schemaRetrieve a compact, one-line-per-table schema before writing SQL so column names and relationships are correct. Filter by schema or table name; read-only.
Instructions
Returns a compact schema, one line per table: orders(id integer pk, user_id integer not null fk→users.id, total numeric, …). Filter by schema and table name (substring). Use it before writing SQL so column names are right. Read-only.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "db_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | Only tables whose name contains this text | |
| schema | No | Schema (default: the connection's, else public / dbo / main / the database) | |
| maxTables | No | Default 40 | |
| connection | No | Name or id; optional when there is one |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| driver | Yes | ||
| schema | Yes | ||
| tables | Yes | One line per table: name(column type [pk] [not null] [fk→table.column], …); views marked [view] | |
| truncated | No | Present when more tables matched than maxTables | |
| connection | Yes | ||
| totalTables | Yes |