Skip to content

Add LSP Find References tool to @pleaseai/dora #28

Description

@amondnet

Summary

Add lsp_references MCP tool to the @pleaseai/dora package that finds all usages/references of a symbol at a given position using the Language Server Protocol.

  • Leverage existing LSPManager.references() from @pleaseai/code-lsp
  • Follow existing LSP tool patterns in packages/dora/src/providers/lsp/index.ts
  • Support include_declaration optional parameter

Tasks

  • T001 [P] Add lsp_references tool definition to LSP_TOOLS array
  • T002 Add handleReferences handler method
  • T003 Add case to callTool switch for lsp_references
  • T004 [P] Add unit test for lsp_references tool
  • T005 Update CLAUDE.md documentation

Acceptance Criteria

  • lsp_references tool available via MCP
  • Returns correct reference locations from LSP servers
  • Handles empty results with user-friendly message
  • Handles relative and absolute file paths
  • Unit tests pass

Additional Context

This feature extends the LSP integration in the Dora MCP server to support finding symbol references, which is useful for code navigation and understanding code dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lspp2Priority 2 - Mediumtype:featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions