Skip to main content
Glama
nix-agent

nix-agent

by JEFF7712

diff

Compare a built NixOS closure against the running system or a specified closure to list package additions, removals, version changes, and closure size; use the changeset to preview or apply a switch.

Instructions

Build the new closure (or reuse an existing store_path from build()) and diff it against the running system or an explicit against closure (nvd, falling back to nix store diff-closures): package additions, removals, version changes as structured packages plus closure_size; the raw diff text only when it does not parse. Include the changeset in the reply and switch unless the user asked only to preview or check. For hosts requiring coordinated fleet deployment, use the repository's deployment orchestrator.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNonixos
againstNo
flake_uriNo
store_pathNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.15.0
    • addedInput schema / properties / against
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / store_path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. Addedv0.5.0

TDQS

A4.1/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 behavioral burden and does so well: it discloses the build/reuse behavior, nvd with fallback to nix store diff-closures, structured output plus closure_size, raw text only when parsing fails, changeset inclusion, and the switch side effect unless previewing or checking. It also flags the fleet-deployment alternative.

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 front-loaded with the primary build-and-diff action and contains no obvious filler. It is dense and somewhat run-on, especially the parenthetical fallback and output details, but it remains efficient.

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 behavioral picture is rich enough for a complex mutation-capable tool, and the output schema covers return structure. However, with 0% schema coverage and four parameters, the missing explanations for mode and flake_uri leave an agent without enough guidance to choose those inputs confidently.

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%, so the description must compensate for all four parameters. It only partially clarifies store_path (reuse from build()) and against (explicit closure), and does not explain mode or flake_uri at all.

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 states a specific verb and resource: build a new closure or reuse a store_path from build(), then diff it against the running system or an explicit against closure. It distinguishes the tool from siblings by noting reuse from build(), preview/check exceptions, and the deployment orchestrator alternative for fleet hosts.

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?

It gives clear conditions: reuse store_path from build(), diff against running system or explicit against closure, use the orchestrator for coordinated fleet deployment, and switch unless the user asked only to preview or check. The guidance is strong, though the preview/check path could name the relevant sibling more explicitly.

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