claude-code - 💡(How to fix) Fix [BUG] LSP (clangd) tool's workspaceSymbol operation can't pass a query string — schema is missing the parameter [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54667Fetched 2026-04-30 06:39:21
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2closed ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

▎ The LSP tool exposes a workspaceSymbol operation documented as "Search for symbols across the entire workspace", but the schema accepts only filePath, line, character ▎ (with additionalProperties: false). LSP's workspace/symbol request requires a query: string parameter — there's no way to pass it through the wrapper. ▎ ▎ Behaviorally, the cursor line/character is completely ignored — output is byte-identical regardless of cursor position, returning ~100 alphabetical symbols (mostly ▎ stdlib / OpenCV / Eigen / gtest), hiding any user code symbols. ▎ ▎ All other LSP operations (goToDefinition, findReferences, hover, documentSymbol, incomingCalls etc.) work as expected. ▎ ▎ Suggested fix: add query: string to the schema for workspaceSymbol (and ideally make line/character optional for that operation since they have no role).

What Should Happen?

claude should be able to query (fuzzy search) clangd workspaceSymbol

Error Messages/Logs

Steps to Reproduce

ask claude to use clangd workspaceSymbol

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.123 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

No response

extent analysis

TL;DR

Update the schema for the workspaceSymbol operation to include a query parameter and consider making line and character optional.

Guidance

  • Review the LSP tool's documentation and the Claude Code implementation to understand how the workspaceSymbol operation is currently handled.
  • Modify the schema to add a query parameter, allowing users to pass a search query to the workspaceSymbol request.
  • Consider updating the implementation to make line and character optional for the workspaceSymbol operation, as they are currently ignored.
  • Test the updated implementation to ensure it correctly handles the new query parameter and returns the expected results.

Example

No code snippet is provided as the issue does not contain sufficient implementation details.

Notes

The suggested fix is based on the information provided in the issue and may require additional modifications to the Claude Code implementation.

Recommendation

Apply workaround: Update the schema to include the query parameter, as this is a necessary change to fix the reported issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING