Skip to main content
Glama
AIops-tools

proxy-aiops

set_server_state

Set an HAProxy server's admin state to ready, drain, or maint to adjust traffic handling, with dry-run preview and automatic undo of the previous 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

TableJSON Schema
NameRequiredDescriptionDefault
stateYes
serverYes
targetNo
backendYes
dry_runNo
Behavior5/5

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

With no annotations, the description fully discloses behavior: it is a write operation with medium risk, reversible (fetches prior state for undo), explains the effect of each state, and notes a specific error case. It also suggests dry_run to preview, covering safety and side effects.

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=medium] label and the core purpose in the first sentence. It then breaks down state semantics, error context, and a dry_run tip, followed by a clean arg list. Every sentence adds value with no fluff.

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?

The description covers purpose, state meanings, reversibility, error conditions, and parameter semantics thoroughly. It omits details such as the exact return value or whether changes persist across reloads, but these are minor for a set-operation tool and partially offset by the dry_run option.

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?

The input schema has 0% description coverage, so the description independently documents all five parameters. It explains the source of backend/server (from other tools), allowed values for state, the meaning of dry_run, and the target's default behavior.

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 opens with a specific verb and resource: 'Set an haproxy server's admin state (ready / drain / maint)'. It clearly distinguishes from siblings like set_server_weight by focusing on admin state rather than weight, and the state values are explicitly listed.

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 explains when to use each state (drain finishes in-flight, maint removes immediately, ready re-rotates) and warns that traefik/caddy are not supported. It lacks explicit alternatives or when-not-to-use relative to sibling tools, but the state semantics provide clear usage context.

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

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