Skip to content

Conversation

@orsenkucher
Copy link
Contributor

Added Language Server Tools and Improved Output Format

Improvements:

  • Added new language server tools:
    • document_symbols: Hierarchical view of a file's structure
    • hover: Type information and documentation at cursor
    • rename_symbol: Rename variables, functions, and other symbols

Format Enhancements:

  • Improved symbol output with proper kind labels ([Function], [Struct], etc.)
  • Enhanced formatting with line number information
  • Smart scoping to show relevant parts of large files

@orsenkucher
Copy link
Contributor Author

you can go build a binary and use it directly in mcp to check if changes are appreciated

Copy link
Owner

@isaacphi isaacphi left a comment

Choose a reason for hiding this comment

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

Thanks for this!!

I've skimmed through it and I'll try it out as well. I appreciate your effort to make the outputs more useful, especially for large projects.

To be honest, as it stands, this codebase is a little shaky because different LSPs handle things wildly differently so I want to be careful with changes. Your PR comes at a good time because this repo has just moved up my priority list again.

@isaacphi
Copy link
Owner

For the future, if you submit smaller PRs with one feature each, I'll be able to merge them faster

@orsenkucher
Copy link
Contributor Author

@isaacphi True, smaller PRs for sure would be much more manageable. A lot of cleanup to be done with better modularization of common patterns. I was aiming for something that I'm happy to use today myself :) That's why it's a bit sporadic and code quality is something to improve, though it compiles and does the job very well in a large projects.
For now, I'd suggest trying it out and see if you like changes. I will work on resolving your notes and once we've reached common ground, we can look towards merging.

There is a simple python mcp client for testing without using actual Claude Code. For example you can build 2 binaries from your main and my branch and test them side by side.
I've tested it with gopls and rust-analyzer. I couldn't get it working correctly with TypeScript/tsserver, I could have broken compatibility or my tsserver setup was incorrect, something to check.

@isaacphi
Copy link
Owner

@orsenkucher sounds good! I'll check it out across a few other languages too. The development process is very cumbersome right now so I'm working on a test suite that runs on several LSPs and I'll check this out using that.

@isaacphi isaacphi mentioned this pull request Apr 24, 2025
@isaacphi
Copy link
Owner

@orsenkucher

I did some refactors to the codebase which meant it was easier for me to checkout some of the files from this branch into other branches instead of trying to deal with the conflicts here.
See:

I'd still like to incorporate like your document_symbols tool, but I'm thinking of expanding it to include some other information as well, and perhaps allowing it to be called on modules or several files at once to get a higher level overview.

I'm also not sure I understand the difference in the read-definition formatting that you changed. I still want to improve the formatting of the tool, but was there also a problem with information that the tool was showing originally?

I added integration tests with snapshots which make this repo a lot easier to develop for. You can take a look at
https://github.com/isaacphi/mcp-language-server/tree/main/integrationtests/fixtures/snapshots/rust
and the mock repo
https://github.com/isaacphi/mcp-language-server/tree/main/integrationtests/workspaces/rust

Rust isn't my area of expertise so I'd appreciate any feedback you have based on your experience with this tool for large rust projects.

Regardless, I'll close this PR for now. Thanks again for the contribution!

@isaacphi isaacphi closed this Apr 24, 2025
@orsenkucher
Copy link
Contributor Author

@isaacphi That's great job! I will look into repos shortly

zchee pushed a commit to zchee/mcp-language-server that referenced this pull request Aug 31, 2025
Add incoming_calls and outgoing_calls tools
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