execute_mysql_readonly
Execute read-only MySQL queries (SELECT, SHOW, DESCRIBE) using a DSN connection. Prevents write operations to ensure data safety.
Instructions
执行只读mysql语句(仅支持SELECT、SHOW、DESCRIBE等查询操作),使用前读取规则或用户指定的DSN链接
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": {
"dsn": "<dsn>",
"sql": "<sql>"
},
"name": "execute_mysql_readonly"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dsn | Yes | MySQL数据库连接字符串,DSN格式:mysql://user:password@host:port/database | |
| sql | Yes | 要执行的只读SQL语句(SELECT、SHOW、DESCRIBE等),如果不是读操作将终止运行 |