export_results_format
Run a read-only SQL query and return results formatted as CSV, Excel, or chart JSON for your specific use case, applying role-based security checks.
Instructions
Run a read-only query (through the same security checks as execute_safe_query) and return it reshaped for a specific use.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "export_results_format"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | One of "admin", "analyst", "support", "readonly_guest". Ignored (and taken from your access token instead) if the server is running with authentication enabled. | |
| db_uri | No | A short connection name (e.g. "prod"), a full connection string for local testing, or empty ("") for the default database. | |
| sql_query | No | A single SELECT statement. | |
| tenant_id | No | Required if the role needs row-level filtering. Also taken from your access token when auth is enabled. | |
| format_type | No | One of "csv", "excel", or "chart_json" |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||