Skip to main content
Glama

update_setting

Change or reset PostgreSQL settings with ALTER SYSTEM, preview via dry-run, and revert with automatic undo.

Instructions

[WRITE][risk=medium] ALTER SYSTEM SET (or RESET) a parameter. Reversible.

Writes postgresql.auto.conf; most parameters need SELECT pg_reload_conf() (or
a restart for postmaster-context settings) to take effect — reported but NOT
performed automatically. The prior state is captured so the harness records
an undo. Pass dry_run=True to preview.

reset=True issues ALTER SYSTEM RESET, dropping the parameter's auto.conf
entry so postgresql.conf or the built-in default applies again. That is the
recorded inverse when the parameter had no auto.conf entry to begin with:
writing the prior value back would leave a pin that shadows postgresql.conf.

Refuses the connection-affecting postmaster settings (listen_addresses,
port, max_connections, superuser_reserved_connections, ssl, hba_file):
nothing breaks now, but the operator's next restart applies them and strands
the undo. Enforced under dry_run too.

Args:
    name: The configuration parameter name (e.g. work_mem).
    value: The new value (as a string). Omit when reset=True.
    reset: If True, ALTER SYSTEM RESET the parameter instead of setting it.
    dry_run: If True, preview without changing.
    target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
resetNo
valueNo
targetNo
dry_runNo
Behavior5/5

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

No annotations are present, so the description carries full responsibility. It thoroughly discloses the write behavior, writes to postgresql.auto.conf, need for pg_reload_conf, undo capture, refusal of certain settings, and dry_run support. This is exemplary transparency for a mutation tool.

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 well-structured: a front-loaded summary, risk marker, clear explanation of side effects, and a structured Args block. Despite its length, every sentence provides necessary information without redundancy.

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?

Covers effects, restrictions, undo, and preview mode thoroughly. The only minor gap is not explicitly stating the return value/response format, though 'reported but NOT performed' implies this. Given the complexity, this is a minor omission.

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%, and the description compensates fully with an 'Args' section that explains each parameter: name, value (omit when reset), reset behavior, dry_run, and target. This adds meaning well beyond the raw schema.

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 clearly states the tool's function: 'ALTER SYSTEM SET (or RESET) a parameter.' It names the specific SQL command and resource (PostgreSQL parameters), distinguishing it from read-only sibling tools like show_settings or other maintenance tools.

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?

Provides explicit when-to-use guidance: use dry_run to preview, reset to drop an entry, and warns against specific postmaster settings. However, it does not explicitly position this against alternatives (e.g., 'for viewing settings, use show_settings'), leaving the comparison to the sibling list.

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/Postgres-AIops'

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