# Overview

[Lenses.io](https://lenses.io) for VS Code brings the power of Lenses directly into your development environment. Connect to multiple Kafka environments, create and query topics, insert messages, manage users, roles and permissions, search across different entities, compare configurations, and monitor your Kafka infrastructure - all without leaving VS Code.

### 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/agents/agent-tools)). Destructive actions (for example delete topic or environment) still show VS Code confirmation dialogs before executing. 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`, `#lensesExtensionOps`, and `#lensesExtensionSchema` 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, schema registry, 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 favourite.</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/favourites/notifications, stop SQL, clear results, apply/save changes, schema version actions, connector/consumer group ops, notification management.</td></tr><tr><td><code>#lensesExtensionSchema</code></td><td>Schema Registry action</td><td>Manages schema registry subjects: open, edit, create, delete subject or version, version history, cross-environment comparison, favourites. Specify both versions or both environments for instant diffs without prompts.</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.
