diff --git a/.github/aw/github-mcp-server.md b/.github/aw/github-mcp-server.md index e0a05420b8c..94d054d2245 100644 --- a/.github/aw/github-mcp-server.md +++ b/.github/aw/github-mcp-server.md @@ -204,6 +204,8 @@ The following toolsets are recommended as defaults for typical agentic workflows | `get_code_scanning_alert` | Get details of a specific code scanning alert | `owner`, `repo`, `alert_number` | | `list_code_scanning_alerts` | List code scanning alerts for a repository | `owner`, `repo`, `state`, `severity` | +When calling `list_code_scanning_alerts` in workflow prompts/templates, always bound requests with `state: open` and `severity: critical,high`. + --- ### dependabot @@ -368,4 +370,3 @@ Most toolsets work with the default `GITHUB_TOKEN` in GitHub Actions. Exceptions - `projects` — Requires a PAT with `project` scope - `security_advisories` (write) — Requires `security-events: write` permission - `actions` (write for `actions_run_trigger`) — Requires `actions: write` permission - diff --git a/.github/skills/github-mcp-server/SKILL.md b/.github/skills/github-mcp-server/SKILL.md index c436d331ed8..012181c22a0 100644 --- a/.github/skills/github-mcp-server/SKILL.md +++ b/.github/skills/github-mcp-server/SKILL.md @@ -108,7 +108,7 @@ The following toolsets are enabled by default when `toolsets:` is not specified: | `issues` | Issue management | `issue_read`, `list_issues`, `create_issue`, `search_issues` | | `pull_requests` | Pull request operations | `pull_request_read`, `list_pull_requests`, `create_pull_request` | | `actions` | GitHub Actions/CI/CD | `list_workflows`, `list_workflow_runs`, `download_workflow_run_artifact` | -| `code_security` | Code scanning and security | `list_code_scanning_alerts`, `get_code_scanning_alert` | +| `code_security` | Code scanning and security | `list_code_scanning_alerts` ⚠️ (always include `state: open` and `severity: critical,high`), `get_code_scanning_alert` | | `dependabot` | Dependency management | Dependabot alerts and updates | | `discussions` | GitHub Discussions | `list_discussions`, `create_discussion` | | `experiments` | Experimental features | Unstable/preview APIs | @@ -173,6 +173,8 @@ This section maps individual tools to their respective toolsets to help with mig - `get_code_scanning_alert` - Get details of a specific alert - `create_code_scanning_alert` - Create a code scanning alert +When invoking `list_code_scanning_alerts` from workflow prompts/templates, always include `state: open` and `severity: critical,high`. + ### Discussions Toolset - `list_discussions` - List discussions in a repository - `create_discussion` - Create a new discussion @@ -292,7 +294,7 @@ Use this table to identify which toolset contains the tools you need: | `issue_read`, `list_issues`, `create_issue`, `update_issue`, `search_issues` | `issues` | | `pull_request_read`, `list_pull_requests`, `create_pull_request` | `pull_requests` | | `list_workflows`, `list_workflow_runs`, `get_workflow_run` | `actions` | -| `list_code_scanning_alerts`, `get_code_scanning_alert` | `code_security` | +| `list_code_scanning_alerts` ⚠️ (always include `state: open` and `severity: critical,high`), `get_code_scanning_alert` | `code_security` | | `list_discussions`, `create_discussion` | `discussions` | | `get_label`, `list_labels`, `create_label` | `labels` | | `get_user`, `list_users` | `users` | diff --git a/docs/src/content/docs/guides/mcps.md b/docs/src/content/docs/guides/mcps.md index fa4fee903a5..81e2117ce8f 100644 --- a/docs/src/content/docs/guides/mcps.md +++ b/docs/src/content/docs/guides/mcps.md @@ -61,6 +61,8 @@ The GitHub MCP server is built into agentic workflows and provides comprehensive | `code_security` | Security alerts | `list_code_scanning_alerts` | | `users` | User profiles | `get_me` ⚠️, `get_user`, `list_users` | +When calling `list_code_scanning_alerts` from workflow prompts, always bound the request with `state: open` and `severity: critical,high`. + The `default` toolset includes: `context`, `repos`, `issues`, `pull_requests`. When used in workflows, `[default]` expands to action-friendly toolsets that work with GitHub Actions tokens. Note: The `users` toolset is not included by default as GitHub Actions tokens do not support user operations. > [!WARNING]