Skip to main content
Glama
JEFF7712

nix-agent

by JEFF7712

apply_patch_set

Applies file replacements and formats Nix files, then validates and switches NixOS or Home Manager configurations. Returns a rollback generation to undo if needed.

Instructions

Write a set of file replacements, format any .nix files, and—if flake_uri is provided—validate then switch. mode='nixos' (default) runs nixos-rebuild dry-activate then switch (sudo). mode='home-manager' runs home-manager build then switch (no sudo). Returns rollback_generation so a bad switch can be undone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patch_setYes
flake_uriNo
modeNonixos

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description covers key behavioral traits: syntax for patch sets, conditional validation/switch based on flake_uri, sudo requirements per mode, and return of rollback_generation. It does not detail failure handling or side effects, but is thorough overall.

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?

Two sentences with a clear front-loaded purpose. Every piece of information is relevant and efficiently conveyed without redundancy.

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

Completeness3/5

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

The description covers the main workflow and return value (rollback_generation) and modes, but lacks details on patch_set path semantics, content encoding, or error handling. While an output schema exists, the description could still be more complete for a complex nested parameter.

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 coverage is 0%, so description must compensate. It clarifies flake_uri (optional, triggers validation) and mode (default 'nixos' with sudo, home-manager without). However, patch_set is only mentioned as 'file replacements' without explaining the meaning of path or content, leaving ambiguity.

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 clearly states the action: write file replacements, format .nix files, and optionally validate/switch. It distinguishes from the sibling inspect_state by being a write/modify tool.

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 explains when to use different modes (nixos vs home-manager) but does not explicitly compare to the sibling tool inspect_state or state when not to use this tool. The guidelines are context-specific but lack exclusion criteria.

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