export_query
Execute a SQL SELECT query and export results to a CSV or JSON file, automatically adding a timestamp to prevent overwrites, returning the local file path.
Instructions
执行查询并把结果导出为 CSV 或 JSON 文件,返回本地文件路径。
Parameters: sql: SELECT 语句 filename: 文件名(不含扩展名),自动加时间戳避免覆盖 format: csv / json database: 数据库 params: 参数列表
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>",
"filename": "<filename>"
},
"name": "export_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| format | No | csv | |
| params | No | ||
| database | No | ||
| filename | Yes |