nix-agent
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| buildA | Build the full system/HM closure without activating it. Returns the output store path; a failed build carries failed_derivation{drv, log_tail}. |
| diffB | Build the new closure and diff it against the running system (nvd, falling back to nix store diff-closures): package additions, removals, version changes. Include the changeset in the reply and switch unless the user asked only to preview or check. |
| switchA | 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. |
| generationsA | action='list': enumerate system/HM generations with dates and current marker. NixOS entries include path when the profile link exists. action='rollback': revert to the previous generation, or pass generation= to activate that generation. Bare rollback is previous-only. Pass mode='home-manager' for HM generations. |
| eval_configA | Evaluate the final merged value of an attribute in the user's actual NixOS/Home Manager configuration via |
| locate_optionA | Where does this configuration set an option: files declaring it and every file defining it, with each contributed value (e.g. attr='services.openssh.enable'). The bridge from mcp-nixos discovery to editing the right file. For integrated Home Manager, query the NixOS config with attr='home-manager.users..'. |
| checkA | Validation ladder for the configuration, fast to slow: level='lint' (statix+deadnix; returns a structured findings list), 'dry-build' (evaluate and plan the closure build), 'dry-activate' (NixOS only, shows what activation would change). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool has a distinct primary purpose, but diff overlaps with build, switch, and check because it can both build and activate. check's dry-build also partially overlaps with diff's preview behavior, though the descriptions do clarify the intended use cases.
The naming is readable and all lowercase, but it mixes bare verbs (diff, build, switch, check), a noun (generations), and verb_noun pairs (eval_config, locate_option). There is no single consistent pattern across the set.
Seven tools is well-scoped for a NixOS/Home Manager agent. Each tool covers a meaningful part of the configuration lifecycle without unnecessary redundancy or bloat.
The surface covers the core workflow: build, switch, diff, validate, rollback, evaluate config values, and locate option definitions. This is a complete enough set for practical system configuration management, with no obvious dead ends.