Set AI tool access
set_ai_accessChange what AI tools and API keys may do on one connection, which of their requests wait for a person's approval, and their limits. aiAccess: off, approved_queries (only the team's shared saved queries), read_only, or same_as_people. approvalMode: none, writes, writes_and_exports or all; approvalBy: user or admin. Omitted fields keep their value; a limit set to null goes back to the default. Also needs the execute scope. Guard decides what AI tools, including you, may do on the team's databases, so change it only when the user asked for this exact change, and say what will change first. Needs an admin, the write scope, and an admin's approval in SaturnSQL for this AI tool: without it the call fails with code GUARD_APPROVAL_REQUIRED. Then call request_guard_edit, show the user the approvalUrl, and repeat the call after they approve. An approval lasts 12 hours; call end_guard_edit when the user's changes are done. Every change is recorded in SaturnSQL with the user's name.
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": {
"connectionId": "<connectionId>"
},
"name": "set_ai_access"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aiAccess | No | ||
| aiMaxRows | No | Most rows an AI query returns. | |
| approvalBy | No | ||
| approvalMode | No | ||
| connectionId | Yes | Connection id from list_connections. | |
| aiTimeoutSeconds | No | ||
| aiMaxBytesBilledGb | No | BigQuery only. | |
| aiQueriesPerMinute | No |