Guide
Expose only the tools your workflow needs using presets.

The SDK ships a large tool catalog so you can build almost any GitHub agent. Presets are how you keep that catalog out of the model's context: each preset exposes only the tools for one workflow. Start with the smallest preset that fits; use maintainer or omit preset when you need the full surface.

Tighten GitHub tool scope with presets

Compose agents around presets

ShapeWhen to use
One presetA single job (review PRs, triage issues, cut releases)
Array of presetsOne agent that spans a few related domains
Manager + sub-agentsSeveral distinct roles — each specialist mounts one preset (example)
maintainer / omit presetPrototyping or a genuine need for the full catalog

Apply a single preset

Use a preset to restrict the tools to a specific capability domain. For example, a code review agent only needs pull request and commit tools:

review-agent.ts
import { createGithubTools } from '@github-tools/sdk'

const tools = createGithubTools({
  preset: 'code-review',
})

Focused operator workflows:

security-audit-agent.ts
import { createGithubTools } from '@github-tools/sdk'

const tools = createGithubTools({
  preset: 'security-audit',
})
pr-author-agent.ts
import { createGithubTools } from '@github-tools/sdk'

const tools = createGithubTools({
  preset: 'pr-author',
})

Combine multiple presets

When a workflow spans multiple domains, pass an array. This agent can both review PRs and manage issues:

triage-and-review.ts
import { createGithubTools } from '@github-tools/sdk'

const tools = createGithubTools({
  preset: ['code-review', 'issue-triage'],
})

Pick the right preset

PresetTools includedUse case
repo-explorerrepository metadata, branches, file content, repo tree, code and issue search, discussions, gists, workflows, checks/statuses, releasesknowledge retrieval, repo Q&A
ci-opsworkflows, runs, jobs, job logs, checks/statuses, commits, repository contextCI monitoring, build ops
code-reviewpull requests, commits, compare diff, file diffs, checks/statuses, updates, review comments, review threads, reviewer requestsPR copilots, change summaries
issue-triageissues, issue search, labels, comments, reactions, assignees, close/create/update/reopensupport triage, backlog bots
security-auditread-only exploration, code and issue search, PR/CI visibility, checks/statuses, compare diff, plus issue creation to report findingsvulnerability scanning, risk reporting
release-managerreleases, compare diff, commits, workflow runs, pull requests, update/delete releaseschangelog generation, release cutting
discussion-moderatordiscussions list/get/comment, plus light issue contextforum / Q&A bots
notification-inboxnotifications list/mark-read, plus get issue/PR/repoinbox triage (needs a Notifications PAT)
pr-authorbranches (create/delete), file edits, create/update pull requests, review threads, compareopen focused PRs and address review feedback without full maintainer
maintainerall tool families including branch creation, forking, repo creation, discussions, notifications, gists, and workflowsfull operator workflows with approval control

Pair presets with token scopes

Each preset maps to specific GitHub token permissions:

  • repo-explorer: read-only token, no write permissions needed (add discussions: read for the discussion tools)
  • code-review: add pull_requests: write only if comments or reviewer requests are needed
  • issue-triage: add issues: write (also covers reactions)
  • ci-ops: add actions: write for triggering, cancelling, and re-running workflows
  • security-audit: read-only token, plus issues: write to report findings
  • release-manager: add contents: write for creating releases, actions: write if triggering release pipelines
  • discussion-moderator: add discussions: write and issues: write for cross-linking replies
  • notification-inbox: repository read scopes plus a user PAT with the "Notifications" account permission (not available on Connect installation tokens)
  • pr-author: add contents: write and pull_requests: write
  • maintainer: all write scopes, always paired with approval control; notification tools additionally need a PAT with the "Notifications" account permission
Default to the smallest preset that can complete the task. Add more capabilities only after your prompt and approval policy are stable.

External references