Skip to main content
Glama

drain_replica

Check whether a specific Ray Serve replica can be drained. Since REST API lacks per-replica drain, reports unavailability and directs you to scale down the deployment instead.

Instructions

[WRITE][risk=high] Drain one replica — NOT available over Ray's REST API.

Ray Serve exposes no per-replica drain endpoint (only the whole-cluster declarative config); individual-replica draining is a Python-API capability only. This tool refuses with a teaching error. To retire surplus replicas, scale the deployment down — the controller drains them gracefully. The dry_run preview reports the same unavailability rather than a false green.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
dry_runNo
deploymentYes
replica_idYes
applicationYes
Behavior5/5

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

No annotations provided, so the description fully discloses behavior: it refuses, explains why, and notes dry_run reports unavailability. The [WRITE][risk=high] tag adds risk context. This is complete transparency.

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?

The description is a bit verbose but well-structured: a clear warning banner, a concise explanation of unavailability, an alternative, and an args list. Every sentence earns its place, though it could be tightened slightly.

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?

Given that this is a deliberate stub/refusal tool, the description covers all necessary context: why it exists, what it does, what the alternative is, and how parameters behave. No output schema is needed since the tool always refuses except dry_run.

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%, but the description explains all five parameters with meaningful purpose: application (name), deployment (name), replica_id (from replica_list), dry_run (preview), and target (config default). This compensates fully for missing schema descriptions.

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 drains one replica but immediately clarifies it's NOT available over Ray's REST API and refuses with a teaching error. It distinguishes itself from siblings by naming the alternative (scale down) and explaining the limitation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly provides when-not-to-use and alternative: 'To retire surplus replicas, scale the deployment down — the controller drains them gracefully.' Also mentions that draining is Python-API only, guiding the agent away from this tool.

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