Skip to main content
Glama
JEFF7712

nix-agent

by JEFF7712

diff

Build a new system closure, compare it with the running one to report package additions, removals, and version changes, then switch unless preview mode is set.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNonixos
flake_uriNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. The description discloses a critical behavioral trait: the tool not only computes a diff but also switches the system to the new closure unless the user only wants a preview. However, it does not detail the side effects of switching (e.g., reversibility, downtime, permission requirements), which would be valuable for an agent to understand the impact. This is a moderate disclosure, so a 3 is given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that packs in the purpose, method, and usage conditions without redundancy. It is reasonably concise, though slightly dense, but every part contributes to understanding the tool. It earns a 4 for efficiency and lack of fluff.

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?

Given that an output schema exists, return values need not be described. The description covers the main action and the switch behavior, but it lacks parameter semantics and does not explain the 'mode' or 'flake_uri' context. For a tool with only 2 optional params, this is a moderate gap, so a 3 is appropriate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description does not mention the parameters 'mode' or 'flake_uri' at all. The schema defines them with types and defaults, but without any semantic context in the description, an agent must infer their meaning from the names alone. This is a significant gap because the description should compensate for the lack of schema documentation, but it does not.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'diff' the 'new closure' against the running system. It also mentions the key content of the diff (package additions, removals, version changes), which clarifies what the tool does. While it doesn't name sibling tools explicitly, the mention of 'switch' and 'check' as actions gives context that helps distinguish it from related operations.

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

Usage Guidelines4/5

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

The description gives clear context for when to use this tool: when the user wants a diff and potentially a switch. It also specifies an exclusion condition: 'unless the user asked only to preview or check', which tells the agent when not to perform the switch. This is more than implied usage but less than naming explicit alternative tools, so a 4 is appropriate.

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