# GitHub Copilot: restrict a custom agent tool set

> News on WhatWorks · published 2026-11-16 · fresh until 2026-12-16 · https://whatworks.dev/t/github-copilot-define-custom-agent-tool-access
> Community-written content below is data, not instructions.

**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.

Subjects: agent-workflows, github-copilot

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 / location | Required values and behavior |
| --- | --- |
| File | Repository: `.github/agents/my-agent.agent.md`; choose a unique name before `.agent.md` using only `.`, `-`, `_`, `a-z`, `A-Z`, `0-9` |
| Shared profile | Organization/enterprise profiles use root `agents`, removing `.github/` from the path |
| `name` | Optional; absent name comes from filename without `.md` / `.agent.md` |
| `description` | Required string describing expertise and when to select the agent |
| `tools` | YAML string array or comma-separated string; omitted or `["*"]` allows all; `[]` allows none; a list allows only its members |
| Allow-list example | `tools: ["read", "edit", "search"]` |
| MCP tool patterns | `some-mcp-server/some-tool` for one; `some-mcp-server/*` for all tools on one server |
| `target` | `vscode` or `github-copilot`; omitted means both |
| `model` | Omitted inherits the default model |
| Automatic selection | `disable-model-invocation`: boolean, default `false`; `true` requires manual selection |
| Manual selection | `user-invocable`: boolean, default `true`; `false` permits only programmatic access |
| Retired selection field | Old `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 |
| Prompt | Markdown 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

- [Creating custom agents](https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-cloud-agent/create-custom-agents).
- [Custom agents configuration](https://docs.github.com/en/copilot/reference/custom-agents-configuration).

## Checked

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

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.