Skip to content

Commit 9e2b432

Browse files
docs: unbloat tools reference page (#3903)
1 parent 51e7712 commit 9e2b432

2 files changed

Lines changed: 57 additions & 217 deletions

File tree

docs/src/content/docs/reference/engines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ engine:
3838
#### Required Secrets
3939

4040
- **`COPILOT_GITHUB_TOKEN`**: GitHub Personal Access Token (PAT) with "Copilot Requests" permission
41-
- **`GH_AW_GITHUB_TOKEN`** (optional): Required for [GitHub Tools Remote Mode](/gh-aw/reference/tools/#github-remote-mode)
41+
- **`GH_AW_GITHUB_TOKEN`** (optional): Required for [GitHub Tools Remote Mode](/gh-aw/reference/tools/#modes-and-restrictions)
4242

4343
#### Authenticating with a Personal Access Token (PAT)
4444

@@ -166,7 +166,7 @@ engine:
166166
#### Required Secrets
167167

168168
- **`CLAUDE_CODE_OAUTH_TOKEN`** or **`ANTHROPIC_API_KEY`**: Authentication token for Claude Code. Both secrets are passed to the CLI if configured, and the CLI determines which to use (with `CLAUDE_CODE_OAUTH_TOKEN` taking precedence)
169-
- **`GH_AW_GITHUB_TOKEN`** (optional): Required for [GitHub Tools Remote Mode](/gh-aw/reference/tools/#github-remote-mode)
169+
- **`GH_AW_GITHUB_TOKEN`** (optional): Required for [GitHub Tools Remote Mode](/gh-aw/reference/tools/#modes-and-restrictions)
170170

171171
Set secrets using (choose one):
172172
```bash wrap

docs/src/content/docs/reference/tools.md

Lines changed: 55 additions & 215 deletions
Original file line numberDiff line numberDiff line change
@@ -36,45 +36,21 @@ tools:
3636
bash: [":*"] # All commands (use with caution)
3737
```
3838

39-
**Configuration:**
39+
**Configuration:** `bash:` provides default safe commands (`echo`, `ls`, `pwd`, `cat`, `head`, `tail`, `grep`, `wc`, `sort`, `uniq`, `date`). Use `bash: []` to disable, `bash: ["cmd1", "cmd2"]` for specific commands, or `bash: [":*"]` for unrestricted access.
4040

41-
- `bash:` or `bash: null` → Default safe commands: `echo`, `ls`, `pwd`, `cat`, `head`, `tail`, `grep`, `wc`, `sort`, `uniq`, `date`
42-
- `bash: []` → No bash access
43-
- `bash: ["cmd1", "cmd2"]` → Only specified commands
44-
- `bash: [":*"]` or `bash: ["*"]` → All commands (unrestricted)
41+
**Wildcards:** Use `:*` for all commands, or `command:*` for specific command families (e.g., `git:*` allows all git operations).
4542

46-
**Wildcards:**
43+
## Web Tools
4744

48-
```yaml wrap
49-
bash: [":*"] # All bash commands
50-
bash: ["git:*"] # All git commands
51-
bash: ["npm:*", "echo", "ls"] # Mix of wildcards and specific commands
52-
```
53-
54-
- `:*` or `*`: All commands (Copilot uses `--allow-all-tools`)
55-
- `command:*`: All invocations of a specific command (e.g., `git:*` allows `git add`, `git commit`, etc.)
56-
57-
## Web Fetch Tool (`web-fetch:`)
58-
59-
Enables web content fetching.
60-
61-
```yaml wrap
62-
tools:
63-
web-fetch:
64-
```
65-
66-
## Web Search Tool (`web-search:`)
67-
68-
Enables web search (if supported by the AI engine).
45+
Enable web content fetching and search capabilities:
6946

7047
```yaml wrap
7148
tools:
72-
web-search:
49+
web-fetch: # Fetch web content
50+
web-search: # Search the web (engine-dependent)
7351
```
7452

75-
:::note
76-
Some engines (like Copilot) require third-party MCP servers for web search. See [Using Web Search](/gh-aw/guides/web-search/).
77-
:::
53+
**Note:** Some engines require third-party MCP servers for web search. See [Using Web Search](/gh-aw/guides/web-search/).
7854

7955
## GitHub Tools (`github:`)
8056

@@ -83,255 +59,119 @@ Configure GitHub API operations.
8359
```yaml wrap
8460
tools:
8561
github: # Default read-only access
86-
87-
# OR with specific configuration:
8862
github:
89-
allowed: [create_issue, update_issue] # Specific permissions
63+
toolsets: [repos, issues, pull_requests] # Toolset groups (recommended)
64+
allowed: [create_issue, update_issue] # Or specific permissions
9065
mode: remote # "local" (Docker) or "remote" (hosted)
91-
version: "latest" # MCP server version (local only)
92-
args: ["--verbose", "--debug"] # Additional arguments (local only)
9366
read-only: true # Read-only operations
9467
github-token: "${{ secrets.CUSTOM_PAT }}" # Custom token
95-
toolsets: [repos, issues, pull_requests] # Toolset groups
9668
```
9769

9870
### GitHub Toolsets
9971

10072
:::tip[Prefer Toolsets Over Individual Tools]
101-
Use `toolsets:` to enable groups of related tools instead of listing individual tools with `allowed:`. Toolsets provide better organization, reduce configuration verbosity, and ensure you get all related functionality.
73+
Use `toolsets:` to enable groups of related tools instead of listing individual tools with `allowed:`. Toolsets reduce configuration verbosity and ensure complete functionality.
10274
:::
10375

104-
Enables or disables specific GitHub API groups to improve tool selection and reduce context size.
76+
Enable specific GitHub API groups to improve tool selection and reduce context size:
10577

10678
```yaml wrap
10779
tools:
10880
github:
10981
toolsets: [repos, issues, pull_requests, actions]
11082
```
11183

112-
**Available Toolsets**: `context` (recommended), `actions`, `code_security`, `dependabot`, `discussions`, `experiments`, `gists`, `issues`, `labels`, `notifications`, `orgs`, `projects`, `pull_requests`, `repos`, `secret_protection`, `security_advisories`, `stargazers`, `users`, `search`
113-
114-
**Default Toolsets** (when `toolsets:` is not specified): `context`, `repos`, `issues`, `pull_requests`, `users`
115-
116-
**Recommended Combinations**:
117-
- **Read-only workflows**: `toolsets: [default]` or `toolsets: [context, repos]`
118-
- **Issue/PR/Discussion management**: `toolsets: [default, discussions]`
119-
- **CI/CD workflows**: `toolsets: [default, actions]`
120-
- **Security workflows**: `toolsets: [default, code_security, secret_protection]`
121-
- **Full access**: `toolsets: [all]`
122-
123-
#### Tool-to-Toolset Mapping
124-
125-
When migrating from `allowed:` to `toolsets:`, use this mapping to identify the correct toolset for your tools:
126-
127-
| Tool Name | Toolset | Description |
128-
|-----------|---------|-------------|
129-
| `get_me`, `get_teams`, `get_team_members` | `context` | User and environment context |
130-
| `get_repository`, `get_file_contents`, `search_code`, `list_commits`, `get_commit` | `repos` | Repository operations |
131-
| `issue_read`, `list_issues`, `create_issue`, `update_issue`, `search_issues`, `add_reaction` | `issues` | Issue management |
132-
| `pull_request_read`, `list_pull_requests`, `get_pull_request`, `create_pull_request`, `search_pull_requests` | `pull_requests` | Pull request operations |
133-
| `list_workflows`, `list_workflow_runs`, `get_workflow_run`, `download_workflow_run_artifact` | `actions` | GitHub Actions/CI/CD |
134-
| `list_code_scanning_alerts`, `get_code_scanning_alert`, `create_code_scanning_alert` | `code_security` | Code security scanning |
135-
| `list_discussions`, `create_discussion` | `discussions` | GitHub Discussions |
136-
| `get_label`, `list_labels`, `create_label` | `labels` | Label management |
137-
| `list_notifications`, `mark_notifications_read` | `notifications` | Notifications |
138-
| `get_user`, `list_users` | `users` | User profiles |
139-
| `get_organization`, `list_organizations` | `orgs` | Organization management |
140-
| `create_gist`, `list_gists` | `gists` | Gist operations |
141-
| `get_latest_release`, `list_releases` | `repos` | Release management (part of repos) |
142-
| `create_issue_comment` | `issues` | Issue comments (part of issues) |
143-
144-
**Example Migration**:
145-
146-
Before (using `allowed:`):
147-
```yaml wrap
148-
tools:
149-
github:
150-
allowed:
151-
- list_pull_requests
152-
- get_pull_request
153-
- pull_request_read
154-
- list_commits
155-
- get_commit
156-
- get_file_contents
157-
```
84+
**Available Toolsets**: `context`, `repos`, `issues`, `pull_requests`, `users`, `actions`, `code_security`, `discussions`, `labels`, `notifications`, `orgs`, `projects`, `gists`, `search`, `dependabot`, `experiments`, `secret_protection`, `security_advisories`, `stargazers`
15885

159-
After (using `toolsets:`):
160-
```yaml wrap
161-
tools:
162-
github:
163-
toolsets: [default] # Includes repos and pull_requests
164-
```
86+
**Default**: `context`, `repos`, `issues`, `pull_requests`, `users`
16587

166-
Or for more specific control:
167-
```yaml wrap
168-
tools:
169-
github:
170-
toolsets: [repos, pull_requests]
171-
```
88+
**Common Combinations**:
89+
- Read-only: `[default]` or `[context, repos]`
90+
- Issue/PR management: `[default, discussions]`
91+
- CI/CD: `[default, actions]`
92+
- Security: `[default, code_security, secret_protection]`
93+
- Full access: `[all]`
17294

173-
:::note
174-
Both `toolsets:` and `allowed:` can be used together. When specified, `allowed:` further restricts which tools are available within the enabled toolsets.
175-
:::
95+
#### Toolset Contents
96+
97+
Common toolsets include:
98+
- **context**: User/team info (`get_me`, `get_teams`, `get_team_members`)
99+
- **repos**: Repository operations (`get_repository`, `get_file_contents`, `search_code`, `list_commits`, releases)
100+
- **issues**: Issue management (`list_issues`, `create_issue`, `update_issue`, `search_issues`, comments, reactions)
101+
- **pull_requests**: PR operations (`list_pull_requests`, `get_pull_request`, `create_pull_request`, `search_pull_requests`)
102+
- **actions**: Workflows and runs (`list_workflows`, `list_workflow_runs`, `get_workflow_run`, artifacts)
103+
- **code_security**: Security scanning alerts
104+
- **discussions**: GitHub Discussions
105+
- **labels**: Label management
176106

177-
**Supported Modes**: Toolsets are supported in both local (Docker) and remote (hosted) modes.
107+
Combine `toolsets:` with `allowed:` to further restrict available tools within enabled toolsets. Toolsets work in both local (Docker) and remote (hosted) modes.
178108

179-
### GitHub Remote Mode
109+
### Modes and Restrictions
180110

181-
Uses the hosted GitHub MCP server at `https://api.githubcopilot.com/mcp/` for faster startup without Docker.
111+
**Remote Mode**: Use the hosted GitHub MCP server for faster startup without Docker. Requires setting `GH_AW_GITHUB_TOKEN` secret (standard `GITHUB_TOKEN` not supported):
182112

183113
```yaml wrap
184114
tools:
185115
github:
186-
mode: remote
187-
allowed: [list_issues, create_issue]
116+
mode: remote # Default is "local" (Docker)
188117
```
189118

190-
**Setup**: Create a Personal Access Token and set the `GH_AW_GITHUB_TOKEN` secret:
119+
Setup: `gh secret set GH_AW_GITHUB_TOKEN -a actions --body "<your-pat>"`
191120

192-
```bash wrap
193-
gh secret set GH_AW_GITHUB_TOKEN -a actions --body "<your-github-pat>"
194-
```
195-
196-
**Note**: Remote mode requires `GH_AW_GITHUB_TOKEN` (standard `GITHUB_TOKEN` is not supported).
197-
198-
### GitHub Read-Only Mode
199-
200-
Restricts GitHub API to read-only operations.
121+
**Read-Only Mode**: Restrict to read-only operations (default behavior unless write operations configured):
201122

202123
```yaml wrap
203124
tools:
204125
github:
205126
read-only: true
206127
```
207128

208-
Default: `github:` provides read-only access.
209-
210129
## Playwright Tool (`playwright:`)
211130

212-
Enables browser automation using containerized Playwright.
131+
Enables browser automation using containerized Playwright with domain-based access control:
213132

214133
```yaml wrap
215134
tools:
216135
playwright:
217-
version: "latest" # Playwright version
218-
args: ["--browser", "chromium"] # Additional arguments
219136
allowed_domains: ["defaults", "github", "*.custom.com"] # Domain access
220137
```
221138

222-
**Domain Access**: Uses same ecosystem bundles as `network:` configuration (`defaults`, `github`, `node`, `python`, etc.). Default: `["localhost", "127.0.0.1"]` for security.
223-
224-
```yaml wrap
225-
playwright:
226-
allowed_domains:
227-
- "defaults" # Basic infrastructure
228-
- "github" # GitHub domains
229-
- "*.example.com" # Custom wildcard
230-
```
139+
**Domain Access**: Uses same ecosystem bundles as `network:` configuration (`defaults`, `github`, `node`, `python`, etc.). Default is `["localhost", "127.0.0.1"]` for security. Supports wildcards like `*.example.com`.
231140

232141
## Custom MCP Servers (`mcp-servers:`)
233142

234-
Use `mcp-servers:` to integrate custom Model Context Protocol servers for third-party services, APIs, or specialized tools.
235-
236-
### Basic Configuration
143+
Integrate custom Model Context Protocol servers for third-party services, APIs, or specialized tools:
237144

238-
**npx-based MCP server:**
239145
```yaml wrap
240146
mcp-servers:
241-
custom-api:
242-
command: "npx"
243-
args: ["-y", "@company/custom-mcp-server"]
244-
env:
245-
API_KEY: "${{ secrets.CUSTOM_API_KEY }}"
246-
```
247-
248-
**Node.js script:**
249-
```yaml wrap
250-
mcp-servers:
251-
analytics:
252-
command: "node"
253-
args: ["scripts/analytics-mcp-server.js"]
254-
env:
255-
ANALYTICS_TOKEN: "${{ secrets.ANALYTICS_TOKEN }}"
256-
```
257-
258-
**Python MCP server:**
259-
```yaml wrap
260-
mcp-servers:
261-
data-processor:
262-
command: "python"
263-
args: ["-m", "data_processor.mcp_server"]
147+
slack:
148+
command: "npx" # or "node", "python"
149+
args: ["-y", "@slack/mcp-server"]
264150
env:
265-
DATABASE_URL: "${{ secrets.DATABASE_URL }}"
266-
API_TIMEOUT: "30"
267-
```
151+
SLACK_BOT_TOKEN: "${{ secrets.SLACK_BOT_TOKEN }}"
152+
allowed: ["send_message", "get_channel_history"]
268153
269-
**Docker container:**
270-
```yaml wrap
271-
mcp-servers:
272154
notion:
273-
container: "mcp/notion"
155+
container: "mcp/notion" # Docker alternative
274156
env:
275157
NOTION_API_TOKEN: "${{ secrets.NOTION_API_TOKEN }}"
276-
allowed:
277-
- "search_pages"
278-
- "get_page"
279-
- "query_database"
280-
```
158+
allowed: ["search_pages", "get_page"]
281159
282-
**HTTP MCP server:**
283-
```yaml wrap
284-
mcp-servers:
285160
datadog:
286-
url: "https://mcp.datadoghq.com/api/unstable/mcp-server/mcp"
161+
url: "https://mcp.datadoghq.com/api/unstable/mcp-server/mcp" # HTTP alternative
287162
headers:
288163
DD_API_KEY: "${{ secrets.DD_API_KEY }}"
289-
DD_APPLICATION_KEY: "${{ secrets.DD_APPLICATION_KEY }}"
290-
allowed:
291-
- "search_datadog_dashboards"
292-
- "get_datadog_metric"
164+
allowed: ["search_datadog_dashboards"]
293165
```
294166

295-
### Configuration Fields
296-
297-
- **`command:`** - Executable command (e.g., `"node"`, `"python"`, `"npx"`)
298-
- **`args:`** - Command arguments as array of strings
299-
- **`env:`** - Environment variables for the MCP server process
300-
- **`container:`** - Docker container image (alternative to `command`)
301-
- **`url:`** - HTTP endpoint for remote MCP servers (alternative to `command`)
302-
- **`headers:`** - HTTP headers for authentication (used with `url`)
303-
- **`allowed:`** - List of allowed tool names from the MCP server
304-
305-
### Complete Example
306-
307-
Combining GitHub tools with custom MCP servers:
308-
309-
```yaml wrap
310-
tools:
311-
github:
312-
allowed: [create_issue, update_issue]
313-
314-
mcp-servers:
315-
slack:
316-
command: "npx"
317-
args: ["-y", "@slack/mcp-server"]
318-
env:
319-
SLACK_BOT_TOKEN: "${{ secrets.SLACK_BOT_TOKEN }}"
320-
SLACK_TEAM_ID: "${{ secrets.SLACK_TEAM_ID }}"
321-
allowed:
322-
- "send_message"
323-
- "get_channel_history"
324-
325-
notion:
326-
container: "mcp/notion"
327-
env:
328-
NOTION_API_TOKEN: "${{ secrets.NOTION_API_TOKEN }}"
329-
allowed:
330-
- "search_pages"
331-
- "get_page"
332-
```
167+
**Configuration Options**:
168+
- `command:` + `args:` - Process-based MCP server (Node.js, Python, etc.)
169+
- `container:` - Docker container image
170+
- `url:` + `headers:` - HTTP endpoint with authentication
171+
- `env:` - Environment variables for the MCP server
172+
- `allowed:` - Restrict to specific tool names
333173

334-
MCP servers run alongside the AI engine in isolated environments with controlled network access. See [MCPs Guide](/gh-aw/guides/mcps/) for detailed setup instructions and examples.
174+
MCP servers run in isolated environments with controlled network access. See [MCPs Guide](/gh-aw/guides/mcps/) for detailed setup instructions.
335175

336176
## Related Documentation
337177

0 commit comments

Comments
 (0)