Skip to main content
Glama

apply_node_os_policy

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).

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 past the annotations by naming the two files written, explaining that nothing restarts because apt/needrestart only read them at next run (safe on production), disclaiming arbitrary command execution, capping a run at 100 nodes, visiting hosts one at a time, and defining report semantics (verified true only when apt-config shows the policy in force; unreachable/apt-less hosts report false with a reason). This is consistent with readOnlyHint=false and destructiveHint=false.

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?

Information-dense and front-loaded with the purpose, but delivered as one long run-on paragraph with heavy nested parentheticals, mixing mechanism, prerequisites, reporting and exclusions. Almost every sentence earns its place, yet the lack of segmentation makes it harder to scan than it needs to be.

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 7-parameter, no-output-schema, SSH-driven mutation tool, the description covers everything needed: prerequisites (policy enabled), exclusions (imported/managed-K8s, Scaleway), target combinations, safety behaviour, and the shape and semantics of the returned per-host report. An agent could call this correctly without opening any other artifact.

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 100%, so the baseline is 3, but the description adds real meaning beyond the schema: node_id is preferred over node_name, all_nodes is capped at 100 per run, include_bastion can be combined with either a single node or all_nodes, and cluster_id/cluster_name are optional once a cluster is selected. It does not add format/syntax detail beyond that.

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 pair (write/remove) and specific resource (Ankra's node OS update policy, naming both files) on a specific target scope (existing nodes and bastion of an Ankra-provisioned cluster, over SSH via the bastion). It explicitly distinguishes itself from neighbours like set_os_patch_policy and run_os_patches, and rules out imported/managed-Kubernetes and Scaleway clusters.

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 applicability and refusal conditions: apply is refused unless the cluster's OS patch policy is enabled via set_os_patch_policy, while revert is always allowed. It also explains the concrete failure mode avoided (Ubuntu's daily unattended upgrade restarting systemd-networkd on all nodes) and the target-selection matrix (include_bastion, node_id/node_name, all_nodes).

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