[FEATURE] Support VS Code Language Model Tools API (vscode.lm.tools)

Resolved 💬 4 comments Opened Oct 1, 2025 by StefanMaron Closed Jan 7, 2026

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:

  1. Tool Discovery: Query vscode.lm.tools API to enumerate available tools from installed extensions
  2. Tool Registration: Register discovered tools in Claude Code's tool system with proper schemas
  3. Tool Invocation: Invoke tools through VS Code's LM tool protocol and handle results
  4. 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:

  1. 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
  2. MCP bridge servers: Create custom MCP servers that wrap extension functionality, but this requires manual implementation for each extension and duplicates existing tool definitions
  3. 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 documentation
  • copilot_searchWorkspaceSymbols - Search workspace for code symbols using language services
  • copilot_listCodeUsages - List all usages/references/definitions of code elements
  • copilot_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 project
  • al_publish - Publish the AL package
  • al_downloadsymbols - Download symbols for the current project
  • al_package - Package the AL project
  • al_generatepermissionsetforextensionobjects - Generate permission sets
  • And 20+ more development tools

Workflow:

  1. Developer asks Claude Code: "Build my AL project and publish it to the sandbox environment"
  2. Claude Code automatically discovers the AL extension's tools via vscode.lm.tools
  3. Claude Code invokes al_build directly through VS Code's tool API
  4. On successful build, Claude Code invokes al_publish to deploy
  5. Results are parsed and presented to the user
  6. 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.json with JSON schemas
  • Invocation follows a standard async pattern similar to MCP tools
  • Tool results can include rich content (text, images, structured data)

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗