Skip to main content
Glama

set_global_variable

Destructive

Set a MySQL global server variable at runtime, capture its prior value for undo, and preview changes with dry_run. Refuses unsafe globals.

Instructions

[WRITE][risk=medium] SET GLOBAL a server variable. Reversible: captures prior value.

Runtime-only: the change does not survive a restart (persist it in my.cnf — or SET PERSIST on MySQL 8 — yourself); reported but NOT performed automatically. The prior value (from SHOW GLOBAL VARIABLES) is captured so the harness records an undo that sets it back. Pass dry_run=True to preview.

Refuses the globals that would lock this tool out of the server (init_connect, max_connections, max_user_connections, read_only, super_read_only, skip_networking, require_secure_transport, and wait_timeout/interactive_timeout below 30s). SET GLOBAL is immediate, so those strand the undo. Enforced under dry_run too.

Args: name: The global variable name (e.g. max_connections). value: The new value (as a string). dry_run: If True, preview without changing. target: Target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
nameYes
valueYes
targetNo
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A5/5.0
Behavior5/5

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

Annotations already declare destructive=true, idempotent=false, and readOnly=false, but the description adds substantial context: runtime-only persistence behavior, automatic capture of the prior value for undo, the refusal list for lockout-prone globals, and enforcement of refusals under dry_run. This goes well beyond the structured safety hints.

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

Conciseness5/5

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

The description is front-loaded with the write/risk tag and core action, then proceeds through behavior, constraints, and args. Every section is necessary for a risky mutation tool with this much operational nuance, and the Args block is compact rather than repetitive.

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

Completeness5/5

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

For a complex mutation tool with no output schema, the description covers the critical invocation details: reversibility, runtime-only scope, persistence alternatives, refused globals, dry-run enforcement, and all four parameter roles. Nothing material for correct usage appears to be missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does so well: it defines name (with example max_connections), value as a string, dry_run as a preview switch, and target as a config target to omit for the default. All four parameters are documented clearly.

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?

States a specific verb and resource: '[WRITE][risk=medium] SET GLOBAL a server variable.' This distinguishes it from read-oriented siblings like show_variables and from undo tools like undo_apply, and the reversible/undo context further clarifies its role.

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?

Explicitly says to pass dry_run=True to preview, warns that the change is runtime-only and must be persisted separately via my.cnf or SET PERSIST, and lists the specific globals it refuses to modify. These are clear when-to-use, alternative-mechanism, and when-not constraints.

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