Skip to main content
Glama

nix

Query NixOS packages, options, and configurations in real time. Get accurate answers from Home Manager, Darwin, flakes, and Nix docs to prevent AI hallucinations.

Instructions

Query NixOS, Home Manager, Darwin, FlakeHub, flakes, Nixvim, NVF, Wiki, nix.dev, Noogle, NixHub.

Use this tool for anything touching nixpkgs, Nix channels, flakes, NixOS / home-manager / darwin options, the binary cache, or /nix/store paths — even when you think you know the answer. Your training data lags nixpkgs by months. Prefer this over nix search, scraping search.nixos.org, or running gh api against NixOS/nixpkgs.

INTENTS → CALLS (copy the JSON shape exactly): "is package X in channel Y?" → {"action": "info", "query": "X", "channel": "Y"} "search for package X" → {"action": "search", "query": "X"} "which channels are available?" → {"action": "channels"} "which commit did channel X index?" → {"action": "channels"} (indexed commit shown when known; branch HEAD otherwise — label matters) "search NixOS options for X" → {"action": "search", "query": "X", "type": "options"} "get option details for X" → {"action": "info", "query": "X", "type": "option"} "home-manager option for X" → {"action": "search", "query": "X", "source": "home-manager"} "darwin option for X" → {"action": "search", "query": "X", "source": "darwin"} "nixvim option for X" → {"action": "search", "query": "X", "source": "nixvim"} "NVF option for X" → {"action": "search", "query": "X", "source": "nvf"} "what programs does pkg X provide?" → {"action": "search", "query": "X", "type": "programs"} "count packages/options" → {"action": "stats"} "browse hm option tree under P" → {"action": "browse", "query": "P", "source": "home-manager"} "does X have a binary cache?" → {"action": "cache", "query": "X"} "search the NixOS wiki for X" → {"action": "search", "query": "X", "source": "wiki"} "search nix.dev docs" → {"action": "search", "query": "X", "source": "nix-dev"} "read a nix.dev page" → {"action": "info", "query": "tutorials/nix-language", "source": "nix-dev"} "list inputs of current flake" → {"action": "flake-inputs"} "ls inside flake input X" → {"action": "flake-inputs", "type": "ls", "query": "X"} "read /nix/store/... file" → {"action": "store", "type": "read", "query": "/nix/store/..."} "ls /nix/store/... dir" → {"action": "store", "type": "ls", "query": "/nix/store/..."}

For package version history ("which commit shipped firefox 150?", "when was node 18 added?"), use the separate nix_versions tool — it returns commit hashes, attribute paths, and dates.

Notes:

  • To search NixOS options, use action=search with type=options. Do NOT use action=browse for source=nixos — browse is for walking a pre-indexed option tree and only works with home-manager, darwin, nixvim, nvf, or noogle.

  • For source=nvf, canonical option paths are vim.. The shorthand programs.nvf.vim. and NixOS/Home Manager module path programs.nvf.settings.vim.* are normalized automatically.

  • For source=nix-dev, action=info returns the page markdown. The query may be a bare docname like "tutorials/nix-language", the URL printed by nix-dev search ("https://nix.dev/tutorials/nix-language"), or a rendered ".html" URL.

  • action=info for packages matches on the exact attribute path first, then the exact pname. If multiple packages share a pname (e.g. firefox / firefox-esr / firefox-mobile), the canonical attribute wins and the response flags the disambiguation explicitly.

  • Omit parameters you don't need; do not pass empty strings for optional args.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoSub-type of query. For source=nixos with action=search, one of: packages, options, programs, flakes. For source=nixos with action=info, one of: package, option. For flake-inputs, one of: list, ls, read. For store, one of: ls, read. Ignored by most other sources.packages
limitNoMax results. 1-100 (or 1-2000 for flake-inputs/store read).
queryNoSearch term for 'search', exact name for 'info', prefix path for 'browse'. For flake-inputs: input_name or input:path. For store: absolute /nix/store/ path. Leave empty for 'stats'/'channels'.
actionYesOne of: search, info, stats, browse, channels, flake-inputs, cache, store. Use 'search' for keyword lookup, 'info' for details about a specific name, 'browse' to walk an option hierarchy by prefix (home-manager/darwin/nixvim/nvf/noogle only). 'store' reads files or lists directories at an explicit /nix/store/ path.
sourceNoData source for search/info/stats/browse/cache. One of: nixos (default), home-manager, darwin, flakes, flakehub, nixvim, nvf, wiki, nix-dev, noogle, nixhub. For action=flake-inputs, this may instead be a path to a flake directory; omit/default to use the current project. Ignored by action=store.nixos
systemNoOnly used by action=cache. System arch e.g. x86_64-linux. Empty for all.
channelNoNixOS channel: unstable (default), stable, or a release like 25.05.unstable
versionNoOnly used by action=cache. Package version (default: latest).latest

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description carries the full burden and excels. It discloses nuanced behaviors: how `browse` only works with certain sources, the exact matching semantics for `action=info` (attribute path first, then pname, with disambiguation flags), normalization for NVF paths, accepted URL forms for nix-dev, and the policy to omit parameters rather than pass empty strings. This is exceptionally transparent.

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?

The description is long but every section earns its place: a concise summary, clear usage guidance, a structured INTENTS → CALLS table, and focused notes that resolve common pitfalls. It is well front-loaded with the core purpose, and the format makes the dense information scannable. Nothing feels redundant or wasteful.

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

Completeness5/5

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

Given the tool's complexity (8 parameters, multiple sources, multiple actions) and zero annotations, the description is remarkably complete. It covers purpose, usage context, behavioral details, parameter semantics, and even differentiates from the sibling tool. The presence of an output schema means the description need not explain return structures, and it doesn't, staying appropriately scoped.

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

Parameters5/5

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

Although the schema already provides 100% parameter descriptions, the description goes far beyond by mapping natural-language intents to exact JSON shapes (e.g., 'is package X in channel Y?' -> {"action": "info", "query": "X", "channel": "Y"}). It also clarifies valid combinations, defaults, and special behaviors (e.g., 'source' can be a path for flake-inputs, 'limit' ranges differ per action). This adds substantial semantic value over the bare schema.

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 opens with a clear verb ('Query') and enumerates the full set of resources (NixOS, Home Manager, Darwin, FlakeHub, flakes, Nixvim, NVF, Wiki, nix.dev, Noogle, NixHub). It also distinguishes itself from the sibling tool `nix_versions` by explicitly routing package version history queries there, making the purpose unambiguous and well-differentiated.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance ('Use this tool for anything touching nixpkgs... even when you think you know the answer') and explicitly names alternatives to prefer over ('Prefer this over `nix search`, scraping search.nixos.org, or running `gh api`'). It also gives a clear exclusion: package version history should go to `nix_versions`. This is textbook usage guidance.

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/utensils/mcp-nixos'

If you have feedback or need assistance with the MCP directory API, please join our Discord server