lsp-investigator

lsp-investigator is an agent for Claude Code from karellen/karellen-lsp-mcp. It costs 125 tokens per session (1,589 once invoked), scanned A, original, Apache-2.0.

A code-understanding agent that uses language-server information to navigate large projects. A language server provides structured details about symbols, types, definitions, and errors in source code.

In plain words
What is it for?
Use it to find symbol references, follow call chains and type hierarchies, inspect definitions and documentation, locate interface implementations, search project symbols, and investigate compiler diagnostics.
Why use it?
It reduces the need to read many files manually when tracing how code works or where a build problem comes from.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the karellen-lsp-mcp plugin — 2 skills, 1 agent, 3 hooks, 1 MCP server shipped together

Good fit Use it to find symbol references, follow call chains and type hierarchies, inspect definitions and documentation, locate interface implementations, search project symbols, and investigate compiler diagnostics.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/karellen/karellen-lsp-mcp/lsp-investigator
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/karellen/karellen-lsp-mcp

Made for: Claude Code.

Or install karellen-lsp-mcp, the plugin that ships this one along with the rest of its 2 skills, 1 agent, 3 hooks, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lsp-investigator

README.md
[![agentmods](https://agentmods.dev/badge/agents/karellen/karellen-lsp-mcp/lsp-investigator/github.svg)](https://agentmods.dev/agents/karellen/karellen-lsp-mcp/lsp-investigator)
Your own site
<a href="https://agentmods.dev/agents/karellen/karellen-lsp-mcp/lsp-investigator"><img src="https://agentmods.dev/badge/agents/karellen/karellen-lsp-mcp/lsp-investigator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lsp-investigator

Your own site · 80×15
<a href="https://agentmods.dev/agents/karellen/karellen-lsp-mcp/lsp-investigator"><img src="https://agentmods.dev/badge/agents/karellen/karellen-lsp-mcp/lsp-investigator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,589 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00125 $0.01589
Opus 5 $0.00063 $0.00794
Sonnet 5 $0.00025 $0.00318
Haiku 4.5 $0.00013 $0.00159

Measured 12d ago against content hash 882618437a42, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

lsp-investigator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/lsp-investigator.md · 104 lines

How it starts

The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an LSP code intelligence specialist. Your job is to help understand codebases by using LSP tools for structured navigation instead of reading files line by line.

Your Approach

  1. Scan the project for languages with lsp_scan_languages for a quick overview, or detect with lsp_detect_project for full build system analysis
  2. Register the project with lsp_register_project, using auto-detection or specifying the language explicitly if needed
  3. Check readiness with lsp_indexing_status for large codebases — single-file queries (definition, hover, symbols) work immediately, but cross-file queries (references, call hierarchy) wait for indexing automatically
  4. Investigate using the appropriate LSP tools:
    • lsp_hover to get type signatures and documentation without reading files
    • lsp_read_definition to jump to where a symbol is defined
    • lsp_read_declaration to jump to the declaration (header/interface)
    • lsp_read_type_definition to jump from a variable to its type's definition
    • lsp_find_references to find all usages of a symbol
    • lsp_find_implementations to find all implementations of an interface/abstract method
    • lsp_workspace_symbols to search for symbols by name across the project
    • lsp_call_tree_incoming / lsp_call_tree_outgoing to get full recursive call trees
    • lsp_call_hierarchy_incoming / lsp_call_hierarchy_outgoing for single-level call chains
    • lsp_type_tree_supertypes / lsp_type_tree_subtypes to get full recursive type trees
    • lsp_type_hierarchy_supertypes / lsp_type_hierarchy_subtypes for single-level type info
    • lsp_document_symbols to list all symbols in a file
    • lsp_diagnostics to get compiler errors and warnings
    • lsp_register_project with regenerate=True to force-rebuild the index if results seem stale
  5. Report findings with exact file paths, line numbers, and explanations
  6. Clean up with lsp_deregister_project(registration_id=...) when done

Read the full file on GitHub · 104 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 104 lines · 125 tokens per session scan A 882618437a42

Subscribe to this mod's changes

lsp-investigator is an agent published in the GitHub repository karellen/karellen-lsp-mcp (2 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 125 tokens to every session and 1,589 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

deep-bug-investigator

Deep bug investigation using 4 parallel subagents (reproduction, root cause, impact, fix strategy). Use when bug is complex, can't be reproduced locally, or needs thorough analysis. Spawns fresh-context subagents for each investigation track.

oliver-kriska/claude-elixir-phoenix · 54 tokens

ash-query-optimizer

Ash query optimizer — detects N+1 loads, suggests aggregates over load+Enum, identifies calculation vs load tradeoffs. Use when reviewing Ash queries, LiveView data loading, or domain action efficiency.

oliver-kriska/claude-elixir-phoenix · 45 tokens

call-tracer

Orchestrates parallel call tree tracing using subagents for each entry point category (Controllers, LiveViews, Workers, GenServers). Use proactively when debugging unexpected values, tracing request flow, or planning signature changes.

oliver-kriska/claude-elixir-phoenix · 46 tokens

evidence-based-investigator

Investigates codebase issues by gathering concrete evidence — file paths, line numbers, code snippets, error messages, git history, and test coverage. Use when thorough, multi-angle research into a bug, failure, or unexpected behavior is needed. Does not trace runtime data flow across modules — use behavioral-analyst.…

testdouble/han · 85 tokens

genshijin-investigator

A read-only code investigator that locates definitions, uses, callers, imports, tests, and directory structures, then reports file paths and line numbers. It is designed to return very compact results.

InterfaceX-co-jp/genshijin · 94 tokens

error-handling-reviewer

Hunts for swallowed errors, silent failures, and broken error propagation chains in changed code.

OutSystems/outsystems-mcp · 24 tokens