Skip to main content
Glama

Rotate Key

tm_remote_rotate_key
DestructiveIdempotent

Rotate an SSH key for a single remote host by providing the new private key path and key type, updating authentication for Tunnel Manager.

Instructions

Rotate key (tm_remote). Single-host SSH operations with shared connection params.

Input Schema

NameRequiredDescriptionDefault
cfgNoSSH config path; unset uses ~/.ssh/config.
cmdNoShell command (run_command).
keyNoKey path (test_key_auth/setup_passwordless).
hostNoInventory alias, or a raw hostname with an explicit user.
lcfgNoLocal SSH config (copy_ssh_config).
portNoPort; unset uses the inventory alias, else 22.
rcfgNoRemote SSH config (copy_ssh_config)./root/.ssh/config
userNoUsername; unset uses the inventory alias.
lpathNoLocal file path (send_file/receive_file).
proxyNoTeleport proxy; unset uses the alias.
rpathNoRemote file path (send_file/receive_file).
confirmNoConfirm a destructive action (remove_host_key) without elicitation.
id_fileNoPrivate key path; unset uses the alias.
new_keyNoNew private key path (rotate_key).
timeoutNoCommand timeout in seconds.
key_typeNoKey type: rsa or ed25519 (setup_passwordless/rotate_key).ed25519
certificateNoTeleport certificate; unset uses the alias.
known_hostsNoKnown hosts path (remove_host_key)./root/.ssh/known_hosts
password_refNoRuntime secret reference for the SSH password; unset uses the alias.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changedv3.4.6
    • changedInput schema / properties / certificate / default
      Previous value: -""New value: +null
    • changedInput schema / properties / certificate / description
      Previous value: -"Teleport certificate."New value: +"Teleport certificate; unset uses the alias."
    • addedInput schema / properties / cfg / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / cfg / default
      Previous value: -"/root/.ssh/config"New value: +null
    • changedInput schema / properties / cfg / description
      Previous value: -"SSH config path."New value: +"SSH config path; unset uses ~/.ssh/config."
    • removedInput schema / properties / cfg / type
      Removed value: -"string"
    • addedInput schema / properties / confirm
      Added value: +{
      +  "default": false,
      +  "description": "Confirm a destructive action (remove_host_key) without elicitation.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / host / description
      Previous value: -"Remote host."New value: +"Inventory alias, or a raw hostname with an explicit user."
    • changedInput schema / properties / id_file / default
      Previous value: -"/app/.ssh/id_ed25519"New value: +null
    • changedInput schema / properties / id_file / description
      Previous value: -"Private key path."New value: +"Private key path; unset uses the alias."
    • changedInput schema / properties / password_ref / default
      Previous value: -""New value: +null
    • changedInput schema / properties / password_ref / description
      Previous value: -"Runtime secret reference for the SSH password."New value: +"Runtime secret reference for the SSH password; unset uses the alias."
    • addedInput schema / properties / port / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / port / default
      Previous value: -22New value: +null
    • changedInput schema / properties / port / description
      Previous value: -"Port."New value: +"Port; unset uses the inventory alias, else 22."
    • removedInput schema / properties / port / type
      Removed value: -"integer"
    • changedInput schema / properties / proxy / default
      Previous value: -""New value: +null
    • changedInput schema / properties / proxy / description
      Previous value: -"Teleport proxy."New value: +"Teleport proxy; unset uses the alias."
    • changedInput schema / properties / user / default
      Previous value: -""New value: +null
    • changedInput schema / properties / user / description
      Previous value: -"Username."New value: +"Username; unset uses the inventory alias."
  2. Addedv3.3.1

TDQS

C2.7/5.0
Behavior2/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is covered structurally. The description adds nothing beyond that: it never says whether the old key is replaced or backed up, whether confirm is needed, or what happens on failure. For a destructive mutation, that is a real gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, no padding, and the operation name is front-loaded. But the second sentence is generic boilerplate about shared connection params and earns little of its space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 19 parameters, most of which belong to other operations in this shared-param group, the description gives no help identifying the handful relevant to rotation (host, new_key, key_type, port, user). An output schema exists, so return values needn't be covered, but the parameter scoping gap is significant for a destructive tool.

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

Parameters3/5

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

Schema description coverage is 100%, and each parameter already carries its own note (e.g., "New private key path (rotate_key)", key_type values). Baseline 3 applies – the description adds no syntax, defaults, or interaction rules beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Rotate key" names a verb and resource, but leaves the object ambiguous: which key (SSH private key on the remote host?), and what rotation entails. The parenthetical "(tm_remote)" scopes it to single-host operation, which faintly separates it from tm_inventory_rotate_key, but nothing explicitly distinguishes the two.

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

Usage Guidelines3/5

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

"Single-host SSH operations" implies the condition for choosing this over the inventory variant, but the agent must infer that. There is no explicit when-to-use, when-not, or prerequisite statement (e.g., that the remote must already be reachable and key-auth configured).

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