Skip to main content
Glama

update_setting

Destructive

Set or reset PostgreSQL configuration parameters via ALTER SYSTEM, with dry-run preview and captured prior state for 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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.8.0
    • addedInput schema / properties / reset
      Added value: +{
      +  "default": false,
      +  "title": "Reset",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / value / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / value / default
      Added value: +null
    • removedInput schema / properties / value / type
      Removed value: -"string"
    • changedInput schema / required
      Previous value: -[
      -  "name",
      -  "value"
      -]New value: +[
      +  "name"
      +]
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Discloses rich behavior beyond the annotation hints: it writes postgresql.auto.conf, most changes need pg_reload_conf() which is reported but NOT performed, prior state is captured for undo, and specific postmaster settings are refused even under dry_run. This is exactly the operational context the annotations lack.

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 tags and the core action, then behavior, refusals, and args in labeled order. Dense and largely waste-free, though the explanation of the recorded inverse is somewhat lengthy relative to what's strictly needed.

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?

A mutation tool with no output schema and only safety-hint annotations, yet the description covers effect mechanism, reload requirement, undo recording, refusals, and dry_run behavior. An agent has everything needed to invoke it correctly.

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 coverage is 0%, so the description carries the burden, and it does: each of the five parameters (name, value, reset, dry_run, target) is explained with usage conditions such as omitting value when reset=True.

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+resource ('ALTER SYSTEM SET (or RESET) a parameter') with tags labeling it a WRITE and medium risk. An agent can immediately distinguish it from read-only siblings like show_settings.

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?

Clearly explains internal modes: when reset=True applies instead of setting, when to use dry_run to preview, and when value must be omitted. It does not explicitly name alternatives (e.g. show_settings for reading current values), so it stops short of full when-vs-alternative routing.

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