Skip to main content
Glama

Set AI tool access

set_ai_access
DestructiveIdempotent

Change 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

NameRequiredDescriptionDefault
aiAccessNo
aiMaxRowsNoMost rows an AI query returns.
approvalByNo
approvalModeNo
connectionIdYesConnection id from list_connections.
aiTimeoutSecondsNo
aiMaxBytesBilledGbNoBigQuery only.
aiQueriesPerMinuteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes well beyond the annotations (destructiveHint/readOnlyHint/idempotentHint): omitted fields keep their value, null resets a limit to default, changes are audited with the user's name, and the approval window lasts 12 hours. The failure path is spelled out concretely with code GUARD_APPROVAL_REQUIRED and the recovery loop. It does not state what the successful response returns, a minor gap given no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the effect of the call and the enum vocabularies before the operational warnings, and nearly every sentence carries new information (scope requirements, error code, recovery sequence, approval lifetime). It is dense to the point of run-on in places, packing prerequisites and approval choreography into long clauses.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, admin-gated access-control mutation with 8 params and no output schema, the description covers authorization, approval flow, error handling, reset semantics and audit trail. The main omission is return-value expectations and whether partial application is possible when only some fields are supplied.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 38%, and the description compensates substantially by defining every aiAccess enum value (off, approved_queries, read_only, same_as_people) and the approvalMode/approvalBy vocabularies, plus the null-restores-default rule. Three of the numeric limit parameters (aiTimeoutSeconds, aiQueriesPerMinute, and the units of aiMaxBytesBilledGb) still carry no meaning beyond their names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource bounded to one connection: what AI tools and API keys may do, which requests require human approval, and their limits. It immediately enumerates the controlled dimensions (aiAccess, approvalMode, approvalBy, limits), so an agent knows the exact surface of the change without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guardrail on when to use it: 'change it only when the user asked for this exact change, and say what will change first.' It also names the prerequisites (admin, write scope, execute scope) and the exact follow-up sequence with siblings request_guard_edit and end_guard_edit, plus the condition for calling end_guard_edit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources