执行查询
yearning_run_queryExecute read-only SELECT queries on a specified data source, returning results as markdown or JSON. Supports configurable row limits for safe data retrieval.
Instructions
在指定数据源执行只读 SELECT 查询。需具备查询权限;若开启查询审核,需先 yearning_submit_query_order。对应 WS /api/v2/query/results(msgpack)
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": {
"source_id": "<source_id>",
"schema": "<schema>",
"sql": "<sql>"
},
"name": "yearning_run_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | 查询 SQL(仅 SELECT) | |
| limit | No | 返回行数上限(客户端截断) | |
| schema | Yes | 库名 | |
| source_id | Yes | 数据源 ID | |
| response_format | No | markdown |