Skip to content

GH-600 · Domain 2: Implement tool use and environment interaction · 22% of the exam

Task 2.1: Select and configure agent tools

Working out which tools a task needs, configuring them for custom agents, the CLI and the SDK, and controlling which tools an agent may use without asking.

Study it

  • Choosing and configuring tools for custom agents, Copilot CLI and the Copilot SDK

    Partly covered by: Agents and Tools, The Tool-Use Loop

  • Tool permissions: allow and deny rules, tool lists and pre-approved tools

    Partly covered by: Guardrails

Sample questions

Try each one before opening the answer. Every option is explained, with the GitHub documentation page that proves it.

Question 1 · choose 1

A team writes a custom agent profile for a documentation auditor that must inspect and search files in the repository but must never change or run anything. Which frontmatter gives it exactly that?

  1. ANo tools property, with the prompt telling the agent not to edit anything
  2. Btools: [], since an empty list means read-only
  3. Ctools: ["read", "search"]
  4. Dtools: ["Grep", "Glob"], since those aliases cover reading files
Show the answer and why
  • ANo tools property, with the prompt telling the agent not to edit anything

    Incorrect

    Omitting tools enables all available tools; a prompt instruction doesn't remove them.

  • Btools: [], since an empty list means read-only

    Incorrect

    An empty list disables all tools, including reading and searching.

  • Ctools: ["read", "search"]

    Correct

    Listing specific aliases enables only those tools; read views files and search finds files or text.

  • Dtools: ["Grep", "Glob"], since those aliases cover reading files

    Incorrect

    Grep and Glob are compatible aliases of search; they find files and text but don't read file contents.

The tools property of a custom agent filters the tools available to it, built-in or from MCP servers. Omit it or use ["*"] for all tools, list names or aliases such as read, edit, search and execute for only those, or use [] to disable all tools.

Question 2 · choose 1

A developer starts a Copilot CLI session to run benchmarks and wants the model not to even attempt web lookups, rather than choosing a web tool and having the call denied. Which option does this?

  1. A--deny-tool='web_fetch, web_search'
  2. B--allow-tool='shell' combined with --no-ask-user, so other tools are never offered to the model
  3. C/reset-allowed-tools at the start of the session
  4. D--excluded-tools='web_fetch, web_search'
Show the answer and why
  • A--deny-tool='web_fetch, web_search'

    Incorrect

    Deny rules stop a tool from running without a prompt, but the model still sees the tool and may try it and be denied.

  • B--allow-tool='shell' combined with --no-ask-user, so other tools are never offered to the model

    Incorrect

    --allow-tool grants permission without prompting; neither option removes the web tools from the set the model can choose from.

  • C/reset-allowed-tools at the start of the session

    Incorrect

    That command clears permissions granted in the session; the model still knows every tool.

  • D--excluded-tools='web_fetch, web_search'

    Correct

    Excluded tools are removed from the set the model can choose from, so it never tries them.

Copilot CLI has two layers of tool control. --available-tools and --excluded-tools restrict the tools the model is aware of and can choose from; --allow-tool and --deny-tool decide whether a tool it chooses may run. A tool outside the available set can't be used even if it is allowed, and restricting the set stops the model wasting interactions on tools that would be denied.

Question 3 · choose 1

A team's agent skill converts diagrams by running a script stored in the skill's folder. Developers are tired of approving the shell command every time the skill runs. The team has reviewed the script. What is the documented way to stop the prompts for this skill?

  1. AAdd allowed-tools: shell to the frontmatter of the skill's SKILL.md
  2. BRename the script to SKILL.sh so Copilot treats it as part of the skill
  3. CStart every session with --allow-all so no tool needs approval again
  4. DMove the skill into ~/.copilot/skills, where personal skills run without prompts
Show the answer and why
  • AAdd allowed-tools: shell to the frontmatter of the skill's SKILL.md

    Correct

    allowed-tools lists the tools Copilot may use without asking each time while following the skill.

  • BRename the script to SKILL.sh so Copilot treats it as part of the skill

    Incorrect

    Copilot already makes every file in the skill's folder available; renaming doesn't pre-approve anything.

  • CStart every session with --allow-all so no tool needs approval again

    Incorrect

    That removes approvals for every tool in every task, far beyond what this one skill needs.

  • DMove the skill into ~/.copilot/skills, where personal skills run without prompts

    Incorrect

    Personal skills are shared across projects; their location doesn't pre-approve tools.

A skill folder holds SKILL.md and any scripts or resources it references. In the SKILL.md frontmatter, allowed-tools lists the tools Copilot may use without confirmation; any other tool still prompts. GitHub warns to pre-approve shell or bash only for skills and scripts you have reviewed and fully trust, because doing so removes the confirmation step for terminal commands.

Question 4 · choose 1

During a Copilot CLI session a developer approved several tools and ran /allow-all. They now want to go back to the permissions they started the session with. What should they run?

  1. A/yolo
  2. B/undo
  3. C/compact
  4. D/reset-allowed-tools
Show the answer and why
  • A/yolo

    Incorrect

    /yolo grants all permissions; it doesn't revoke them.

  • B/undo

    Incorrect

    /undo rewinds conversation and files; it doesn't change permissions.

  • C/compact

    Incorrect

    /compact summarizes the conversation to free context; it doesn't touch permissions.

  • D/reset-allowed-tools

    Correct

    This command revokes permissions granted during the session, including /allow-all, and returns to the startup state.

/reset-allowed-tools revokes all permissions granted during the current interactive session, whether by answering prompts or with /allow-all or /yolo, and returns to the defaults or the command-line options the session started with.

Question 5 · choose 1

A custom agent profile is used both in VS Code and with Copilot cloud agent. Its tools list includes a tool name that only exists in VS Code. What happens when the cloud agent loads the profile?

  1. AThe profile fails to load until the name is removed
  2. BThe unknown tool name is ignored and the rest of the list applies
  3. CAll available tools are enabled instead, because the whole list is treated as invalid
  4. DThe cloud agent asks the user to approve the unknown tool
Show the answer and why
  • AThe profile fails to load until the name is removed

    Incorrect

    Unrecognized names don't cause errors; they are ignored.

  • BThe unknown tool name is ignored and the rest of the list applies

    Correct

    All unrecognized tool names are ignored, so profiles can list product-specific tools.

  • CAll available tools are enabled instead, because the whole list is treated as invalid

    Incorrect

    The rest of the list still applies; nothing extra is enabled.

  • DThe cloud agent asks the user to approve the unknown tool

    Incorrect

    Cloud agent doesn't prompt; unknown names are ignored.

The tools property in an agent profile filters the tools available to the agent. All unrecognized tool names are ignored, which allows product-specific tools to be listed in a profile used across environments without causing problems.

Question 6 · choose 1

A developer creating a Copilot automation isn't sure which tools its prompt needs. What does the automation form offer to help?

  1. AA Suggest tools button that proposes tools based on the prompt
  2. BA default that grants every tool until the first run finishes
  3. CAn import of the tools list from the repository's custom agent
  4. DA requirement to list tools in copilot-setup-steps.yml
Show the answer and why
  • AA Suggest tools button that proposes tools based on the prompt

    Correct

    You can pick tools manually or use Suggest tools to have Copilot suggest them from your prompt.

  • BA default that grants every tool until the first run finishes

    Incorrect

    Tools are chosen when you create the automation; there is no grant-everything trial run.

  • CAn import of the tools list from the repository's custom agent

    Incorrect

    Automations have their own tool selection.

  • DA requirement to list tools in copilot-setup-steps.yml

    Incorrect

    Tools are selected in the automation itself, not in the setup steps file.

The tools you select for an automation decide what Copilot can do when it runs, and selecting them is the main way to control its scope. You can select tools manually or use the Suggest tools button to have Copilot suggest tools based on your prompt; grant only what the task needs.

Question 7 · choose 1

A developer with only a dozen tools connected to Copilot CLI notices that tool search never seems to activate. Why?

  1. ATool search is off until enabled with toolSearch: true
  2. BTool search only applies to built-in tools
  3. CBelow roughly 30 tools, the CLI just loads every tool
  4. DTool search needs a cloud sandbox session
Show the answer and why
  • ATool search is off until enabled with toolSearch: true

    Incorrect

    Tool search is enabled by default; toolSearch: false turns it off.

  • BTool search only applies to built-in tools

    Incorrect

    Built-in tools are always loaded; tool search defers MCP and other external tools.

  • CBelow roughly 30 tools, the CLI just loads every tool

    Correct

    Under about 30 tools the savings aren't worth it, so tool search is skipped.

  • DTool search needs a cloud sandbox session

    Incorrect

    Tool search works in normal Copilot CLI sessions on supported models.

Tool search keeps the context small by loading MCP and other external tools only when needed. Each time you enter a prompt, the CLI checks the tool inventory; below roughly 30 tools it skips tool search and loads everything. It is on by default for supported models and can be turned off with toolSearch: false.

Practise domain 2 →Practise all domains →