Skip to main content
Glama

ssh_kubectl_recover

Destructive

Run one allowlisted STATE-CHANGING kubectl command inside an Ankra-provisioned cluster (Hetzner, OVH, UpCloud, DigitalOcean or Scaleway) from a control-plane node over SSH-via-bastion, for recovering a cluster whose in-cluster ankra-agent is offline and which therefore cannot be reached any other way. Verbs, and when each is the right one: rollout_restart (the agent Deployment exists and looks healthy to its ReplicaSet but never checks in - the usual fix); rollout_undo (the agent self-upgraded and the new revision never checked in - roll back to the revision that worked); delete_pod (one named pod is stuck Terminating, or is bound to a node that is gone, so the ReplicaSet will not replace it); cordon and uncordon (stop scheduling onto a sick node, or allow it again). This is an allowlist, not a shell: it cannot exec, apply, patch, scale, drain or delete anything other than exactly one named pod, and it accepts no label selector on the delete path, so a mistaken confirmation costs at most one pod. Call ssh_kubectl_read FIRST to confirm what is actually broken - restarting a rollout that is failing to pull an image just repeats the failure. This changes a production cluster and requires confirmation. Not available for imported or managed-Kubernetes clusters, nor (yet) Proxmox/HPE Morpheus.

Input Schema

NameRequiredDescriptionDefault
kindNoWorkload type for the rollout verbs: deployments, daemonsets or statefulsets. Must be omitted for delete_pod, which always acts on a pod; optional for cordon and uncordon (always a node).
nameYesRequired. The workload name for the rollout verbs, the pod name for delete_pod, or the node name for cordon/uncordon.
verbYesWhich recovery action to take. rollout_restart rolls the workload's pods; rollout_undo reverts it to its previous revision; delete_pod removes exactly one named pod so its controller recreates it; cordon/uncordon stop or resume scheduling onto a node.
node_idNoUUID of the control-plane node to run the command on (from list_cluster_nodes). Optional: a healthy control-plane node is chosen automatically.
namespaceNoNamespace of the workload or pod. Not used by cordon/uncordon.
node_nameNoExact name of the control-plane node to run the command on. Alternative to node_id.
cluster_idNoUUID of the cluster. Optional when a cluster is selected.
cluster_nameNoExact name of the cluster. Optional when a cluster is selected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, readOnlyHint=false, but the description adds substantial context beyond them: it is an allowlist, not a shell; it cannot exec, apply, patch, scale, drain or delete anything other than one named pod; it accepts no label selector on the delete path; a mistaken confirmation costs at most one pod; it changes production and requires confirmation. This is unusually rich disclosure.

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 long but front-loaded with purpose and exclusions, and every sentence carries necessary weight for a destructive multi-verb recovery tool: verb routing, the read-first warning, the allowlist constraint, and the confirmation requirement. No padding or repetition of structured data.

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 destructive, non-idempotent cluster-recovery tool with no output schema, the description covers purpose, per-verb usage, behavioral constraints, confirmation requirements, and availability exclusions. An agent has everything needed to decide whether and how to call it.

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%, so the schema already documents all 8 parameters including the verb enum and its per-value meaning. The description's verb guidance is really usage routing rather than parameter semantics, and it adds no syntax or format detail beyond what the schema provides. The baseline of 3 is appropriate.

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 names a specific verb and resource ('Run one allowlisted STATE-CHANGING kubectl command') and scopes it precisely ('inside an Ankra-provisioned cluster ... from a control-plane node over SSH-via-bastion'). It clearly distinguishes itself from siblings by naming ssh_kubectl_read as the prerequisite diagnostic and by explaining that the in-cluster agent is offline, so no other path exists.

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?

It gives explicit when-to-use guidance per verb (e.g. rollout_restart for a healthy ReplicaSet that never checks in; rollout_undo for a bad self-upgrade; delete_pod for stuck Terminating pods), names the alternative (ssh_kubectl_read) and the condition selecting it, and states exclusions ('Not available for imported or managed-Kubernetes clusters, nor (yet) Proxmox/HPE Morpheus').

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources