Skip to content

feat: add CodeSignalsSearchTool for code-level repository search#28

Merged
NISH1001 merged 2 commits intodevelopfrom
feature/code-signals-search
Feb 5, 2026
Merged

feat: add CodeSignalsSearchTool for code-level repository search#28
NISH1001 merged 2 commits intodevelopfrom
feature/code-signals-search

Conversation

@rohit-sahoo
Copy link
Collaborator

Summary

Add CodeSignalsSearchTool as a fallback for searching repositories when README-based search (RepositorySearchTool) returns insufficient results. Searches actual source code content to find repos with minimal documentation.

What have I done

  • Added CodeSignalsSearchTool that searches LLM-extracted code signals (function names, class names, imports, code summaries)
  • Implemented _extract_summary() to extract only "Code Summary:" sections, significantly reducing context size
  • Added safety limits: max 6 results, default is 5
  • Integrated with existing MCP server via @mcp_tool decorator

How did I do

  • Tool calls /api/code_signals/search endpoint with hybrid search (vector + keyword)
  • Parses response and extracts summaries from code_signals field
  • Returns CodeSignalsHit objects with repo_id, repo_url, content, and score

How to test

# Run tests
uv run pytest tests/tools/code_search/test_code_signals_search.py

@rohit-sahoo rohit-sahoo requested a review from NISH1001 February 5, 2026 17:05
@NISH1001 NISH1001 merged commit be72982 into develop Feb 5, 2026
@NISH1001 NISH1001 deleted the feature/code-signals-search branch February 5, 2026 19:07
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.

2 participants