Skip to main content
Glama

set_global_variable

Set a global MySQL variable safely: captures the prior value for rollback, supports dry-run preview, and refuses lockout-causing settings.

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

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
valueYes
targetNo
dry_runNo
Behavior5/5

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

With no annotations, the description carries full disclosure responsibility. It covers the write nature, risk level, reversibility, immediate SET GLOBAL effect, runtime-only persistence, refusal of dangerous variables, and undo behavior. It also explains that dry_run enforces the same safety checks. This is exemplary transparency.

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?

The description is well-structured with a tag, one-liner, behavior details, refusal list, and Args. It is longer than necessary but every sentence adds value, and the key information is front-loaded. Slight verbosity keeps it from a 5.

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?

Given no annotations and no output schema, the description is remarkably complete. It covers safety, reversibility, persistence, parameter semantics, and edge cases. For a write tool, this is thorough enough for an agent to invoke correctly and understand the consequences.

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's Args section compensates fully. It explains each parameter: name gives an example, value specifies the type, dry_run explains the preview behavior, and target clarifies config usage. This meets the parameter semantics need completely.

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?

The description states the precise action: "[WRITE][risk=medium] SET GLOBAL a server variable." This is a specific verb and resource, clearly distinguishing it from read-only sibling tools like show_variables or list_sessions. The purpose is unambiguous and immediately understandable.

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

Usage Guidelines4/5

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

The description provides clear usage context: it warns about runtime-only persistence, recommends dry_run for preview, and explicitly lists refused globals to prevent lockout. It does not name alternative tools for comparison, but it gives enough context to know when to use this tool and its limitations.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AIops-tools/MySQL-AIops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server