Skip to main content
Glama

Apply node OS policy

apply_node_os_policy
Destructive

Write, or remove, Ankra's node OS update policy on the existing nodes and the bastion of an Ankra-provisioned cluster, over SSH through the bastion. The policy is two files: /etc/apt/apt.conf.d/52ankra-unattended-upgrades, which keeps automatic security updates for every package except the ones whose maintainer scripts restart networking, the init system, udev, the container runtime, the local API server endpoint or the packet filter in place (systemd and its libraries, udev, netplan, docker, containerd, runc, haproxy, keepalived, iptables, nftables) and turns automatic reboots off; and /etc/needrestart/conf.d/50-ankra.conf, which makes needrestart list services after a library update instead of restarting them (on Ubuntu 24.04 it otherwise restarts them automatically from the apt hook). Without it, Ubuntu's daily unattended upgrade can restart systemd-networkd on every node at once and reset every connection through them. The held-back packages are patched by Ankra's rolling maintenance instead, one node at a time. Writing or removing these files restarts nothing: apt and needrestart read them the next time they run, so this is safe on a production node. A held host gets those held-back security updates only from the rolling OS patch lane, so apply is refused unless the cluster's OS patch policy is enabled (set_os_patch_policy); runs of an enabled policy write and remove the hold on their own, and turning the policy off removes it everywhere. revert is always allowed. It does NOT run arbitrary commands - only this fixed write or its removal. Target the bastion with include_bastion, one node with node_id (preferred) or node_name, or every node with all_nodes (at most 100 per run); combine include_bastion with either. revert removes both files. Hosts are visited one at a time. The report lists every host with verified true only when apt-config itself shows the policy in force (or gone, after revert); a host without apt, an unreachable host or one the run did not reach reports verified false with the reason. Not available for imported or managed-Kubernetes clusters (no bastion), nor Scaleway (its gateway has no shell).

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": "apply_node_os_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
revertNoRemove the policy files instead of writing them. Restarts nothing either.
node_idNoUUID of one node to cover (from list_cluster_nodes). Preferred over node_name.
all_nodesNoCover every live node of the cluster (at most 100 per run). Cannot be combined with node_id or node_name.
node_nameNoExact name of one node to cover. 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.
include_bastionNoApply to (or remove from) the cluster's bastion.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond annotations by naming the two files touched, explaining that nothing restarts and why the hold exists, disclosing the ordering guarantee (hosts visited one at a time) and the report contract (verified true only when apt-config shows the state). The 'safe on a production node' framing sits in mild tension with destructiveHint=true, but it is clarified by the requirement that the OS patch policy be enabled, so it is not a contradiction.

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 a single dense block of roughly 330 words with no paragraph or bullet structure, which makes scanning for the targeting rules and exclusions harder than it should be. The full enumeration of held-back packages (systemd, udev, netplan, docker, containerd, runc, haproxy, keepalived, iptables, nftables) is rationale that rarely affects tool selection and could be trimmed.

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, policy-gated, multi-host operation with no output schema, the description covers prerequisites, eligibility, targeting, safety profile, execution order, and how to read the per-host report including the failure reasons. An agent has everything needed to decide and call correctly.

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 already 100%, so the baseline is 3; the description adds real selection guidance on top, notably that node_id is preferred over node_name, that include_bastion combines with either the single-node or all_nodes form, and that revert removes both files. It does not, however, explain cluster_id vs cluster_name resolution beyond the schema's own optionality note.

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 (write or remove Ankra's node OS update policy) plus the exact scope (existing nodes and bastion of an Ankra-provisioned cluster, over SSH through the bastion). It draws a hard boundary against the obvious misreading with 'It does NOT run arbitrary commands - only this fixed write or its removal,' which separates it from siblings like apply_manifest or run_os_patches.

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?

Gives explicit targeting rules (include_bastion with node_id/node_name/all_nodes, at most 100 per run) and explicit exclusions (not for imported or managed-Kubernetes clusters, not Scaleway). It also states the prerequisite gate — apply is refused unless the OS patch policy is enabled via set_os_patch_policy, while revert is always allowed — and names the sibling tool that lifts that gate.

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.