Skip to main content
Glama

Rotate Key

tm_inventory_rotate_key
DestructiveIdempotent

Rotate SSH keys for hosts in a YAML inventory group by generating replacement keypairs, enabling bulk access credential updates.

Instructions

Rotate key (tm_inventory). Bulk inventory operations against YAML host groups.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tm_inventory_rotate_key"
  }
}

Input Schema

NameRequiredDescriptionDefault
cfgNoLocal SSH config path (copy_ssh_config).
cmdNoShell command (run_command).
keyNoShared key path (configure_key_auth)./app/.ssh/id_ed25519
hostNorun_command only. Optional single-host alias to target instead of the whole 'group' fan-out — the safe way to reach ONE inventory host (e.g. 'gb10') without running against 'homelab'. Resolved and authorized through the same alias store tm_remote/tm_hosts use, so the two are one source of truth: an unknown or unauthorized alias is rejected outright, never silently skipped. Takes precedence over 'group' when set.
groupNoTarget group.all
lpathNoLocal file path (send_file).
rpathNoRemote file path (send_file/receive_file).
key_pfxNoPrefix for new keys (rotate_key)./root/.ssh/id_
previewNorun_command only. If true, resolve the exact target host(s) for 'host'/'group' and return them in 'resolved_hosts' WITHOUT running 'cmd' — lets a caller verify scope before executing for real (no surprise fan-out). The real (non-preview) response also always includes 'resolved_hosts' for the same reason.
rmt_cfgNoRemote config path (copy_ssh_config)./root/.ssh/config
timeoutNoCommand timeout in seconds.
key_typeNoKey type: rsa or ed25519.ed25519
parallelNoRun parallel.
inventoryNoYAML inventory path (default: $XDG_CONFIG_HOME/scion-sdk/inventory.yml)./root/.config/scion-sdk/inventory.yml
max_threadsNoMax threads.
lpath_prefixNoLocal dir prefix (receive_file).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.4.7
    • changedInput schema / properties / inventory / default
      Previous value: -"/root/.config/agent-connectors/inventory.yml"New value: +"/root/.config/scion-sdk/inventory.yml"
    • changedInput schema / properties / inventory / description
      Previous value: -"YAML inventory path (default: $XDG_CONFIG_HOME/agent-connectors/inventory.yaml)."New value: +"YAML inventory path (default: $XDG_CONFIG_HOME/scion-sdk/inventory.yml)."
  2. Addedv3.3.1

TDQS

C2.3/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 known. The description adds nothing on top of that: it does not say what gets destroyed (existing keys overwritten on every host in the group?), what permissions or connectivity are required, or that the default scope is the entire inventory. For a destructive multi-host operation, 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?

It is short and front-loaded, with no wasted clauses, but that brevity comes at the cost of under-specification rather than true efficiency. The generic second sentence does little work compared with the key-specific detail that is missing.

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?

For a 16-parameter, annotation-flagged destructive, open-world tool with default group='all', the description leaves the agent unequipped: no scope warning, no explanation of key_type/key_pfx effects, no reference to the preview path, and no routing to the single-host sibling. The output schema being present covers return values only, not the missing operational context.

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 the schema itself documents all 16 parameters richly, including 'host', 'preview', and 'group' semantics. The description contributes no parameter meaning at all, so the baseline of 3 applies rather than anything higher.

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

Purpose2/5

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

The first sentence, 'Rotate key (tm_inventory)', is a near-verbatim restatement of the name and title. The second sentence, 'Bulk inventory operations against YAML host groups', is a generic tagline that never says what a key rotation actually does (regenerate SSH keys, redistribute to hosts in a group) or how it differs from the sibling tm_remote_rotate_key.

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

Usage Guidelines2/5

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

No when-to-use guidance is given: nothing tells the agent to prefer this over tm_remote_rotate_key for a single host, or over tm_inventory_configure_key_auth for a different key operation. With 'group' defaulting to 'all', there is also no warning about when this should or should not be run against a whole inventory.

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