SQL 审核检测
yearning_sql_checkAudit SQL for issues before submission. Supports DDL and DML statements only; for SELECT queries, use the run query tool. Call prior to submitting an order.
Instructions
提交前对 SQL 做审核检测。建议先调用本工具,再 yearning_submit_order。对应 PUT /api/v2/fetch/test。不接受 SELECT(请用 yearning_run_query)。
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>",
"database": "<database>",
"sql": "<sql>",
"order_type": "<order_type>"
},
"name": "yearning_sql_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | 待检测 SQL | |
| database | Yes | 库名 | |
| source_id | Yes | 数据源 ID | |
| order_type | Yes | SQL 类型 | |
| response_format | No | markdown |