agy-lsp
Provides Language Server Protocol integration for C/C++ via clangd or ccls, enabling diagnostics, symbol navigation, find references, rename refactoring, document symbols, hover, and call/type hierarchy.
Provides Language Server Protocol integration for JavaScript/TypeScript via typescript-language-server or vtsls, enabling diagnostics, go-to-definition, find references, rename refactoring, document symbols, hover, and call/type hierarchy.
Provides Language Server Protocol integration for Python via pyright or pylsp, enabling diagnostics, symbol navigation, find references, rename refactoring, document symbols, hover, and call/type hierarchy.
Provides Language Server Protocol integration for TypeScript/JavaScript via typescript-language-server or vtsls, enabling diagnostics, go-to-definition, find references, rename refactoring, document symbols, hover, and call/type hierarchy.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agy-lspget diagnostics for src/index.ts and find references to useState"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agy-lsp — Language Server Protocol MCP Bridge for Antigravity CLI
Read this in other languages: English | Deutsch
agy-lsp is a production-ready, professional plugin for the Google Antigravity CLI (agy). It connects AI coding agents to native Language Servers (LSP) for C#, C/C++, TypeScript/JavaScript, Python, Rust, and Go via the standardized Model Context Protocol (MCP).
Companion Plugin: Pair
agy-lsp(static semantic navigation & diagnostics) with agy-dap (hypothesis-driven runtime debugging via DAP).
Table of Contents
Related MCP server: universal-lsp
1. Purpose & Benefits
Large Language Models (LLMs) often face two major challenges when working in real-world software codebases:
Inaccurate Search & Context Waste: Plaintext keyword search and reading entire files consumes thousands of context tokens while frequently missing semantic relationships (such as method overloads, polymorphism, interface implementations, and namespaces).
Missing Feedback Loops: After modifying code, agents often fail to notice syntax, type-checking, or import errors until much later or not at all.
agy-lsp bridges this gap by giving the Antigravity agent direct compiler and type intelligence via standardized MCP tools:
Precise Symbol Navigation: Jump to definitions and query all workspace references without guessing.
Automated Quality Control: Fetch compiler diagnostics (errors, warnings, hints) immediately after edits.
Safe Refactoring: Symbol renaming generates a unified preview diff before any changes are written to disk.
Minimized Token Usage: Compact snippets, structural document outlines, and strict result limits prevent context bloat.
Empirical Benchmarks & Evaluation Results
All claims below are continuously verified by our automated benchmark and E2E test suite (tests/test_benchmarks_and_value.py and tests/test_e2e_real_lsp.py) against real clangd (C/C++) and pylsp (Python) language server processes:
Evaluation Scenario | Without | With | Measured Improvement |
1. Structural File Outline ( | 18,979 bytes ( | 1,647 bytes ( | -91.3% tokens vs. Raw LSP-79.8% tokens vs. Expanded |
2. Inaccurate LLM Column Estimates ( | 0 / 10 resolved (0% hit rate)Raw LSP fails when column lands on whitespace or keywords | 10 / 10 resolved (100% hit rate)Auto-snaps to identifier & supports | 0% → 100% resolution rate without LLM retry loops |
3. Semantic Navigation vs. Text Grep ( | 8 grep matches (5 false positives = 62.5% noise)Requires reading full files (3,975 bytes / ~994 tokens) | 3 AST-verified references (0% false positives)Definition + 3-line snippet in 449 bytes (~112 tokens) | 100% precision (0 false positives)-88.7% context tokens |
4. Real-Time Compiler Feedback & Cascade Filtering ( | No immediate feedback without full build;Raw cascade: 145,680 bytes (~36,420 tokens) | 2 errors detected in ~198 ms via event-driven | < 200 ms instant feedback-80.8% diagnostic noise |
5. Safe Cross-File Refactoring ( | Regex search/replace corrupts string literals ( | 2 files diffed ( | Zero disk corruption100% AST-safe unified diff |
6. Zero-Read Call Graph Analysis ( | Requires multiple | Single tool call returns incoming ( | 1 tool call instead of multi-file inspection |
Why These Results Matter for AI Agents
Massive Context Window Preservation (-80% to -91% Tokens): In C/C++ and C# projects, headers and classes often contain dozens of struct fields or enum constants. Raw LSP dumps flood the LLM context window with thousands of lines of JSON coordinates.
agy-lspcollapses leaf fields into"fields_count": 34by default while keeping every struct, class, enum, and function signature intact.Elimination of "Off-by-A-Few-Columns" Tool Failures (0% → 100% Hit Rate): LLMs do not count 1-indexed character columns reliably—they frequently pass
character=1(leading indentation) or land on return-type keywords (static,int,const,def). Standard LSP bridges returnnullon these positions, forcing the agent into expensive retry loops.agy-lspautomatically snaps to the nearest non-keyword identifier on the line (or matchessymbol_namewithin ±2 lines) and retries alternative identifiers on the line if needed.Zero False Positives in Navigation & Refactoring: Unlike
grep/ripgrep, which matched 62.5% false positives in comments and string literals in our benchmark,agy-lspqueries the compiler's AST (clangd/pylsp/pyright/csharp-ls/tsserver). When renaming symbols, string literals and comments are never accidentally modified, and changes are returned as a safe unified diff preview first.Sub-200ms Compiler Verification Without Running Full Builds: Using event-driven
textDocument/publishDiagnosticssynchronization (asyncio.Event), the agent receives exact compiler errors (e.g.,"Use of undeclared identifier","Too many arguments to function call") within ~200 ms of opening or editing a file.
2. Architecture
┌─────────────────────────────────────────────────────────────┐
│ Antigravity CLI (agy) │
│ │
│ Agent Turn / Reasoning ◄──► Skills / AGENTS.md Rules │
└─────────────────────────────┬───────────────────────────────┘
│
│ Stdio Transport (JSON-RPC)
▼
┌─────────────────────────────────────────────────────────────┐
│ agy-lsp (MCP-Server) │
│ │
│ ├── Tool Schemas (get_diagnostics, go_to_definition, ...) │
│ ├── Document Sync (didOpen, didChange, didClose, Cache) │
│ ├── Token Reducer (Snippet extraction, Dedup, Limits) │
│ └── Workspace Confinement Security Check │
└─────────────────────────────┬───────────────────────────────┘
│
│ Async Process I/O (Content-Length Framing)
▼
┌─────────────────────────────────────────────────────────────┐
│ Language Server (LSP) │
│ │
│ [Python] [C#] [C / C++] [TS / JS] │
│ pyright / csharp-ls / clangd typescript-│
│ pylsp Roslyn Server language- │
│ server │
└─────────────────────────────────────────────────────────────┘The bridge launches Language Server processes on demand (lazy loading) only when a tool targets a file belonging to that language. Running processes are reused throughout the session and automatically recovered with bounded retries if a crash occurs.
3. MCP Tools Overview
The plugin registers 11 high-performance MCP tools:
Tool | Purpose | Key Parameters | Return Value |
| Retrieve compiler errors, warnings, and hints for a file or workspace |
| List of deduplicated diagnostics with file, line, column, code, and message. |
| Jump from a symbol position to its definition/declaration |
| Target file, line range, and optional compact code excerpt. |
| Locate all usages of a symbol across the workspace |
| List of reference locations across files. |
| Perform workspace-wide LSP rename refactoring |
| Unified preview diff across all affected files. Disk writes require |
| Structural outline of classes, methods, and properties |
| Symbol tree with kind, line ranges, and identifiers (struct fields/enum members collapsed into |
| Search symbols across the entire project |
| Matches with symbol name, kind, file, and position. |
| Inspect signatures, types, and docstrings |
| Markdown-formatted hover information. |
| Verify support and return call hierarchy root item |
| Prepared symbol item for call graphs. |
| Find callers ( |
| List of callers or callee functions. |
| Inspect base types ( |
| Type inheritance hierarchy. |
| Health status of all servers, workspace root, and errors | none | JSON overview of server states ( |
Note: All line and column arguments and outputs are 1-indexed for agent ergonomics. Position-based tools also automatically snap inaccurate column estimates (character) or optional symbol_name arguments to the identifier on that line.
4. Supported Languages & Language Servers
Language | Primary Server | File Extensions | Project Discovery Markers |
Python |
|
|
|
C# |
|
|
|
C / C++ |
|
|
|
TypeScript / JS |
|
|
|
Rust |
|
|
|
Go |
|
|
|
5. Prerequisites
Operating System: Windows 10/11, macOS, or Linux.
Python: Python 3.9 or higher (Python 3.14+ fully supported).
Antigravity CLI:
agyinstalled.The corresponding language server for the language you wish to inspect (e.g.
pylsporpyrightfor Python,clangdfor C++, etc.).
6. Installation & Quickstart
Windows (PowerShell)
# 1. Clone and enter the repository
git clone https://github.com/k0pfnicker/agy-lsp.git
cd agy-lsp
# 2. Create virtual environment and install dependencies (note the quotes around ".[dev]" in PowerShell)
python -m venv .venv
.\.venv\Scripts\pip.exe install -e ".[dev]"
# 3. Optional: Install Python & C/C++ language servers directly into .venv (no admin rights required)
.\.venv\Scripts\pip.exe install python-lsp-server clangd
# 4. Run one-step workspace & MCP setup
.\.venv\Scripts\python.exe setup_agy.py --workspace D:\YourProjectLinux / macOS
# 1. Clone and enter the repository
git clone https://github.com/k0pfnicker/agy-lsp.git
cd agy-lsp
# 2. Create virtual environment and install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# 3. Optional: Install Python & C/C++ language servers
pip install python-lsp-server clangd
# 4. Run one-step workspace & MCP setup
python setup_agy.py --workspace /path/to/your/project7. Integration into Antigravity CLI
Option A: Automated Setup via setup_agy.py (Recommended)
Running python setup_agy.py --workspace <path> automatically:
Detects the exact absolute path to
.venv/Scripts/agy-lspand.venv/Scripts(so language servers installed inside.venvare found automatically without modifying your global systemPATH).Registers
agy-lspin~/.gemini/config/mcp_config.json.Installs the
SKILL.mdinto<workspace>/.agents/skills/agy-lsp/SKILL.mdwithout creating duplicate plugin MCP server entries.
Option B: As a Discovered Plugin
The plugin also adheres to the official Antigravity plugin manifest specifications (plugin.json and mcp_config.json).
(Note: Do not register both ~/.gemini/config/mcp_config.json and .agents/plugins/agy-lsp/mcp_config.json simultaneously, or Antigravity will list two MCP server instances agy-lsp and agy-lsp_agy-lsp.)
Validate the plugin with the official CLI command:
agy plugin validate .Expected output:
[ok] .
✔ skills : 1 processed
✔ mcpServers : 1 processed8. Language Server Installation
If a language server is not installed, the plugin provides a clear, user-friendly error message with actionable installation commands. Executables installed inside the same .venv are discovered automatically:
Python
# Option 1: python-lsp-server (pure Python, no Node.js required)
pip install python-lsp-server
# Option 2: Pyright
npm install -g pyrightC# (.NET)
dotnet tool install -g csharp-lsC / C++
Python Wheel (Windows / Linux / macOS, no admin rights required):
pip install clangdWindows:
scoop install llvmorwinget install LLVM.LLVMmacOS:
brew install llvmLinux (Debian/Ubuntu):
sudo apt-get install clangd
TypeScript / JavaScript
npm install -g typescript-language-server typescript9. Configuration (agy-lsp.json)
agy-lsp works out of the box with safe defaults. To customize behavior, place an agy-lsp.json file at your workspace root or under ~/.gemini/config/agy-lsp.json:
{
"defaultLanguage": "auto",
"workspaceRoot": null,
"maxResults": 50,
"includeCodeSnippets": false,
"snippetContextLines": 3,
"allowOutsideWorkspace": false,
"writeChanges": false,
"serverStartupTimeoutMs": 15000,
"requestTimeoutMs": 10000,
"maxRestartAttempts": 2,
"servers": {
"csharp": {
"command": "csharp-ls",
"args": []
},
"cpp": {
"command": "clangd",
"args": ["--background-index"]
},
"typescript": {
"command": "typescript-language-server",
"args": ["--stdio"]
},
"python": {
"command": "pyright-langserver",
"args": ["--stdio"],
"fallbacks": [
{ "command": "pylsp", "args": [] }
]
}
}
}Configuration Options Reference
Key | Type | Default | Description |
|
|
| Fallback language for files with unrecognized extensions. |
|
|
| Explicit workspace root. If |
|
|
| Maximum number of diagnostics, references, or symbols returned. |
|
|
| Whether to include code snippets with definition and reference locations. |
|
|
| Number of context lines before and after target line in snippets. |
|
|
| Security boundary: Forbids accessing paths outside the workspace root. |
|
|
| Write protection: Enables writing rename refactorings directly to disk. |
|
|
| Timeout in milliseconds for LSP process initialization handshake. |
|
|
| Timeout in milliseconds for individual LSP JSON-RPC requests. |
|
|
| Maximum retry attempts when a server process crashes unexpectedly. |
10. Token Efficiency & Context Optimization
To prevent context bloat and optimize LLM token consumption, agy-lsp incorporates several efficiency mechanisms:
No Full File Dumps: Returns precise coordinates or compact snippets (default: 3 lines context) instead of entire files.
Diagnostic Deduplication: Merges redundant diagnostic reports at identical file locations.
Message Truncation: Overly verbose compiler error messages are truncated at 400 characters (
... [truncated]).Result Limiting & Pagination: Result lists are capped at
maxResultsand annotated with atruncated: trueflag and total count.Compact Structure: Omits empty optional keys and null values.
11. Security Model
Workspace Confinement: All file paths are canonicalized (
resolve()). Accessing files outside the workspace root is rejected unlessallowOutsideWorkspace: trueis set. Path traversal attacks (../../) are blocked.No Shell Execution: Subprocesses are launched directly using
asyncio.create_subprocess_execwithout a shell (shell=False).Static Command Allowlist: Server commands are loaded strictly from static configuration or defaults, never from dynamic agent tool arguments.
Secret Redaction: Stderr logs automatically redact bearer tokens, API keys, and passwords.
Stderr Isolation: All diagnostic logs are routed strictly to
sys.stderr, preserving clean JSON-RPC communication onsys.stdout.
12. Troubleshooting & Diagnostics
Checking Server Health
Invoke the lsp_status tool through the agent or MCP:
{
"name": "lsp_status",
"arguments": {}
}Output details:
Status per language (
RUNNING,AVAILABLE,NOT_INSTALLED,CRASHED),Process ID (PID) and workspace root,
Detailed error messages and installation advice if a binary is missing.
Error: "Language server command '...' was not found"
Ensure the language server is installed and available in PATH, or specify its absolute executable path in agy-lsp.json:
{
"servers": {
"csharp": {
"command": "C:/Users/<User>/.dotnet/tools/csharp-ls.exe"
}
}
}13. Development, Testing & QA
Running the Test Suite & Empirical Benchmarks
The test suite contains 45 automated tests across unit, integration, empirical benchmark, and real Language Server end-to-end categories (pylsp & clangd):
# Run all 45 tests
.\.venv\Scripts\pytest.exe -v
# Run empirical benchmarks with detailed metrics output
.\.venv\Scripts\pytest.exe tests/test_benchmarks_and_value.py -v -s
# Run the real LSP process E2E tests (Python pylsp & C/C++ clangd)
.\.venv\Scripts\pytest.exe tests/test_e2e_real_lsp.py -vLinting & Formatting Check
.\.venv\Scripts\ruff.exe check .
.\.venv\Scripts\ruff.exe format --check .Plugin Manifest Validation
agy plugin validate .14. Adding New Languages
To add a new language server (e.g. Rust via rust-analyzer or Go via gopls):
Map file extensions: In
paths.pyinEXTENSION_LANGUAGE_MAP:".rs": "rust", ".go": "go",Register default server: In
config.pyinDEFAULT_SERVERS:"rust": ServerConfig(command="rust-analyzer", args=[]), "go": ServerConfig(command="gopls", args=["serve"]),Add installation hint: In
adapters.pyinINSTALL_HINTS.
Alternatively, configure new languages purely declaratively in agy-lsp.json without modifying source code!
15. Known Limitations
C# on Modern .NET Previews: On .NET 10 Preview environments,
dotnet tool install -g csharp-lsmay encounter packaging manifest issues. Configure an alternative Roslyn server path inagy-lsp.jsonif needed.Multiple Workspace Roots: The bridge currently targets one primary workspace root per session. Submodules and subfolders within the root are fully supported.
C/C++ Semantic Macro Expansion:
clangdyields optimal results when acompile_commands.jsondatabase is present in the workspace root.
16. License
This project is licensed under the MIT License.
Available Tools
11 toolscall_hierarchyB
Trace caller/callee relationships for a function or method. direction='incoming' returns callers; direction='outgoing' returns called functions.
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | ||
| character | Yes | ||
| direction | No | incoming | |
| file_path | Yes | ||
| symbol_name | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description is the only behavioral disclosure: it correctly identifies the tool as a read-only trace and explains the default-incoming branch. It leaves out notable behavior such as whether it works without a prior prepare_call_hierarchy call, whether results are scoped to the project/index, and any latency or size concerns for deep call graphs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, front-loaded with the core action and the direction switch, with no filler. It is efficient to the point of under-specification, but nothing written is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists so return values needn't be described, but for a 5-parameter LSP tool with zero schema coverage and no annotations the description is too thin: missing position semantics, the role of symbol_name, and the relationship to the prepare_call_hierarchy sibling are all conditions an agent needs to call this correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must carry parameter meaning, yet it explains only 'direction' (partially – incoming/outgoing) and never defines file_path, line, character, or symbol_name. A caller cannot tell whether the position is 0- or 1-based, what units 'character' uses, or why symbol_name is optional.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ("Trace caller/callee relationships for a function or method") and disambiguates the two directions, so an agent knows it is a relationship-tracing tool. It does not distinguish itself from the similar sibling prepare_call_hierarchy or find_references, so the agent must guess at the boundary.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The direction values give implicit guidance on which mode to pick, but there is no explicit when-to-use versus find_references/get_type_hierarchy/prepare_call_hierarchy, and no statement of prerequisites (e.g. whether a prepared hierarchy is required first). Usage is inferable but not stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
document_symbolsB
Retrieve outline of classes, methods, functions, and properties in a file. Use to quickly understand file architecture without reading all lines. Struct fields and enum members are collapsed into 'fields_count' by default unless include_fields=True.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| file_path | Yes | ||
| max_depth | No | ||
| include_fields | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description has to carry the full burden. It usefully discloses one non-obvious output behavior (struct fields and enum members collapsed into 'fields_count' unless include_fields=True), but says nothing about error conditions, LSP dependency, or what query and max_depth do.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tight sentences, front-loaded with the core action, followed by the usage rationale and then the one caveat that changes output shape. Nothing is redundant, though the caveat could sit closer to the parameter it governs.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be spelled out, and the fields-collapsing note covers the main return-value surprise. However, for a 4-parameter tool with zero schema coverage, the undefined query and max_depth leave real gaps an agent must guess at.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across 4 parameters, and the description only explains include_fields. The purpose of 'query' and the effect of 'max_depth' are undocumented in both the schema and the description, leaving half the parameters opaque.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Retrieve outline of classes, methods, functions, and properties in a file') and the scoping to a single file implicitly distinguishes it from the sibling workspace_symbols. It stops short of naming that sibling, so the differentiation is left to inference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Use to quickly understand file architecture without reading all lines' gives a use context, but it frames the benefit rather than conditions. There is no guidance on when to reach for workspace_symbols instead, or on prerequisites such as an active LSP server.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_referencesB
Find all references and usages of a symbol across the workspace. Returns file locations and compact line numbers. Use to assess impact of changes.
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | ||
| limit | No | ||
| character | Yes | ||
| file_path | Yes | ||
| symbol_name | No | ||
| include_snippet | No | ||
| include_declaration | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the return shape in broad terms (file locations and compact line numbers) and implies a read operation, but it does not discuss permissions, rate limits, or behavior of optional flags.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three short sentences, front-loaded with the core action and return behavior. There is no wasted text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be fully explained. But for a seven-parameter tool with no annotations and 0% schema description coverage, the description leaves critical parameter semantics and invocation guidance incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has seven parameters and zero description coverage, so the description must compensate. It mentions symbols and locations only generically and does not explain file_path, line, character, limit, symbol_name, include_snippet, or include_declaration.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: finding references and usages of a symbol across the workspace. It is clear what the tool does, but it does not explicitly distinguish itself from siblings such as go_to_definition or rename_symbol.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives a clear use case: assessing the impact of changes. However, it does not state when not to use it or name alternatives like go_to_definition or rename_symbol.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_diagnosticsA
Retrieve errors, warnings, and code hints for a file or the whole workspace. Use to check syntax/type errors after edits, before and after refactoring.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| line_end | No | ||
| severity | No | ||
| file_path | No | ||
| line_start | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden; it does disclose the returned content (errors, warnings, code hints) and that scope can widen to the whole workspace. It says nothing about whether the call is read-only, whether it blocks on LSP startup, latency over large workspaces, or how truncation/limit behaves.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences with the resource first and the usage trigger second — nothing redundant and the key information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The output schema means return values need no explanation, and the file-vs-workspace scope default is at least implied. But with five undocumented parameters and no annotations, the description leaves filtering, paging, and line-range behavior unaddressed — too thin for a 5-param tool with zero structured coverage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across 5 optional parameters, and the description compensates only partially: 'for a file or the whole workspace' hints at file_path being optional, but limit, line_start, line_end, and severity are entirely undocumented in both places. An agent cannot tell that severity accepts specific values or that line ranges narrow the scan.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('retrieve') and resource ('errors, warnings, and code hints') plus the two scopes it supports (a file or the whole workspace). It is clearly distinguishable from siblings like hover or lsp_status, though it never names or contrasts them explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'Use to check syntax/type errors after edits, before and after refactoring' gives a concrete trigger context, so an agent knows when to reach for it. It stops short of exclusions or naming an alternative (e.g. hover for single-symbol types, lsp_status for server health).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_type_hierarchyB
Inspect class and interface inheritance hierarchy. direction='supertypes' returns base classes/interfaces; direction='subtypes' returns derived types.
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | ||
| character | Yes | ||
| direction | No | supertypes | |
| file_path | Yes | ||
| symbol_name | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden, and it does disclose that output shape varies materially by direction mode — useful context. However, it never states that this is a read-only, non-mutating inspection, nor anything about language-server availability, failure behavior for invalid positions, or cost.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the purpose, then the mode semantics. Every clause earns its place and there is no boilerplate.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be described. But for a 5-parameter position-based tool with zero annotation coverage and zero schema descriptions, the agent is left without the coordinate conventions or the role of `symbol_name`, which are exactly what the description should supply.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across 5 parameters, so the description must compensate and it does not. It only disambiguates `direction` (with its two values); `file_path`, `line`, `character`, and `symbol_name` — including whether line/character are 0- or 1-based, and what `symbol_name` is for when a position is already required — are left completely unexplained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Inspect class and interface inheritance hierarchy,' which immediately separates it from get_diagnostics or find_references. It never names a sibling explicitly, so an agent must infer the boundary, but the object of the operation is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explains the two modes of `direction` ('supertypes' for bases, 'subtypes' for derived), which is genuine usage guidance for the main decision point. It gives no guidance on when to prefer this over find_references or go_to_definition, and no prerequisites such as needing an active language server or an open file.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
go_to_definitionB
Jump from a symbol position to its declaration/definition. Returns target file path, line, column, and optional surrounding code snippet.
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | ||
| character | Yes | ||
| file_path | Yes | ||
| symbol_name | No | ||
| include_snippet | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It does disclose what is returned (path, line, column, optional snippet), but does not mention LSP server dependency, behavior when no definition is found, or positional indexing conventions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise, front-loaded sentences with no filler. The operation and return shape are stated immediately and nothing is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, but the input schema has no parameter descriptions and there are no annotations. For a five-parameter LSP tool, the description leaves out crucial invocation details such as position indexing and failure behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for five parameters. The description does not explain file_path format, whether line and character are zero- or one-based, what symbol_name is for, or what include_snippet controls, so it does not compensate for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: jump from a symbol position to its declaration/definition. It is clearly distinct from find_references and hover, though it does not explicitly name or contrast siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by 'from a symbol position', but the description gives no explicit when-to-use guidance, no alternatives such as hover or find_references, and no conditions under which this tool should be preferred.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
hoverA
Inspect type definitions, documentation strings, and signatures at a cursor position. Use to check parameter types, return values, and docstrings.
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | ||
| character | Yes | ||
| file_path | Yes | ||
| symbol_name | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. "Inspect" implies a non-mutating read, and the description says what kind of information comes back, but it omits whether a language server must be running, what happens at an invalid or blank position, and whether the result can be empty.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the core purpose and followed by the concrete use case. No filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values needn't be spelled out, and the core action is clear. But with zero annotation coverage and 0% schema description coverage, the unexplained symbol_name parameter and absent preconditions (active LSP, valid position) leave real gaps for a 4-parameter tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate and largely does not. "At a cursor position" loosely maps to line and character, but file_path is unmentioned and the optional symbol_name parameter is completely undocumented, leaving an agent to guess its role relative to the cursor coordinates.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: inspect type definitions, documentation strings, and signatures at a cursor position. This clearly separates it from navigation siblings like go_to_definition or find_references, though it never names those alternatives explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
"Use to check parameter types, return values, and docstrings" gives a concrete use case, so an agent knows when this is the right call. It stops short of stating when NOT to use it or pointing to the navigation siblings as alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lsp_statusA
Show status of all Language Server processes, active workspace root, process IDs, restart counts, and error summaries.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden: 'Show status' strongly implies a non-destructive read and the field list tells the agent what information is surfaced. However, it doesn't state whether the call refreshes/starts servers, whether it is cheap or slow, or what happens when no servers are running.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence that puts the action and resource first and then lists the payload contents. Every clause earns its place; nothing is redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so the description needn't explain return values, and the zero-parameter schema needs no clarification. The only real omission is usage context (when to check status, e.g. after diagnostics failures), which keeps it short of a 5.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline of 4 applies; there is nothing for the description to disambiguate. The enumerated fields loosely preview the response shape, which is a small bonus but not parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Show status') plus a precise resource ('all Language Server processes') and enumerates the reported fields (workspace root, PIDs, restart counts, error summaries). It is clearly distinct from the code-navigation siblings, though it never explicitly says so.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to call this tool, no mention of troubleshooting/health-check scenarios, and no reference to alternatives. The agent must infer usage entirely from the tool name and the enumerated fields.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
prepare_call_hierarchyC
Prepare a function or method for call hierarchy inspection. Verifies if the symbol supports call graphs.
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | ||
| character | Yes | ||
| file_path | Yes | ||
| symbol_name | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. "Verifies if the symbol supports call graphs" hints that the result is a support check, but the description says nothing about failure behavior (error vs. negative result), whether an LSP server must be running, whether the file must be open, or whether any state is mutated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences with the action front-loaded and the verification purpose second. No filler, though the brevity is part of why the parameter and workflow gaps go unaddressed.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The output schema exists, so return values needn't be explained, but this tool sits in a multi-step workflow with a directly named sibling (`call_hierarchy`) and the description omits that relationship entirely. Combined with zero annotation coverage and zero parameter documentation, an agent has too little to call this correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across 4 parameters, so the description must compensate and does not. It implies the symbol is located by position (file_path/line/character) but says nothing about the optional `symbol_name` parameter or why it exists alongside a positional locator, leaving a required-vs-optional ambiguity unexplained.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ("Prepare a function or method for call hierarchy inspection") and adds the precondition being checked ("Verifies if the symbol supports call graphs"). However, it never distinguishes itself from the sibling tool `call_hierarchy` or `get_type_hierarchy`, so an agent cannot tell from the description why both `prepare_call_hierarchy` and `call_hierarchy` exist.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No when-to-use or when-not-to-use guidance. Critically, this appears to be a prerequisite step for `call_hierarchy`, yet the description never says the two are meant to be used in sequence, nor what to do if verification fails. The only implied context is "before inspecting a call graph," which the agent must infer.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
rename_symbolA
Rename a symbol across all workspace files via LSP. By default (apply=False), generates and returns a unified preview diff without modifying files. Requires apply=True AND writeChanges enabled in config to actually write changes to disk.
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | ||
| apply | No | ||
| new_name | Yes | ||
| character | Yes | ||
| file_path | Yes | ||
| symbol_name | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden and does well: it discloses that the default is non-writing, that a preview diff is returned, and that actual disk writes require both apply=True and a configuration setting. It does not mention undo behavior or possible conflicts, but the critical safety gating is explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two compact sentences with no wasted text. The default preview behavior and the write-gating condition are front-loaded and easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with no annotations, the description supplies the key operational context: preview-by-default and the apply/writeChanges gate. An output schema exists to cover return values, though the description could say more about coordinate semantics or undo/conflict behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must explain parameters, but it only covers apply. The required file_path, line, character, and new_name parameters are left to their self-explanatory names, and the optional symbol_name parameter is not mentioned at all.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Rename a symbol', with clear scope 'across all workspace files via LSP'. It is easy to distinguish from the read-only sibling tools, though it does not explicitly name those alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly explains the two usage modes: default apply=False returns a preview diff, while apply=True plus writeChanges enabled actually writes changes. It does not need to mention sibling alternatives because this is the only rename operation, but the when-to-use conditions are well specified.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
workspace_symbolsB
Search for classes, methods, interfaces, and variables across the entire workspace. Much faster and more accurate than text search.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden; it discloses a useful behavioral comparison (better than text search) but never states that it is a read-only operation, how results are ordered, or how the limit affects output. Given that it is an obviously safe lookup and an output schema exists, this is adequate but thin.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences with the core capability front-loaded. The 'much faster and more accurate' sentence earns its place as a selection hint, though it is slightly promotional in tone.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists so return values needn't be described, but with 0% schema coverage the description should compensate for the undocumented limit parameter and ideally clarify query syntax (fuzzy, camelCase, regex). It does neither, leaving an agent to guess.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description mentions neither parameter. 'query' is inferable from 'search', but 'limit' is never explained in schema or description (what it limits, default null behavior), leaving real ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (search) and concrete resource types (classes, methods, interfaces, variables) with scope (entire workspace). It implicitly distinguishes itself from document_symbols by scope, though it never names the sibling tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The 'faster and more accurate than text search' line implies when to prefer it over textual searching, but there is no explicit when-to-use/when-not guidance and no mention of alternatives like document_symbols or find_references for local or reference-specific lookups.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
11 tool updates
v1.2.0- First observed
call_hierarchy - First observed
document_symbols - First observed
find_references - First observed
get_diagnostics - First observed
get_type_hierarchy - First observed
go_to_definition - First observed
hover - First observed
lsp_status - First observed
prepare_call_hierarchy - First observed
rename_symbol - First observed
workspace_symbols
TDQS
Scored across 11 tools
Most tools target clearly distinct LSP operations: diagnostics, status, definitions, references, rename, symbols, hover, and hierarchies. The only mild overlap is between prepare_call_hierarchy and call_hierarchy, where the preparatory step could be confused with the actual hierarchy query.
Names are consistently snake_case and mostly follow verb_noun or clear noun_phrase patterns, e.g. go_to_definition, find_references, rename_symbol, get_type_hierarchy. Minor deviations include single-word hover and noun-style lsp_status/call_hierarchy, but the set remains predictable.
Eleven tools is well-scoped for an LSP server, covering navigation, diagnostics, refactoring, symbols, and hierarchy queries without obvious bloat. Each tool appears to earn its place in the surface.
The server covers core LSP workflows: diagnostics, definition lookup, references, rename, document/workspace symbols, hover, and call/type hierarchies. Some secondary LSP capabilities such as code actions, formatting, or signature help are absent, but the main agent-facing operations are present.
Maintenance
Related MCP Connectors
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceExposes VSCode's Language Server Protocol features through MCP, enabling AI assistants to perform language-aware operations like symbol navigation, reference tracking, safe renaming, type information retrieval, and hover documentation across codebases.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query language intelligence over MCP, including definitions, references, symbols, and code relationship graphs across many languages, all in one native process with no external language servers.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides IDE-like coding capabilities for AI agents via MCP, enabling semantic code retrieval, symbol-level editing, refactoring, and navigation across many programming languages.MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible AI coding agents to retrieve real-time language-server diagnostics, type and symbol information, definitions, references, workspace-wide renames, and file operations from an open editor. This provides accurate code navigation and editing context without waiting for slow tsc or eslint checks.MIT