Skip to content

Conversation

@gunpal5
Copy link

@gunpal5 gunpal5 commented Jul 25, 2025

Added three powerful new MCP tools for comprehensive class and type analysis, with intelligent reference-based
type resolution to handle complex codebases with duplicate type names.

🔧 New Tools Added

  1. get_class_members
  • Purpose: Extract all properties and methods from a class with their types and signatures
  • Parameters:
    • file_path: Path to the file containing the class
    • class_name: Name of the class to analyze
  • Features:
    • Supports hierarchical DocumentSymbol format
    • Returns detailed member information including types and positions
    • Handles both properties and methods with full signature details
  1. get_method_signature
  • Purpose: Analyze method signatures with comprehensive parameter and return type information
  • Parameters:
    • file_path: Path to the file containing the method
    • method_name: Name of the method to analyze
    • class_name (optional): Class containing the method for scoped search
  • Features:
    • Uses LSP hover information for accurate type extraction
    • Returns complete signature with parameter names and types
    • Includes return type information
    • Reference-based type resolution: When multiple types with the same name exist, filters by checking which
      definition has references at the method location
  1. search_type
  • Purpose: Workspace-wide symbol search with wildcard support and intelligent filtering
  • Parameters:
    • type_name: Symbol name or pattern (supports * and ? wildcards)
    • type_kind (optional): Filter by symbol kind (class, interface, enum, method, function, etc.)
  • Features:
    • Case-insensitive search by default
    • Wildcard pattern matching (method, getValue, ?etData)
    • Multi-server querying across all configured LSP servers
    • Symbol kind fallback when exact matches aren't found
    • Workspace indexing awareness

🎯 Impact

These tools transform cclsp from a basic LSP bridge into a powerful code analysis platform, enabling:

  • Detailed class structure analysis
  • Intelligent method signature extraction
  • Workspace-wide type discovery
  • Reference-aware type disambiguation
  • Enhanced IDE integration capabilities

Gunpal Jain added 4 commits July 24, 2025 01:06
- Added tree-sitter integration for method parameter and return type parsing.
- Enhanced `uriToPath` utility to handle malformed Windows paths.
- Improved error handling for file scanning and hover info retrieval.
- Updated `TypeInfo` and `ParameterInfo` types with richer details, including definition locations.
- Adjusted tests for better mocking and reliability.
@gunpal5
Copy link
Author

gunpal5 commented Jul 26, 2025

Looks like owner has already abandoned this project. Should I publish my fork separately?

@amxv
Copy link

amxv commented Aug 1, 2025

@gunpal5 please do. looks like the readme isn't accurate for the tools/params as well, if you could fix that and publish your own npm package I'd happily use it :)

@ktnyt
Copy link
Owner

ktnyt commented Aug 4, 2025

I apologize my lack of activity on the project. I wasn't expecting much activity here TBH.

@gunpal5 Could you resolve the conflicts that resulted from another PR merge? I'll take a look at the changes in the meanwhile.

@amxv
It'd be great if you can point out the errors in documentation via a GitHub issue if possible, although I'll try to have claude code fix that.

@ktnyt
Copy link
Owner

ktnyt commented Aug 16, 2025

@gunpal5 Hi just a reminder in case you've been busy for the past few weeks!
I can reverse import the changes from your repo and apply the changes myself if that's fine with you. Your contribution will be acknowledged but lost from git's perspective so if you'd like to be identified as a contributor by GitHub it will be great if you can fix the conflicts so I can merge this PR!

@ktnyt ktnyt force-pushed the main branch 3 times, most recently from fd0a7f9 to 7f8cfca Compare August 22, 2025 12:29
@gunpal5
Copy link
Author

gunpal5 commented Aug 25, 2025

Hi, sorry, I will look into this as soon as possible.

@ktnyt
Copy link
Owner

ktnyt commented Aug 28, 2025

No worries! I think there's quite a bit of resolution to do so take your time!

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.

3 participants