Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: standardize tools, improve workspace detection, and enable Homebrew support#12

Merged
doITmagic merged 20 commits intodevfrom
fix/strict-file-path-and-installer
Feb 3, 2026
Merged

feat: standardize tools, improve workspace detection, and enable Homebrew support#12
doITmagic merged 20 commits intodevfrom
fix/strict-file-path-and-installer

Conversation

@doITmagic
Copy link
Owner

Description

This PR introduces major stability and consistency improvements to the RagCode MCP server, focusing on AI agent experience and release automation.

Key Changes:

  • Tool Standardization: All tools now use the rag_ prefix (e.g., rag_search_code, rag_evaluate) to ensure a clear namespace and avoid name conflicts in IDEs.
  • Mandatory Context: Mandatory file_path parameter for all tools, ensuring accurate project root and language detection, eliminating "workspace not found" errors.
  • Improved Detection via MCP Roots: Integrated automatic sync of open directories in Cursor/VS Code (MCP Roots) and implemented new heuristics for language inference.
  • AI Feedback Tool: Added the rag_evaluate tool, allowing AI assistants to provide qualitative feedback on system performance and indexed code quality.
  • Release Automation & Homebrew:
    • Unified GoReleaser configuration into a single canonical file.
    • Added support for Homebrew Tap (doITmagic/homebrew-tap) for native installation and simplified updates on macOS.
    • Cleaned up the repository by removing compiled binaries and redundant files.
  • Documentation Overhaul: Complete revision of README.md, QUICKSTART.md, and technical schemas (tool_schema_v2.md) to reflect the 10 available tools and the "Golden Rule" of RAG usage.
  • Health Checks: Mandatory verification of AI model presence in Ollama during server startup.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update

Checklist:

  • I have performed a self-review of my own code
  • I have formatted my code with go fmt ./...
  • I have verified integration with Ollama/Qdrant
  • I have updated the documentation accordingly

- Standardized workspace detection error handling across all tools
- Removed unsafe CWD fallback in workspace detection to prevent scanning home directory
- Added modern framework markers (Vite, Next.js, Tailwind, etc.) for better root detection
- Improved language detection using file counting heuristics
- Expanded supported file extensions for web frameworks, scripting, and config files
- Implemented MCP Initialized and RootsListChanged handlers to sync workspace folders from Cursor/VSCode
- Added AddWorkspaceRoots to Manager for bulk registration of roots
- Injected dynamic 'Instructions' capability to guide AI to use file_path
- Updated all tool descriptions with file_path usage hints
- Improved workspace detection error messages with context-aware guidance
Copilot AI review requested due to automatic review settings February 3, 2026 15:38
@doITmagic doITmagic self-assigned this Feb 3, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces major standardization and usability improvements to the RagCode MCP server by adding a consistent rag_ prefix to all tools, enhancing workspace detection with MCP Roots integration, and enabling Homebrew distribution support.

Changes:

  • Renamed all 9 existing MCP tools with rag_ prefix for better namespacing (e.g., search_coderag_search_code)
  • Added new rag_evaluate tool for AI assistants to provide qualitative feedback on system performance
  • Enhanced workspace detection with fallback logic for single-workspace scenarios and MCP Roots synchronization
  • Expanded language detection support to include Vue, Svelte, Shell, SQL, CSS, Markdown, YAML, JSON, and TOML
  • Unified GoReleaser configuration (.goreleaser.yml → .goreleaser.yaml) with Homebrew tap support
  • Updated all documentation, examples, and IDE integration files to reflect new tool names
  • Improved health check functionality to verify required Ollama models at startup

Reviewed changes

Copilot reviewed 42 out of 45 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
server.json Updated version to 1.1.21 and renamed all 10 tools with rag_ prefix
llms.txt, llms-full.txt Updated tool documentation with new names and added rag_evaluate
internal/workspace/manager.go Added workspace registry, MCP Roots integration, and fallback detection
internal/workspace/language_detection.go Expanded language support and added count-based detection
internal/workspace/detector.go Added markers for modern frameworks (Next.js, Vite, Deno, etc.)
internal/workspace/watcher.go Reduced file watcher debounce delay from 5s to 1s
internal/tools/*.go Renamed all tools with rag_ prefix and updated descriptions
internal/tools/evaluate_ragcode.go New tool for AI self-evaluation and feedback collection
internal/healthcheck/healthcheck.go Added model verification to health checks
cmd/rag-code-mcp/main.go Integrated MCP Roots handlers and updated tool schemas
.goreleaser.yaml Added index-all build and Homebrew tap configuration
.goreleaser.yml Removed in favor of .yaml extension
docs/*.md Comprehensive documentation updates for new tool names
README.md, QUICKSTART.md Updated quickstart guides and tool references
IDE configuration files Updated all .cursorrules, .windsurfrules, etc. with new names

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 44 out of 47 changed files in this pull request and generated 10 comments.

…x startup health checks

- Implemented generic analyzer for basic language support (Vue, Svelte, Shell, etc.)
- Added pro-active AI warnings for workspace detection fallbacks in all search tools
- Made startup health checks (Ollama/Qdrant/Models) fatal to prevent silent failures
- Improved rag_evaluate tool with better logging and resilient workspace detection
- Updated README with language support levels and technical details
…or unknown types

- Resolves TestAnalyzerManager_CodeAnalyzerForProjectType_Unknown failure
- Maintains generic analyzer support for Vue, Svelte, CSS, Shell, SQL, and Bash
- Aligns with expected semantics for unimplemented languages like Rust and Java
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 48 out of 51 changed files in this pull request and generated 11 comments.

… flow

- Workspace: Decoupled detection from registration; added RegisterWorkspace and DetectAndRegisterWorkspace helper for Separation of Concerns.
- Performance: Added JIT analysis caching for rag_find_type_definition (Go/Python) to reduce re-parsing overhead.
- Search: Optimized default search limit to 5 results for rag_search_code and rag_hybrid_search to save tokens.
- Stability: Improved Ollama model name matching to handle tags like ':latest' robustly.
- Analyzers: Allowed indexing of 'public' and 'tmp' directories in generic and HTML analyzers to capture source code in assets.
- Release: Made Homebrew tap update conditional on token presence to prevent CI failures.
- Server: Added warning logs for unsupported URI schemes and fixed Windows path handling for MCP roots.
- Docs: Clarified rag_evaluate parameters and updated configuration warnings.
@doITmagic doITmagic force-pushed the fix/strict-file-path-and-installer branch from 4cc6191 to 53bf7a5 Compare February 3, 2026 16:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 50 out of 53 changed files in this pull request and generated 9 comments.

Comments suppressed due to low confidence (1)

.goreleaser.yml:1

  • The PR description mentions "Cleaned up the repository by removing compiled binaries and redundant files" but the .goreleaser.yml file shown in the diff appears to be completely deleted (110 lines removed). While this is intentional (consolidating into .goreleaser.yaml), it would be helpful to note in the PR description that the old .goreleaser.yml was removed in favor of the canonical .goreleaser.yaml file to avoid confusion about whether this was accidental.

- tools: enforce mandatory 'file_path' in context-aware tools (search_docs, list_exports, get_function)
- tools: implement robust JIT caching with TTL and eviction in find_type_definition
- healthcheck: fix variable shadowing in model verification loop
- main: correct Windows path normalization to handle lowercase drive letters
- config: align default search limit to 5
- ragcode: use consistent Language constants and improve error handling in generic analyzer
- workspace: whitelist 'public' directory for better asset indexing
@doITmagic doITmagic merged commit e6b52a7 into dev Feb 3, 2026
2 checks passed
@doITmagic doITmagic deleted the fix/strict-file-path-and-installer branch February 3, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant