Skip to main content
Glama

Evaluate Nix Value

eval
Idempotent

Inspect Nix values without building results, supporting flake attributes, expressions, files, typed function arguments, raw text, and JSON output for quick evaluation.

Instructions

Inspect a Nix value without building its result. Supports flake attributes, expressions, files, typed function arguments, raw text, and JSON.

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": "eval"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory under an MCP workspace root.
rawNo
fileNo
jsonNo
applyNo
coresNo
impureNo
systemNo
maxJobsNo
offlineNo
refreshNo
buildersNo
argumentsNo
showTraceNo
expressionNo
installableNo
overrideInputsNo
printBuildLogsNo
timeoutSecondsNo
stringArgumentsNo
acceptFlakeConfigNo

Output Schema

NameRequiredDescriptionDefault
runIdYes
statusYes
outputsYes
summaryYes
diagnosticsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior3/5

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

The description adds one genuinely useful behavioral fact beyond the annotations: evaluation stops short of realising/building the result. However, it omits side effects an agent should know about for an openWorldHint=false-readOnly tool with 21 knobs: network fetching, impure/offline/refresh semantics, and that arbitrary Nix code runs during evaluation. It does not contradict readOnlyHint=false since inspecting a Nix value does execute code, but the gap leaves the safety picture partly to the annotations.

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?

Two short sentences, front-loaded with the core behavior before the capability list. No filler, though the enumerated modes are compressed enough that they read as keywords rather than guidance.

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?

An output schema exists, so return values need not be explained, and annotations cover the safety profile. For a 21-parameter tool with 5% schema coverage and a nested overrideInputs object, the description is still too thin on how the major parameter groups are meant to be combined (e.g. expression vs installable vs file).

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 only 5%, so the description carries most of the burden for 21 parameters, yet it clarifies almost none. The listed input forms loosely map to installable, expression, file, arguments, raw, and json, but there is no meaning added for impure, offline, refresh, acceptFlakeConfig, overrideInputs, timeoutSeconds, maxJobs, or apply.

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?

States a specific verb and resource ("Inspect a Nix value") plus a key scope qualifier ("without building its result"), and enumerates the supported input forms (flake attributes, expressions, files, arguments, raw text, JSON). This distinguishes it from build/run siblings by implication, but no sibling is named explicitly, so differentiation is left to inference.

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?

"Without building its result" indirectly signals when to prefer this over build or run, but the description never says so directly and never excludes when-not to use it. With siblings such as build, run, check, and flake_inspect available, the agent must guess which one fits a given intent.

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