Skip to main content
Glama
JEFF7712

nix-agent

by JEFF7712

switch

Activate NixOS or Home Manager configurations with rollback tracking, returning a summary of changed units, derivations, and systemd health. Optionally validate with a dry-build first.

Instructions

Activate the configuration (sudo -n nixos-rebuild switch / home-manager switch). Records rollback_generation first. Returns a structured 'summary' (units changed, derivations built, package delta, systemd health) plus gen before/after; on success the raw log is trimmed to a tail (pass full_log=True for all of it). Status is 'degraded' when activation succeeded but units newly failed. No implicit validation by default; pass validate=True to gate on check('dry-build') first. On a sudo auth failure returns a 'privilege' diagnosis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNonixos
full_logNo
validateNo
flake_uriNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv0.5.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full disclosure burden and meets it thoroughly: it discloses the side effect of recording rollback_generation first, the 'degraded' status semantics when units newly fail, log-tail trimming on success, and the 'privilege' diagnosis on sudo auth failure. These are exactly the behavioral traits an agent cannot infer from the schema.

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?

Six sentences, each carrying a distinct fact: purpose, rollback recording, structured summary return, log trimming, degraded status, validation behavior, and privilege error handling. There is no filler and no repetition of schema defaults, making the density of useful information exceptionally high.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists, the detailed return-format description is a bonus rather than a necessity, and the description covers side effects, status semantics, validation behavior, and error edge cases. The main gap is flake_uri, whose interaction with mode (e.g., which flake to activate from) is undocumented in both schema and description. Slightly less complete than the rest of the definition.

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 0%, so the description must compensate — and it does for three of four parameters: full_log (tail trimmed unless True), validate (gates on check('dry-build')), and mode (via the nixos-rebuild vs home-manager switch pairing). However, flake_uri is never mentioned, leaving its semantics entirely to inference. This is strong partial compensation for a fully undocumented schema.

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 opening verb 'Activate' names the precise operation — deploying the configuration as the active generation — and the parenthetical '(sudo -n nixos-rebuild switch / home-manager switch)' pins down the exact underlying commands. This clearly differentiates it from siblings like build, check, and diff, none of which activate a new generation.

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

Usage Guidelines3/5

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

The description gives some routing context by referencing check('dry-build') as the pre-activation validation gate and by implying this is the activation step in a workflow. However, it never explicitly states when to prefer this over build or diff, nor does it give a when-not-to-use condition. Guidance is largely implicit rather than explicit.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JEFF7712/nix-agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server