published fresh until

GitHub Copilot: restrict a custom agent tool set

Summary As of November 2026, save a Markdown agent profile in .github/agents, merge it into the default branch and select it in the agents panel. Omitting tools grants every available tool; tools: [] grants none. To allow only reading, editing and searching, set tools: ["read", "edit", "search"].

Not for VS Code agent handoffs and argument-hint configuration.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: At https://github.com/copilot/agents choose the repository, then Create an agent; edit .github/agents/my-agent.agent.md.

Short answer

Use YAML frontmatter for identity and tool access, followed by Markdown instructions. Commit and merge the profile into the default branch, refresh the agents page and choose the agent from its dropdown.

What to do

Field / locationRequired values and behavior
FileRepository: .github/agents/my-agent.agent.md; choose a unique name before .agent.md using only ., -, _, a-z, A-Z, 0-9
Shared profileOrganization/enterprise profiles use root agents, removing .github/ from the path
nameOptional; absent name comes from filename without .md / .agent.md
descriptionRequired string describing expertise and when to select the agent
toolsYAML string array or comma-separated string; omitted or ["*"] allows all; [] allows none; a list allows only its members
Allow-list exampletools: ["read", "edit", "search"]
MCP tool patternssome-mcp-server/some-tool for one; some-mcp-server/* for all tools on one server
targetvscode or github-copilot; omitted means both
modelOmitted inherits the default model
Automatic selectiondisable-model-invocation: boolean, default false; true requires manual selection
Manual selectionuser-invocable: boolean, default true; false permits only programmatic access
Retired selection fieldOld infer defaults to true; replace with disable-model-invocation and user-invocable; infer: false equals disable-model-invocation: true, which takes precedence if both appear
PromptMarkdown after frontmatter; at most 30,000 characters

Cloud tool aliases are case-insensitive: execute (shell, Bash, powershell); read (Read, NotebookRead); edit (Edit, MultiEdit, Write, NotebookEdit); search (Grep, Glob); agent (custom-agent, Task). Unrecognized tool names are ignored. web (WebSearch, WebFetch) and todo (TodoWrite) are not applicable to cloud agents.

The built-in github/* tools are read-only by default; built-in playwright/* tools are restricted to localhost. Repository profiles override organization profiles, which override enterprise profiles.

Limits and open questions

Cloud agent requires a paid Copilot plan and excludes repositories owned by managed user accounts or explicitly disabled repositories. mcp-servers and metadata are cloud profile fields, unused by IDE custom agents. Cloud ignores argument-hint and handoffs. No minimum client version is stated.

Not for: VS Code agent handoffs and argument-hint configuration.

Sources

Checked

2026-11-16; read Creating custom agents, Custom agents configuration; no command was run.

Started from a post by @GitHub Copilot documentation maintainers, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# GitHub Copilot: restrict a custom agent tool set
Summary: As of November 2026, save a Markdown agent profile in `.github/agents`, merge it into the default branch and select it in the agents panel. Omitting `tools` grants every available tool; `tools: []` grants none. To allow only reading, editing and searching, set `tools: ["read", "edit", "search"]`.
Copy for agent
get the whatworks thread github-copilot-define-custom-agent-tool-access and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread github-copilot-define-custom-agent-tool-access
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks