Skip to main content
Glama

remove_instances

Remove instances from an Ocean cluster using a chosen strategy: drain_and_replace for graceful pod draining, replace for immediate termination with auto-replacement, or remove_permanently to reduce capacity. Requires confirm=true.

Instructions

DESTRUCTIVE: Remove instances from an Ocean cluster using a named strategy. This is the RECOMMENDED tool for instance removal — it picks the right API call for you. Requires confirm=true.

Strategies:

  • "drain_and_replace": Gracefully drain pods (respects PDBs), terminate, Ocean replaces. Uses rolling restart. SAFEST option for production. (Default if not specified)

  • "replace": Immediately terminate instances, Ocean auto-scales replacements. Faster but no graceful drain — pods are killed abruptly.

  • "remove_permanently": Terminate instances AND reduce cluster capacity. Instances are gone and NOT replaced. Use for downsizing.

Args: cluster_id: The Ocean cluster ID (e.g. o-abc12345) instance_ids: Comma-separated instance IDs (e.g. i-abc123,i-def456) strategy: One of: drain_and_replace, replace, remove_permanently confirm: Must be true to execute. Safety guard. batch_size_percentage: For drain_and_replace only: % of nodes per batch (default: 20) account_id: Optional account ID. Defaults to SPOTINST_ACCOUNT_ID env var. cloud: Cloud provider: aws or azure (default: aws). Note: replace and remove_permanently are AWS-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cluster_idYes
instance_idsYes
strategyNo
confirmNo
batch_size_percentageNo
account_idNo
cloudNoaws

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations exist, but the description fully discloses destructive nature, strategy behaviors (graceful drain, immediate termination, permanent removal), safety guard (confirm), and cloud restrictions.

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 well-structured with headers, bullets, and front-loaded warnings. Every sentence is informative and earns its place without redundancy.

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 complex, destructive tool with no annotations, the description covers strategies, parameters, cloud restrictions, and safety. Output schema exists, so return values are not needed.

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?

With 0% schema coverage, the description's 'Args' section adds examples, defaults, strategy values, batch constraints, and cloud provider scope, fully compensating for the schema gap.

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 removes instances from an Ocean cluster using a strategy, with specific verbs and resource. It also claims to be the recommended tool, differentiating it from siblings.

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 provides context on when to use (recommended for instance removal) and detailed strategy usage, but lacks explicit exclusion of sibling 'detach_instances' or when-not-to-use 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/arnstarn/mcp-server-spotinst'

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