execute_safe_query
Validate and run read-only SELECT queries while enforcing role-based access, tenant filtering, and sensitive-data masking before returning results.
Instructions
Validate and run a read-only SELECT statement. Applies RBAC, tenant row-level filtering, and sensitive-data masking before returning results.
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": "execute_safe_query"
}
}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 configured on the server (e.g. "prod"), a full connection string for local testing, or empty ("") to use the server's default database. | |
| sql_query | No | A single SELECT statement. Anything else is rejected. | |
| tenant_id | No | Required if the role needs row-level filtering. Also taken from your access token when auth is enabled. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||