Commit f51f32c
committed
feat: Add context awareness and intelligent improvements to MCP tools
Based on Claude Code Task feedback, this commit implements major improvements:
Context Awareness:
- Add NixOSContext class to track state between tool calls
- Tools can now reference previous search results (e.g., show(1) for first result)
- versions() and compare() can use context when package name omitted
- install() auto-detects appropriate installation method
User Experience:
- Add concise parameter to reduce output verbosity for experienced users
- Deduplicate search results and group multiple versions of same package
- Improve error messages with 'did you mean' suggestions
- Better which() tool accuracy with query prioritization
Code Quality:
- Add comprehensive test suite (376 tests total)
- Standardize output formatting with format_output() function
- Update CLAUDE.md with code quality commands
- Fix linting issues (ruff check passes)
These changes make the MCP tools significantly more intelligent and user-friendly,
reducing repetitive typing and providing helpful suggestions when things go wrong.1 parent eaca02d commit f51f32c
File tree
5 files changed
+903
-144
lines changed- mcp_nixos
- tests
5 files changed
+903
-144
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
71 | 86 | | |
72 | 87 | | |
73 | 88 | | |
| |||
0 commit comments