diff --git a/internal/mcp/server.go b/internal/mcp/server.go index fbb8e0a..22874d6 100644 --- a/internal/mcp/server.go +++ b/internal/mcp/server.go @@ -149,6 +149,15 @@ func (s *Server) handleInitialize(req *Request) *Response { Name: "nixos-options", Version: "0.1.0", }, + Instructions: `NixOS Options MCP Server - Search and query NixOS configuration options. + +If the current project contains a flake.lock file, you can index the exact nixpkgs revision used by the project: +1. Read the flake.lock file to find the nixpkgs "rev" field +2. Call index_revision with that git hash to index options for that specific version + +Example: If flake.lock contains "rev": "abc123...", call index_revision with revision "abc123...". + +This ensures option documentation matches the nixpkgs version the project actually uses.`, } return &Response{ diff --git a/internal/mcp/types.go b/internal/mcp/types.go index 6cd9674..e80c398 100644 --- a/internal/mcp/types.go +++ b/internal/mcp/types.go @@ -51,6 +51,7 @@ type InitializeResult struct { ProtocolVersion string `json:"protocolVersion"` Capabilities Capabilities `json:"capabilities"` ServerInfo Implementation `json:"serverInfo"` + Instructions string `json:"instructions,omitempty"` } // Capabilities describes client or server capabilities.