describe_table
Inspect any table to retrieve column definitions, indexes, foreign keys, estimated row counts, and sample data before writing SQL, reducing guesswork about structure and real values.
Instructions
查看指定表的详细信息,一次返回:列定义/索引/外键/估算行数/数据采样。PostgreSQL/MSSQL/Oracle 跨 schema 同名表时应传 schema 精确定位。LLM 在写 SQL 前调用此工具可同时拿到字段结构、关联关系、表大小量级、字段真实取值示例,大幅减少猜测。
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": {
"table": "<table>"
},
"name": "describe_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | 要查看的表名 | |
| schema | No | 仅 PostgreSQL/MSSQL/Oracle 使用:schema 名称,用于跨 schema 精确定位 | |
| sampleLimit | No | 采样数据行数,默认 3,0 表示不采样,最大 20 |