# Overview

<figure><img src="https://1777420343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH0nrRChSf5lbh0h5q42d%2Fuploads%2FvegDSHpfQ89EBjQRjDdo%2Fimage.png?alt=media&#x26;token=9a95ac77-be31-4703-bdc5-bfb40a935d8d" alt="Lenses VS Code extension overview in the editor."><figcaption><p>Use Lenses tools directly inside VS Code.</p></figcaption></figure>

Use the Lenses VS Code extension to explore Kafka resources, run Lenses SQL, manage configuration, and work faster without leaving the editor.

### GitHub Copilot and language model tools

Connect to Lenses first. In Copilot Chat, enable **agent** mode and extension tools. See [Use tools in chat](https://code.visualstudio.com/docs/copilot/chat/chat-tools).

Destructive actions, such as deleting a topic or environment, still show VS Code confirmation dialogs before they run. Authentication commands are not available as tools. Requires **VS Code 1.96+**.

### Tool references

Use these tool references in chat to run SQL, open listings, compare entities, and work with search and indexing.

* `#lensesExtensionSql`, `#lensesExtensionDoc`, `#lensesExtensionListing`, `#lensesExtensionTopic`, `#lensesExtensionEnv`, `#lensesExtensionCompare`, `#lensesExtensionSearch`, and `#lensesExtensionOps` are available in **VS Code 1.96+**.

<table data-full-width="true"><thead><tr><th>Tool reference</th><th>Display name</th><th>What it does</th></tr></thead><tbody><tr><td><code>#lensesExtensionSql</code></td><td>Run Lenses SQL</td><td>Opens the SQL editor for an environment and optionally runs a query immediately. Live streaming supported.</td></tr><tr><td><code>#lensesExtensionDoc</code></td><td>Open Lenses document</td><td>Opens any virtual document in view or edit mode — IAM entities (User, Group, Role, ServiceAccount), Topics, Connectors, Schemas, Provisioning, EnvironmentConfig, EnvironmentCreate, TopicCreate, TopicConfig.</td></tr><tr><td><code>#lensesExtensionListing</code></td><td>Open Lenses listing</td><td>Opens a listing panel: environments table, topics, IAM (users / groups / roles / service accounts), or the SQL Results panel.</td></tr><tr><td><code>#lensesExtensionTopic</code></td><td>Topic action</td><td>Runs a topic-scoped action: data snapshot, live data, schema view, consumers, configuration, insert messages, compare across environments, open SQL tab, delete topic (with confirmation), create topic, add bookmark.</td></tr><tr><td><code>#lensesExtensionEnv</code></td><td>Environment action</td><td>Switches the active environment, opens environment config or provisioning YAML, creates or deletes an environment (with confirmation), refreshes health.</td></tr><tr><td><code>#lensesExtensionCompare</code></td><td>Lenses comparison</td><td>Opens comparison wizards (topic config, topic schema, groups, roles) or performs a direct diff between two named entities across environments.</td></tr><tr><td><code>#lensesExtensionSearch</code></td><td>Lenses search &#x26; index</td><td>Opens the global search panel or drives search index actions (rebuild, start/stop/pause/resume indexing, validate, view stats).</td></tr><tr><td><code>#lensesExtensionOps</code></td><td>Lenses misc command</td><td>Miscellaneous commands: refresh tree/bookmarks/notifications, stop SQL, clear results, apply/save changes, schema version actions, connector/consumer group ops, notification management.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lenses.io/latest/vs-code-extension/overview.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
