ChatGPTClaudeGrok / X / CursorGemini

DeepSeek Harness LSP Navigation: Four Query Recipes

Configuration & UsagePublished 2026-11-18Author: DeepSeek Plugin Market
DeepSeek HarnessDSH pluginLSPcode navigationdiagnostics
The DeepSeek Harness LSP tool exposes definitions, references, diagnostics, and symbols, with different input. Learn four recipes and handle LSP_UNAVAILABLE.

The LSP tool is not “universal code search”; it is four queries with different inputs: definition, references, diagnostics, and symbols. DeepSeek Harness places provider selection and the language-server subprocess behind ctx.lsp, so the tool schema stays stable when the provider changes (source). Use the recipes and the model moves from guessing code to querying it.

DeepSeek Harness: The LSP boundary

LSP returns what a language server already understands, not arbitrary text matches. It answers “where is this symbol defined,” “who references it,” “what diagnostics does this file have,” and “what symbols exist.” It does not replace grep for arbitrary strings. (source)

Two consequences:

  1. Input must be a position — definition and references need file and line/column; an imprecise position queries the wrong symbol.
  2. Results depend on indexing — files the server has not opened or indexed may return nothing.

Treating LSP as full-text search produces “the word exists but the query returns nothing.” That is the wrong query type; use grep for arbitrary strings.

LSP is also not a compiler. Diagnostics catch type errors and undefined symbols but do not cover every build problem; build failures still need compiler output.

DeepSeek Harness: Four queries and inputs

The input and output differ; read the table before writing a task. Compare (source):

QueryInputOutputAsk
DefinitionFile + positionDeclaration locationWhere is this function defined?
ReferencesFile + positionUse locationsWho calls it?
DiagnosticsFile or workspaceDiagnostic listWhat is wrong here?
SymbolsFile or workspaceSymbol listWhat symbols exist?

Definition and references depend on position, not name. A bare name does not tell the tool which same-named symbol you mean.

Diagnostics and symbols may work per file or per workspace, depending on the provider. Workspace queries can be slower but find cross-file issues.

All four return structured locations, ranges, and severities rather than prose, so the model can continue by reading files or editing code.

DeepSeek Harness: Where input comes from

Positions come from the current file, a search result, or a previous query. Three sources (source):

  1. The open file — the user or model already knows the file and cursor.
  2. Grep/search — find an occurrence, then query definition or references.
  3. An LSP result — a definition returns a new position for references or diagnostics.

The third enables chained queries: definition, then references at the declaration, then diagnostics. Chaining is more precise than asking “what is wrong with this project.”

Positions are line/column or character offsets; use the tool schema for the exact shape. Use paths inside the workspace so the language server can find the file.

If the position comes from another tool, check the base: some tools count from 0, some from 1. A wrong base lands on the adjacent symbol.

DeepSeek Harness: When no provider exists

Without a registered LSP provider, a query returns LSP_UNAVAILABLE, not an empty result. The catalog says the runtime requires a registered provider, such as stdio; without one, the query returns structured LSP_UNAVAILABLE rather than changing the schema (source).

The design keeps failures explainable: empty means “not found,” LSP_UNAVAILABLE means “capability unavailable.” They need different handling.

For LSP_UNAVAILABLE, check three things:

  1. Provider loaded — does the profile or bundle include an LSP provider?
  2. Language server present — can the provider start the server for this language?
  3. Project recognized — does the server support the file type and project layout?

Do not keep changing query arguments without a provider. Correct arguments cannot fix a missing capability.

DeepSeek Harness: Four navigation recipes

Four recipes cover most navigation tasks. Each gives how to ask and what to expect (source):

  1. Definition — “At src/index.ts, line 12, column 5, go to the definition of the symbol.” Expect a declaration file and position; an empty result means the position missed the symbol.
  2. References — “At the same position, list all references.” Expect use locations; filter tests and generated code if needed.
  3. Diagnostics — “Query diagnostics for src/index.ts.” Expect errors, warnings, and positions; no diagnostics does not mean no build problem.
  4. Symbols — “List the symbols in src/index.ts.” Expect functions, classes, variables, and positions; large files may truncate.

The shared move is “position first, scope second.” Locate one symbol, then widen to references or diagnostics; a workspace query first usually returns too much.

If a recipe returns empty, test a known symbol to confirm the capability, then check the input. Do not treat an empty result as “the code is fine.”

DeepSeek Harness: Four LSP checks

Verify in four steps, not with one query. Four checks (source):

  1. Capability — a known symbol's definition returns non-empty.
  2. Position accuracy — a same-named symbol does not resolve to the wrong file.
  3. Reference coverage — a widely used symbol returns the main use sites.
  4. Diagnostics — introduce an undefined symbol and confirm it is reported.

All four mean input, position, and provider are correct. Passing only the first often means the position base is wrong; passing the first two often means indexing is incomplete.

The existing dev-lsp-seam covers the provider contract and the LSP integration article covers LspQueryRequest; this article covers the four recipes. Confirm the capability, then trust the result.

LSP sees what the language server understands, not every byte in the repository.

ChatGPTClaudeGrok / X / CursorGemini

FAQ

Does the DeepSeek Harness LSP tool need a language server installed?

DeepSeek Harness supports that. The DeepSeek Harness lsp tool needs a registered provider, such as a stdio provider. Without one, queries return LSP_UNAVAILABLE rather than installing a server automatically.

What input do go-to-definition and find-references need in DeepSeek Harness?

In DeepSeek Harness, both need a file and a position. Definition returns the declaration; references return all uses. DeepSeek Harness LSP queries are position-based, so an imprecise position returns an empty or wrong result.

Are DeepSeek Harness LSP diagnostics pushed or queried on demand?

In DeepSeek Harness, it depends on the provider and operation. The DeepSeek Harness lsp tool can query diagnostics on demand, while a language server may also push them after opening a file.

Does an empty DeepSeek Harness LSP result mean the tool is broken?

DeepSeek Harness does not always behave that way. An empty result can mean no symbol at the position, an unindexed file, or an unsupported operation. Test with a known symbol before changing the query.

Related Terms

LSP
LSP is the Language Server Protocol; DeepSeek Harness exposes definitions, references, diagnostics, and symbols through the lsp tool.— DeepSeek Harness reference - LSP navigation
provider
A provider is the DeepSeek Harness backend that connects to a language server, such as a stdio provider; without one, LSP queries are unavailable.— DeepSeek Harness reference - LSP navigation
LSP_UNAVAILABLE
LSP_UNAVAILABLE is the structured DeepSeek Harness error returned when no LSP provider is registered, meaning the capability is unavailable.— DeepSeek Harness reference - Tool schema catalog
symbol
A symbol is a named code entity such as a function, class, or variable; LSP can list symbols with their positions.— DeepSeek Harness reference - LSP navigation

Sources