yearning_run_query
Execute read-only SELECT queries on Yearning-audited data sources, returning result tables with configurable row limits and markdown/json response formats.
Instructions
在指定数据源执行只读 SELECT 查询并返回结果表格。
注意:本工具仅执行 SELECT,对目标库数据无修改;但 Yearning 会留存查询审计记录, 且查询本身可能产生资源开销(如全表扫描、锁竞争),属「提交操作」而非纯被动读取。 需具备查询权限且已通过查询审核。
对应 API:WS /api/v2/query/results(msgpack 编解码)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | 查询 SQL(仅 SELECT,不修改目标库数据) | |
| limit | No | 返回行数上限(客户端截断) | |
| schema | Yes | 库名 | |
| source_id | Yes | 数据源 ID | |
| response_format | No | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |