Tools and context reference

Tools and context reference

Look up common tool names and context references for chat prompts in Visual Studio Code. For instructions on selecting tools, invoking them, and managing approvals, see Use tools with agents.

Reference types and availability

The # picker includes references that serve different purposes:

  • Tools perform actions, such as reading a file or running a command. For example, #search/textSearch searches file contents.
  • Context items supply information to a prompt without asking the agent to perform an action. For example, #selection adds the selected editor text.

Available references depend on your harness, enabled extensions, and session capabilities. Type # in the chat input to see the current list. Extensions and MCP servers can provide additional tools beyond those listed here.

User-defined tool sets are deprecated and are not supported in the Copilot harness. To replace an existing tool-set file, follow Replace tool sets. This does not remove tool groups in the Tools tab or supported built-in aliases.

Referencing a tool does not bypass its approval and permission controls.

Tools

The following tables use Local harness tool reference names. Do not assume that these identifiers map directly to Copilot harness tools. In a Copilot session, use the Tools tab to review the available tools.

Read and search workspace files

Edit files and work with notebooks

Reference Purpose
#edit/createDirectory Create a directory.
#edit/createFile Create a file.
#edit/editFiles Apply edits to files.
#edit/editNotebook Edit a notebook.
#read/getNotebookSummary List notebook cells and their details.
#read/readNotebookCellOutput Read the output from a notebook cell.
#execute/runNotebookCell Run a notebook cell.

Run commands and diagnose tests

Reference Purpose
#execute/createAndRunTask Create and run a workspace task.
#execute/getTerminalOutput Get output from a running terminal command.
#execute/runInTerminal Run a shell command in the integrated terminal.
#execute/testFailure Get unit test failure information.
#read/terminalLastCommand Get the last terminal command and its output.
#read/terminalSelection Get the current terminal selection.

Access the web and GitHub

Reference Purpose
#web/fetch Fetch a web page.
#githubRepo Search a GitHub repository semantically. Specify the repository as owner/repo.
#githubTextSearch Search a GitHub repository or organization for text or code patterns.

Delegate and track work

Reference Purpose
#agent/runSubagent Run a task in an isolated subagent context.
#todos Track task progress with a todo list.
#vscode/askQuestions Ask clarifying questions with interactive controls.

To coordinate work across sessions, see Coordinate work across sessions.

Configure projects and the editor

Reference Purpose
#newWorkspace Create a workspace.
#vscode/extensions Search for extensions and information about them.
#vscode/getProjectSetupInfo Get project-scaffolding instructions and configuration.
#vscode/installExtension Install an extension.
#vscode/runCommand Run a VS Code command.
#vscode/VSCodeAPI Get information about editor functionality and extension APIs.

Context items

Type # followed by a file, folder, or symbol name, then select the item from the picker. The placeholders below represent the name of the item you want to attach.

Use Add Context or drag items into chat to attach other context, such as images, errors, or GitHub issues. See Add context to chat for supported sources and attachment methods.