Skip to main content
Glama

Rotate Key

tm_inventory_rotate_key
DestructiveIdempotent

Rotate SSH keys across YAML inventory host groups to replace shared credentials and keep bulk host access current.

Instructions

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

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/agent-connectors/inventory.yaml)./root/.config/agent-connectors/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. Addedv3.3.1

TDQS

C2.2/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 description is not required to establish the safety profile. It nonetheless adds nothing beyond them: it never says whether old keys are replaced or preserved, whether authorized_keys/config entries are rewritten, whether backups exist, or how failure mid-fan-out is handled — all material for a destructive key-rotation tool.

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

Conciseness2/5

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

The text is short, but brevity here reflects under-specification rather than economy. The second sentence does not earn its place — it is a vague, potentially misleading scope statement that occupies half of the definition.

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?

An output schema and rich annotations exist, which relieves the description of return-value and safety explanation, but a 16-parameter destructive operation still needs the rotation flow described (target group resolution, new key generation, replacement semantics). The description supplies none of that, leaving the agent to infer behavior entirely from parameter names.

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% across all 16 parameters, so the schema fully documents them and the correct baseline is 3. The description itself contributes no additional parameter meaning; notably it never indicates which of the 16 parameters actually drive rotation (key_pfx, key_type, group, inventory) versus the many borrowed from sibling operations.

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 title and first two words restate the tool name ('Rotate key'), adding no distinguishing detail. The trailing sentence, 'Bulk inventory operations against YAML host groups,' is a generic scope claim that could equally describe tm_inventory_run_command, tm_inventory_send_file or tm_inventory_copy_ssh_config, and it obscures rather than clarifies what rotation does.

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?

There is no statement of when to use this over tm_remote_rotate_key or the other tm_inventory_* siblings, and no prerequisites (existing key auth, inventory reachability) or exclusions. The only hint of usage comes incidentally from the schema text of 'key_pfx', not from the description.

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