Skip to main content
Glama

drain_replica

Gracefully drain a replica by finishing in-flight requests and blocking new ones. Preview with dry_run.

Instructions

[WRITE][risk=high] Gracefully drain one replica (finish in-flight, take no new).

Pass dry_run=True to preview.

Args: application: Serve application name. deployment: Deployment name. replica_id: Replica id (from replica_list). dry_run: If True, preview without draining. target: Inference target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
dry_runNo
deploymentYes
replica_idYes
applicationYes
Behavior4/5

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

The description tags the tool as '[WRITE][risk=high]', disclosing it is a write operation with high risk. It explains that draining is graceful (finishes in-flight, takes no new). The dry-run option is mentioned. Without annotations, the description carries the full burden, and it covers essential safety behavior.

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 very concise: a one-line purpose, a one-line dry-run note, and a bulleted arg list. It is front-loaded with the essential action. Every sentence contributes meaningful information, with no redundancy or filler.

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?

Given there is no output schema, the description does not explain return values, but for a drain operation the expected outcome is implied. It covers the key inputs and behavior. It does not discuss prerequisites or side effects beyond the high-risk tag, but overall it is adequate for a moderately complex operation with 5 parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description adds value by explaining each parameter. 'application: Serve application name', 'deployment: Deployment name', 'replica_id: Replica id (from replica_list)' (hinting at source), 'dry_run: If True, preview without draining', and 'target: Inference target name from config; omit for the default'. These go beyond the schema's titles and provide context.

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 action: 'Gracefully drain one replica (finish in-flight, take no new).' It uses a specific verb ('drain') and resource ('replica'), and the parenthetical explains the core behavior. This distinguishes it from siblings like 'replica_restart' or 'scale_replicas_down'.

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 the dry-run preview mode ('Pass dry_run=True to preview'), which guides safe usage. However, it does not explicitly state when to use this tool versus alternatives (e.g., scale-to-zero, replica_restart). The arg hints (e.g., 'replica_id from replica_list') provide implicit guidance.

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

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