-
Notifications
You must be signed in to change notification settings - Fork 2
Copilot Tools
Dataverse PowerTools contributes tools to VS Code's Language Model Tools surface, so GitHub Copilot Chat can answer questions about your Dataverse workspace — and, if you allow it, run a deploy or generate early-bound classes — using the same code paths the panel buttons use.
Read-only by default. Nothing mutates your environment until you change a setting, and even then each call asks first.
| Tool | Reference it as | What it reports or does | Read / mutating |
|---|---|---|---|
| Dataverse connection status | #dvptConnectionStatus |
The workspace's connection: organization URL, auth type (service principal or interactive/OAuth), and whether a token has been acquired | Read |
| List Dataverse components | #dvptListComponents |
Every component discovered in the workspace — plugins, web resources, PCF controls, Azure Functions, solutions — with type, name and folder | Read |
| Dataverse PowerTools requirements | #dvptSystemRequirements |
Whether dotnet, node and pac are installed |
Read |
| Deploy | #dvptDeploy |
Build & deploy the active component to Dataverse | Mutating |
| Generate early-bound | #dvptGenerateEarlybound |
Generate early-bound classes for the active plugin component | Mutating |
Type # in Copilot Chat to reference one explicitly, or just ask — Copilot picks the tool from your
question ("is this workspace connected?", "what components are in here?").
The mutating tools are disabled until you opt in:
dataverse-powertools.copilot.accessMode |
Effect |
|---|---|
readonly (default)
|
Only the three read tools. Asking for a deploy gets a clear refusal naming the setting |
readwrite |
The mutating tools are available too — each one still asks for confirmation on every call |
Turning on readwrite does not hand over your environment: you still confirm each call.
No tool returns the client secret, the client id or the access token. The connection tool names the organization URL and the auth type, and says whether a token was acquired — nothing more.
- Have Copilot Chat installed and signed in (the tools appear on VS Code's Language Model Tools surface, which Copilot Chat consumes).
- Open a workspace with a
dataverse-powertools.json— the tools describe that workspace. - For the mutating tools, set
dataverse-powertools.copilot.accessModetoreadwritein settings.
Nothing else to configure: the tools are registered once when the extension activates, and they follow whichever component is active in the panel.
"Is this workspace connected to Dataverse, and as what?" —
#dvptConnectionStatusanswers with the organization URL and whether the connection is a service principal or interactive, without you opening the panel.
"What's in this repo?" —
#dvptListComponentslists each component and its folder, which is the quickest way to get your bearings in a multi-component repo.
"Why won't the plugin build?" —
#dvptSystemRequirementsrules the toolchain in or out (dotnet,node,pac) before you go looking at code.
"Deploy the plugin" — refused in the default read-only mode, with the setting named. In
readwrite, you get a confirmation prompt naming the operation before anything runs.
The tools do not appear in Copilot Chat — check the extension activated (open the Dataverse PowerTools panel) and that your VS Code is recent enough to have the Language Model Tools API. The extension registers the tools only when the API is present, so an older VS Code simply has none.
"The … tool changes your Dataverse environment and is disabled in read-only mode" — expected; set
dataverse-powertools.copilot.accessMode to readwrite if you want it.
A tool answers about the wrong component — the mutating tools act on the active component. Select the component you mean in the panel first.
- Connecting & Authentication — what "connected" means, and the two auth types
- Requirements — the three system requirements the tool reports on