Skip to main content
Glama

set_server_state

Destructive

Change an HAProxy server's admin state to ready, drain, or maint, with dry-run preview and reversible undo that restores the prior state.

Instructions

[WRITE][risk=medium] Set an haproxy server's admin state (ready / drain / maint); reversible — the prior admin state is fetched first and the undo restores it.

drain finishes in-flight sessions but takes no new ones; maint removes the server immediately; ready returns it to rotation. On traefik/caddy this raises the support matrix's teaching error. Pass dry_run=True to preview.

Args: backend: Backend name (from list_services). server: Server name inside the backend (from list_upstreams). state: One of ready, drain, maint. dry_run: If True, preview without changing. target: Proxy target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
stateYes
serverYes
targetNo
backendYes
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=true, idempotentHint=false), the description discloses that the operation is reversible, that the prior admin state is fetched first, and that undo restores it, plus the exact runtime effect of each state. This is meaningful behavioral context the annotations cannot convey.

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 [WRITE][risk=medium] and the core action, then state semantics, then a structured Args block. Every section earns its place given the zero schema coverage, though the Args list is somewhat verbose relative to the prose.

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 5-parameter mutation tool with no output schema and no schema descriptions, the definition supplies everything an agent needs: purpose, risk level, reversibility/undo behavior, per-state semantics, valid values, and the preview flag.

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 schema defines no enums, so the description must carry all parameter meaning — and it does: it documents all five params, gives the valid state values, points to list_services/list_upstreams for backend/server, and explains dry_run and target (omit for default).

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 (set) and resource (an haproxy server's admin state) with the exact value space (ready/drain/maint). It is clearly distinguishable from siblings like set_server_weight and set_config_value, which act on different resources.

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?

Explains when each state applies (drain = finish in-flight, no new sessions; maint = remove immediately; ready = return to rotation) and warns that traefik/caddy raises the support-matrix teaching error. It also recommends dry_run=True for preview. It stops short of naming a fallback tool for the traefik/caddy case.

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