Skip to content

Conversation

@netbrah
Copy link

@netbrah netbrah commented Nov 7, 2025

This pull request adds a new incoming_calls tool to the MCP server, which enables users to find all callers of a function or method throughout the codebase. It includes a robust implementation for Go, comprehensive integration tests, and updates to documentation and snapshots to support this new functionality.

New Tool Implementation:

  • Added the incoming_calls tool to the MCP server, allowing users to find all callers of a specified function or method. The tool is registered in tools.go and exposes a symbolName parameter for specifying the target symbol.
  • Implemented the core logic for finding incoming calls in internal/tools/incoming-calls.go, including symbol resolution, call hierarchy queries, grouping results by file, and context-aware output formatting.

Testing and Snapshots:

  • Created comprehensive integration tests in integrationtests/tests/go/incoming_calls/incoming_calls_test.go to validate the tool’s behavior for various symbol types and scenarios (multiple callers, single caller, method callers, and no callers).
  • Added snapshot files for test cases, documenting expected outputs for functions with multiple callers, single callers, method callers, and symbols with no callers. [1] [2] [3] [4]

Documentation:

  • Updated README.md to include the new incoming_calls tool in the list of available MCP server tools, with a description of its purpose.

Miscellaneous:

  • Cleaned up go.mod in the integration test workspace by removing unused dependencies.

Copilot AI and others added 5 commits November 7, 2025 03:07
Co-authored-by: netbrah <162479981+netbrah@users.noreply.github.com>
Co-authored-by: netbrah <162479981+netbrah@users.noreply.github.com>
Co-authored-by: netbrah <162479981+netbrah@users.noreply.github.com>
Add incoming_calls tool for LSP call hierarchy support
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