[FEATURE] Support VS Code Language Model Tools API (vscode.lm.tools)
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
VS Code introduced a Language Model Tools API (vscode.lm.tools) that allows extensions to expose tools to AI agents through a standardized languageModelTools contribution point in their package.json. Many VS Code extensions now provide tools via this API, but Claude Code cannot currently access or invoke these extension-provided tools.
This means that even though users have VS Code extensions with rich tooling capabilities (build systems, language-specific operations, deployment tools, etc.), Claude Code cannot leverage these tools natively and must rely on workarounds like executing commands via bash or using external MCP servers.
Proposed Solution
Integrate Claude Code with VS Code's Language Model Tools API to automatically discover and expose extension-provided tools. The implementation would:
- Tool Discovery: Query
vscode.lm.toolsAPI to enumerate available tools from installed extensions - Tool Registration: Register discovered tools in Claude Code's tool system with proper schemas
- Tool Invocation: Invoke tools through VS Code's LM tool protocol and handle results
- Dynamic Updates: Support hot-reload when extensions are installed/uninstalled or tools are added/removed
This would make Claude Code a first-class citizen in the VS Code extension ecosystem, automatically gaining access to tools from any extension that implements the Language Model Tools API.
Example extensions providing tools via this API:
- Language-specific development tools (build, test, deploy)
- Database extensions (query execution, schema inspection)
- Cloud provider extensions (resource management, deployment)
- Testing frameworks (test execution, coverage analysis)
Alternative Solutions
Current workarounds:
- Bash tool execution: Execute extension commands via
code --command, but this is limited to commands exposed to CLI and doesn't work for tools requiring interactive UI - MCP bridge servers: Create custom MCP servers that wrap extension functionality, but this requires manual implementation for each extension and duplicates existing tool definitions
- Direct tool reimplementation: Reimplement extension functionality as MCP tools, which is redundant and doesn't stay in sync with extension updates
None of these alternatives provide the seamless integration that native Language Model Tools API support would offer.
Priority
High - Significant impact on productivity
Feature Category
Developer tools/SDK
Use Case Example
Use Case Example
Example 1: VS Code Built-in Tools (GitHub Copilot Chat)
VS Code's Copilot Chat extension provides built-in tools including:
copilot_searchCodebase- Run natural language search for relevant code or documentationcopilot_searchWorkspaceSymbols- Search workspace for code symbols using language servicescopilot_listCodeUsages- List all usages/references/definitions of code elementscopilot_getVSCodeAPI- Get comprehensive VS Code API documentation- And additional tools for deep analysis and workspace navigation
Current situation: These powerful tools are available to GitHub Copilot but not accessible to Claude Code, limiting its ability to perform deep codebase analysis.
Example 2: Third-Party Extension Tools (AL Language Extension)
Scenario: A developer working on a Microsoft Dynamics 365 Business Central project with the AL Language extension (ms-dynamics-smb.al) v17.0+ installed.
AL Language extension provides 25 tools including:
al_build- Build the current AL projectal_publish- Publish the AL packageal_downloadsymbols- Download symbols for the current projectal_package- Package the AL projectal_generatepermissionsetforextensionobjects- Generate permission sets- And 20+ more development tools
Workflow:
- Developer asks Claude Code: "Build my AL project and publish it to the sandbox environment"
- Claude Code automatically discovers the AL extension's tools via
vscode.lm.tools - Claude Code invokes
al_builddirectly through VS Code's tool API - On successful build, Claude Code invokes
al_publishto deploy - Results are parsed and presented to the user
- If build fails, Claude Code can analyze errors and suggest fixes
Current behavior: Developer must manually run AL commands or Claude Code must use bash workarounds that may not work for all tools
Expected behavior: Claude Code seamlessly uses extension-provided tools (both VS Code built-in and third-party) just like any other tool in its toolkit, without requiring MCP bridges or custom configuration
Additional Context
The Language Model Tools API is part of VS Code's Copilot extensibility and is documented in the VS Code Extension API.
Benefits of implementing this:
- Automatic tool expansion: Users get access to tools from all their installed extensions without manual configuration
- Standardized interface: Extensions already provide well-defined tool schemas, descriptions, and input validation
- Ecosystem alignment: Positions Claude Code as compatible with VS Code's agent/AI tool ecosystem
- Reduced maintenance: No need to create custom MCP bridges for common extension functionality
- Future-proof: As more extensions adopt the Language Model Tools API, Claude Code automatically gains access
Technical considerations:
- The API is available in VS Code 1.85+ (current extension already requires modern VS Code)
- Tools are registered declaratively in
package.jsonwith JSON schemas - Invocation follows a standard async pattern similar to MCP tools
- Tool results can include rich content (text, images, structured data)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗