execute_query
Executes read-only SQL queries (SELECT/WITH) and returns results as a JSON array, with an optional schema parameter for unqualified table names.
Instructions
执行只读 SQL 查询(仅允许 SELECT/WITH),结果以 JSON 数组返回。
Args: sql: SELECT 语句,绑定变量使用 :name 占位(不要字符串拼接值)。 schemaName: 指定默认 schema,未限定表名将解析到该 schema(如 "SCOTT")。
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": {
"sql": "<sql>"
},
"name": "execute_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| schemaName | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |