Skip to main content
Glama

Remove an SSH key from a server

remove_service_ssh_key
DestructiveIdempotent

Removes a specified account SSH key from root’s authorized_keys on an owned VPS, leaving other keys and the account key unchanged. Confirm with the user first.

Instructions

Remove one account SSH key (ssh_key from list_ssh_keys) from root's authorized_keys on one owned running Cloud VPS or Firecracker VPS; every line with that key goes, nothing else changes, and the key stays in the account. Free. Confirm with the user first. A key that is not on the server answers state absent. Refused with 409 sshKeyRemoveLastKey when it is the server's last permanent key and root cannot log in with a password: add another key first. Cloud VPS answers at once (removed or absent); Firecracker VPS answers 202 pending and list_service_ssh_keys shows the result in the key's removal. One removal at a time per server, at most 10 per minute; 423 while the server's two-factor lock is on. Requires services:manage and a full-access API key.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "orderNo": "<orderNo>",
      "ssh_key": "<ssh_key>"
    },
    "name": "remove_service_ssh_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderNoYesTenant-owned service order number: 1-64 ASCII letters, digits or hyphens, e.g. VP12345 or VP12345-1
ssh_keyYesSSH key ID from list_ssh_keys

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.3.21

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the destructiveHint/idempotentHint annotations: exact scope of destruction ('every line with that key goes, nothing else changes'), that the account key is preserved, the absent idempotent outcome, the 409 sshKeyRemoveLastKey condition, synchronous vs 202-pending response per platform, rate limits (one at a time, 10/min), 423 during two-factor lock, and required scopes/services:manage plus full-access key.

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 verb, resource and target, then error/async/limits in a logical order. It is dense and long for a two-parameter tool, but nearly every clause carries operational detail an agent needs.

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?

With no output schema, the description still covers return behavior (immediate removed/absent for Cloud VPS, 202 pending observable via list_service_ssh_keys for Firecracker), failure modes, auth requirements and rate limits — nothing material is missing for a destructive tool of this complexity.

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?

Schema coverage is 100% and already documents both parameters, so the baseline is 3; the description adds precondition meaning beyond the schema by tying ssh_key to list_ssh_keys and constraining the server to an owned, running VPS.

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 and resource ('Remove one account SSH key ... from root's authorized_keys on one owned running Cloud VPS or Firecracker VPS') and disambiguates the ssh_key argument as coming from list_ssh_keys, which separates it from account-level siblings like delete_ssh_key and deploy_ssh_key.

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 instructs 'Confirm with the user first', names the prerequisite source of the key ('ssh_key from list_ssh_keys'), and gives a when-not path with the remedy ('add another key first') for the 409 last-key case. The agent knows both how to invoke it and when it will be refused.

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

Deploy Server

Other Tools