Reduce default GitLab MCP tool surface#547
Conversation
📝 WalkthroughWalkthroughIntroduces a new ChangesLean core toolset + opt-in restructure
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/configuration/environment-variables.md`:
- Around line 330-333: The special value documentation for restoring pre-lean
default toolsets in environment-variables.md is missing the required
GITLAB_TOOLSETS= prefix, making it unclear how users should actually apply this
value. Update the special value entry around line 333 that currently shows just
"merge_requests,issues,repositories,branches,projects,labels,ci,groups,users" to
prepend it with GITLAB_TOOLSETS= so it reads
"GITLAB_TOOLSETS=merge_requests,issues,repositories,branches,projects,labels,ci,groups,users",
matching the format produced by the upstream generator in
scripts/generate-tool-docs.ts (lines 295–320).
In `@test/test-toolset-filtering.ts`:
- Line 39: The constant NON_DEFAULT_TOOLSETS defined in the test file is
assigned but never used anywhere, which triggers an ESLint error. Remove this
unused constant declaration entirely from the file to resolve the lint failure.
In `@tools/registry.ts`:
- Around line 1869-1875: The map TOOLSET_BY_TOOL_NAME declared alongside
TOOLSETS_BY_TOOL_NAME is never read from in the codebase and is redundant.
Remove the unused TOOLSET_BY_TOOL_NAME map declaration and any code that
populates it within the loop that iterates over TOOLSET_DEFINITIONS. Ensure that
only TOOLSETS_BY_TOOL_NAME remains, which correctly maintains the set of
toolsets for each tool name.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: bbf6442d-e144-4d76-acbe-8a47c8baf802
📒 Files selected for processing (20)
README.mddocs/configuration/environment-variables.mddocs/getting-started/cli-arguments.mddocs/tools/branches.mddocs/tools/ci.mddocs/tools/core.mddocs/tools/groups.mddocs/tools/index.mddocs/tools/issues.mddocs/tools/labels.mddocs/tools/merge-requests.mddocs/tools/meta.mddocs/tools/projects.mddocs/tools/repositories.mddocs/tools/users.mdmkdocs.ymlscripts/generate-tool-docs.tsskills/gitlab-mcp/SKILL.mdtest/test-toolset-filtering.tstools/registry.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: test
- GitHub Check: coverage
🧰 Additional context used
🪛 ESLint
test/test-toolset-filtering.ts
[error] 39-39: 'NON_DEFAULT_TOOLSETS' is assigned a value but never used.
(@typescript-eslint/no-unused-vars)
🔇 Additional comments (23)
tools/registry.ts (1)
1482-1482: LGTM!Also applies to: 1511-1553, 1602-1602, 1632-1632, 1645-1645, 1666-1666, 1682-1682, 1693-1693, 1703-1703, 1788-1788, 1952-1958
scripts/generate-tool-docs.ts (1)
55-59: LGTM!Also applies to: 146-146, 277-279, 312-312
test/test-toolset-filtering.ts (1)
19-21: LGTM!Also applies to: 30-38, 41-87, 96-108, 209-224, 483-488
docs/tools/core.md (1)
1-42: LGTM!The core toolset documentation is comprehensive and well-structured. The tool list is complete with 35 tools correctly categorized (merge requests, issues, repositories, branches, projects, labels, identity), and the detailed documentation with parameter tables follows consistent formatting.
mkdocs.yml (1)
87-87: LGTM!The nav entry correctly registers the new core toolset documentation in the sidebar.
docs/tools/index.md (5)
19-20: LGTM!Default/opt-in structure is clear and correct. Default is exclusively Core, and the opt-in list comprehensively covers all 19 other toolsets.
26-26: LGTM!The restore value
GITLAB_TOOLSETS=merge_requests,issues,repositories,branches,projects,labels,ci,groups,userscorrectly documents the pre-lean default set and matches the value in the doc generator (scripts/generate-tool-docs.ts:315).
46-93: LGTM!Core section is prominent and accurate: title, description, "(35 tools)" count, and full tool table all align with core.md inventory. The core tools table rows match the 35 tools listed in core.md (lines 7-41) with no discrepancies.
92-92: LGTM!All opt-in notes follow the standard format from generate-tool-docs.ts and correctly specify the toolset ID and activation methods (GITLAB_TOOLSETS, GITLAB_TOOLS, discover_tools).
Also applies to: 111-111, 127-127, 151-151, 161-161, 213-213, 246-246, 287-287, 395-395
472-472: LGTM!The
discover_toolsavailable categories list includes core and all 19 other toolsets (20 total), accurately reflecting the new toolset inventory.docs/getting-started/cli-arguments.md (1)
35-36: LGTM!The two new CLI argument rows correctly document the toolsets and tools options, with clear descriptions of default behavior (lean core) and additive tool selection. These map to GITLAB_TOOLSETS_RAW and GITLAB_TOOLS_RAW in config.ts.
README.md (1)
96-97: LGTM!The CLI argument documentation is consistent with docs/getting-started/cli-arguments.md and correctly specifies the lean
coredefault and additive tool selection. The descriptions are appropriately verbose for a README audience.skills/gitlab-mcp/SKILL.md (1)
8-35: LGTM!The toolsets table and introduction accurately reflect the new default/opt-in structure. Core is correctly marked as default with 35 tools, all 19 other toolsets are marked opt-in with their tool counts, and the restore instruction on line 35 matches the index.md value exactly. The 204 total / 202 unique count is consistent with multi-toolset tool membership.
docs/tools/branches.md (1)
5-7: LGTM!docs/tools/ci.md (1)
5-7: LGTM!docs/tools/groups.md (1)
5-7: LGTM!docs/tools/issues.md (1)
5-7: LGTM!docs/tools/labels.md (1)
5-7: LGTM!docs/tools/merge-requests.md (1)
5-7: LGTM!docs/tools/meta.md (1)
32-32: LGTM!docs/tools/projects.md (1)
5-7: LGTM!docs/tools/repositories.md (1)
5-7: LGTM!docs/tools/users.md (1)
5-7: LGTM!
| ]; | ||
| const DEFAULT_TOOLSETS = TOOLSET_DEFINITIONS.filter(def => def.isDefault).map(def => def.id); | ||
|
|
||
| const NON_DEFAULT_TOOLSETS = TOOLSET_DEFINITIONS.filter(def => !def.isDefault).map(def => def.id); |
There was a problem hiding this comment.
Remove unused NON_DEFAULT_TOOLSETS constant to clear lint failure.
This constant is assigned but never used, and ESLint flags it as an error.
Suggested fix
-const NON_DEFAULT_TOOLSETS = TOOLSET_DEFINITIONS.filter(def => !def.isDefault).map(def => def.id);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const NON_DEFAULT_TOOLSETS = TOOLSET_DEFINITIONS.filter(def => !def.isDefault).map(def => def.id); |
🧰 Tools
🪛 ESLint
[error] 39-39: 'NON_DEFAULT_TOOLSETS' is assigned a value but never used.
(@typescript-eslint/no-unused-vars)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@test/test-toolset-filtering.ts` at line 39, The constant NON_DEFAULT_TOOLSETS
defined in the test file is assigned but never used anywhere, which triggers an
ESLint error. Remove this unused constant declaration entirely from the file to
resolve the lint failure.
Source: Linters/SAST tools
| export const TOOLSETS_BY_TOOL_NAME = new Map<string, Set<ToolsetId>>(); | ||
| export const TOOLSET_BY_TOOL_NAME = new Map<string, ToolsetId>(); | ||
| for (const def of TOOLSET_DEFINITIONS) { | ||
| for (const tool of def.tools) { | ||
| if (TOOLSET_BY_TOOL_NAME.has(tool)) { | ||
| console.warn( | ||
| `Tool "${tool}" is defined in multiple toolsets: "${TOOLSET_BY_TOOL_NAME.get(tool)}" and "${def.id}"` | ||
| ); | ||
| } | ||
| const toolsets = TOOLSETS_BY_TOOL_NAME.get(tool) ?? new Set<ToolsetId>(); | ||
| toolsets.add(def.id); | ||
| TOOLSETS_BY_TOOL_NAME.set(tool, toolsets); |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# 1) Find all references to both maps with context
rg -n -C3 '\bTOOLSET_BY_TOOL_NAME\b|\bTOOLSETS_BY_TOOL_NAME\b'
# 2) Specifically inspect call-sites using .get(...)
rg -n -C3 'TOOLSET_BY_TOOL_NAME\.get\(|TOOLSETS_BY_TOOL_NAME\.get\('
# 3) Check whether single-map lookups are used in gating/filtering logic
rg -n -C3 'isToolInEnabledToolset|enabledToolsets|filter\(tool =>'Repository: zereight/gitlab-mcp
Length of output: 5750
Old map TOOLSET_BY_TOOL_NAME is unused and can be removed.
The old single-map is still populated at line 1876 but never read from anywhere in the codebase. The filtering logic correctly uses TOOLSETS_BY_TOOL_NAME and properly iterates through all toolsets for each tool via isToolInEnabledToolset(). No functional correctness issue exists, but consider removing the redundant population of TOOLSET_BY_TOOL_NAME at line 1876.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tools/registry.ts` around lines 1869 - 1875, The map TOOLSET_BY_TOOL_NAME
declared alongside TOOLSETS_BY_TOOL_NAME is never read from in the codebase and
is redundant. Remove the unused TOOLSET_BY_TOOL_NAME map declaration and any
code that populates it within the loop that iterates over TOOLSET_DEFINITIONS.
Ensure that only TOOLSETS_BY_TOOL_NAME remains, which correctly maintains the
set of toolsets for each tool name.
ea91cb0 to
b24f928
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (1)
docs/configuration/environment-variables.md (1)
330-333:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winRestore the
GITLAB_TOOLSETS=prefix.The pre-lean restore value is still missing the variable name, so users cannot copy it directly. This also repeats the earlier documentation issue.
Fix
-- `merge_requests,issues,repositories,branches,projects,labels,ci,groups,users` — restore the pre-lean default set. +- `GITLAB_TOOLSETS=merge_requests,issues,repositories,branches,projects,labels,ci,groups,users` — restore the pre-lean default set.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/configuration/environment-variables.md` around lines 330 - 333, The pre-lean default set value in the special values list is missing the GITLAB_TOOLSETS= prefix. Update the second bullet point in the special values section to include the GITLAB_TOOLSETS= prefix before the comma-separated toolset list so that users can directly copy and paste the complete configuration value without needing to add the variable name themselves.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/tools/index.md`:
- Around line 19-20: The Meta & GraphQL entry is incorrectly included in the
opt-in toolsets row because it does not follow the same enablement pattern as
other toolsets. Remove Meta & GraphQL from the opt-in toolsets list on line 20
(the row containing Projects & Namespaces through Search, Dependency Proxy, and
Meta & GraphQL). Create a separate documentation section or note that clearly
explains Meta & GraphQL tools are handled differently: discover_tools is always
available and execute_graphql is enabled through GITLAB_TOOLS configuration, not
through TOOLSET_DEFINITIONS like the other opt-in tools.
- Around line 46-48: The tool count listed in the Core section description is
outdated. Update the number from 35 to 36 in the description text within the
Core section to accurately reflect the current number of tools available.
In `@skills/gitlab-mcp/SKILL.md`:
- Around line 8-35: The opening summary on line 8 states "202 tools across 20
toolsets" but the toolsets table below that contains core, merge_requests,
issues, repositories, branches, projects, labels, ci, groups, users, pipelines,
milestones, wiki, releases, tags, workitems, webhooks, search, variables, and
dependency_proxy actually sums to 239 tools total. Update the summary line to
reflect the correct tool count of 239 tools across 20 toolsets, and adjust the
total count from 204 to 241 (239 toolset tools plus the 2 meta-tools
execute_graphql and discover_tools).
---
Duplicate comments:
In `@docs/configuration/environment-variables.md`:
- Around line 330-333: The pre-lean default set value in the special values list
is missing the GITLAB_TOOLSETS= prefix. Update the second bullet point in the
special values section to include the GITLAB_TOOLSETS= prefix before the
comma-separated toolset list so that users can directly copy and paste the
complete configuration value without needing to add the variable name
themselves.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: f6eee8c0-cf84-4150-b974-46ef0cc0afaa
📒 Files selected for processing (22)
README.mddocs/configuration/environment-variables.mddocs/getting-started/cli-arguments.mddocs/tools/branches.mddocs/tools/ci.mddocs/tools/core.mddocs/tools/groups.mddocs/tools/index.mddocs/tools/issues.mddocs/tools/labels.mddocs/tools/merge-requests.mddocs/tools/meta.mddocs/tools/projects.mddocs/tools/repositories.mddocs/tools/users.mdmkdocs.ymlscripts/generate-tool-docs.tsskills/gitlab-mcp/SKILL.mdtest/test-ci-lint.tstest/test-todos.tstest/test-toolset-filtering.tstools/registry.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: test
- GitHub Check: coverage
🧰 Additional context used
🪛 ESLint
test/test-toolset-filtering.ts
[error] 39-39: 'NON_DEFAULT_TOOLSETS' is assigned a value but never used.
(@typescript-eslint/no-unused-vars)
🔇 Additional comments (13)
tools/registry.ts (1)
1869-1870: Remove stale single-toolset map export.Line 1870 still exports
TOOLSET_BY_TOOL_NAME, which was already flagged as redundant after introducingTOOLSETS_BY_TOOL_NAME.test/test-toolset-filtering.ts (1)
39-39: Drop unusedNON_DEFAULT_TOOLSETSto fix lint.Line 39 defines a constant that remains unused and has already been reported in earlier review feedback.
Source: Linters/SAST tools
docs/tools/ci.md (1)
5-7: LGTM!docs/tools/groups.md (1)
5-7: LGTM!docs/tools/issues.md (1)
5-7: LGTM!docs/tools/labels.md (1)
5-7: LGTM!docs/tools/merge-requests.md (1)
5-7: LGTM!docs/tools/branches.md (1)
5-7: LGTM!docs/tools/meta.md (1)
32-32: LGTM!docs/tools/projects.md (1)
5-7: LGTM!docs/tools/repositories.md (1)
5-7: LGTM!docs/tools/users.md (1)
5-7: LGTM!docs/configuration/environment-variables.md (1)
325-329: LGTM!
| | **Default** — always exposed | [Core](core.md) | | ||
| | **Opt-in** — must be enabled | [Projects & Namespaces](projects.md), [Projects & Files](repositories.md), [Branches & Commits](branches.md), [Groups](groups.md), [Merge Requests](merge-requests.md), [Issues](issues.md), [Labels](labels.md), [Work Items](workitems.md), [CI Lint](ci.md), [Pipelines, Jobs & Deployments](pipelines.md) (also `USE_PIPELINE=true`), [Milestones](milestones.md) (also `USE_MILESTONE=true`), [Wiki](wiki.md) (also `USE_GITLAB_WIKI=true`), [Releases](releases.md), [Tags](tags.md), [Users & Events](users.md), [Variables](variables.md), [Webhooks](webhooks.md), [Search](search.md), [Dependency Proxy](dependency-proxy.md), [Meta & GraphQL](meta.md) | |
There was a problem hiding this comment.
Keep the Meta & GraphQL note separate from toolset enablement.
Meta & GraphQL is not a toolset in TOOLSET_DEFINITIONS; discover_tools is always available and execute_graphql is enabled through GITLAB_TOOLS. Putting it in the opt-in toolset matrix makes the enablement story inconsistent.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/tools/index.md` around lines 19 - 20, The Meta & GraphQL entry is
incorrectly included in the opt-in toolsets row because it does not follow the
same enablement pattern as other toolsets. Remove Meta & GraphQL from the opt-in
toolsets list on line 20 (the row containing Projects & Namespaces through
Search, Dependency Proxy, and Meta & GraphQL). Create a separate documentation
section or note that clearly explains Meta & GraphQL tools are handled
differently: discover_tools is always available and execute_graphql is enabled
through GITLAB_TOOLS configuration, not through TOOLSET_DEFINITIONS like the
other opt-in tools.
| ### [Core](core.md) | ||
|
|
||
| Lean default starter set for common MR, issue, repository, branch, project, label, and identity workflows. *(35 tools)* |
There was a problem hiding this comment.
Fix the Core tool count.
The Core section now lists 36 tools, so the “35 tools” label is off by one.
Suggested fix
-*(35 tools)*
+*(36 tools)*📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ### [Core](core.md) | |
| Lean default starter set for common MR, issue, repository, branch, project, label, and identity workflows. *(35 tools)* | |
| ### [Core](core.md) | |
| Lean default starter set for common MR, issue, repository, branch, project, label, and identity workflows. *(36 tools)* |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/tools/index.md` around lines 46 - 48, The tool count listed in the Core
section description is outdated. Update the number from 35 to 36 in the
description text within the Core section to accurately reflect the current
number of tools available.
| GitLab MCP server providing 204 tools total: 202 tools across 20 toolsets, plus `execute_graphql` and the always-available `discover_tools` meta-tool. | ||
|
|
||
| ## Toolsets | ||
|
|
||
| | Toolset | Default | Enable with | | ||
| | ------------------------- | ------- | ---------------------------------------------------- | | ||
| | merge_requests (41 tools) | yes | - | | ||
| | issues (23 tools) | yes | - | | ||
| | repositories (7 tools) | yes | - | | ||
| | branches (6 tools) | yes | - | | ||
| | projects (8 tools) | yes | - | | ||
| | labels (5 tools) | yes | - | | ||
| | ci (2 tools) | yes | - | | ||
| | users (5 tools) | yes | - | | ||
| | pipelines (19 tools) | no | `USE_PIPELINE=true` or `GITLAB_TOOLSETS=pipelines` | | ||
| | milestones (9 tools) | no | `USE_MILESTONE=true` or `GITLAB_TOOLSETS=milestones` | | ||
| | wiki (10 tools) | no | `USE_GITLAB_WIKI=true` or `GITLAB_TOOLSETS=wiki` | | ||
| | releases (7 tools) | no | `GITLAB_TOOLSETS=releases` | | ||
| | tags (5 tools) | no | `GITLAB_TOOLSETS=tags` | | ||
| | workitems (18 tools) | no | `GITLAB_TOOLSETS=workitems` | | ||
| | webhooks (3 tools) | no | `GITLAB_TOOLSETS=webhooks` | | ||
| | search (3 tools) | no | `GITLAB_TOOLSETS=search` | | ||
|
|
||
| Enable all: `GITLAB_TOOLSETS=all`. Use `GITLAB_TOOLS` to enable individual tools outside their toolset. `discover_tools` can activate opt-in categories for the current session. | ||
| | Toolset | Default | Enable with | | ||
| | -------------------------- | ------- | ---------------------------------------------------- | | ||
| | core (35 tools) | yes | default lean starter set | | ||
| | merge_requests (43 tools) | no | `GITLAB_TOOLSETS=merge_requests` | | ||
| | issues (24 tools) | no | `GITLAB_TOOLSETS=issues` | | ||
| | repositories (7 tools) | no | `GITLAB_TOOLSETS=repositories` | | ||
| | branches (15 tools) | no | `GITLAB_TOOLSETS=branches` | | ||
| | projects (10 tools) | no | `GITLAB_TOOLSETS=projects` | | ||
| | labels (5 tools) | no | `GITLAB_TOOLSETS=labels` | | ||
| | ci (4 tools) | no | `GITLAB_TOOLSETS=ci` | | ||
| | groups (1 tool) | no | `GITLAB_TOOLSETS=groups` | | ||
| | users (7 tools) | no | `GITLAB_TOOLSETS=users` | | ||
| | pipelines (19 tools) | no | `USE_PIPELINE=true` or `GITLAB_TOOLSETS=pipelines` | | ||
| | milestones (9 tools) | no | `USE_MILESTONE=true` or `GITLAB_TOOLSETS=milestones` | | ||
| | wiki (10 tools) | no | `USE_GITLAB_WIKI=true` or `GITLAB_TOOLSETS=wiki` | | ||
| | releases (7 tools) | no | `GITLAB_TOOLSETS=releases` | | ||
| | tags (5 tools) | no | `GITLAB_TOOLSETS=tags` | | ||
| | workitems (18 tools) | no | `GITLAB_TOOLSETS=workitems` | | ||
| | webhooks (3 tools) | no | `GITLAB_TOOLSETS=webhooks` | | ||
| | search (3 tools) | no | `GITLAB_TOOLSETS=search` | | ||
| | variables (10 tools) | no | `GITLAB_TOOLSETS=variables` | | ||
| | dependency_proxy (4 tools) | no | `GITLAB_TOOLSETS=dependency_proxy` | | ||
|
|
||
| Enable all: `GITLAB_TOOLSETS=all`. Restore the pre-lean default with `GITLAB_TOOLSETS=merge_requests,issues,repositories,branches,projects,labels,ci,groups,users`. Use `GITLAB_TOOLS` to enable individual tools outside their toolset. `discover_tools` can activate opt-in categories for the current session. |
There was a problem hiding this comment.
Fix the tool-count summary.
Line 8 says 202 tools across 20 toolsets, but the table below sums to 239 tools across those same 20 toolsets. Please update the intro so it matches the actual inventory.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@skills/gitlab-mcp/SKILL.md` around lines 8 - 35, The opening summary on line
8 states "202 tools across 20 toolsets" but the toolsets table below that
contains core, merge_requests, issues, repositories, branches, projects, labels,
ci, groups, users, pipelines, milestones, wiki, releases, tags, workitems,
webhooks, search, variables, and dependency_proxy actually sums to 239 tools
total. Update the summary line to reflect the correct tool count of 239 tools
across 20 toolsets, and adjust the total count from 204 to 241 (239 toolset
tools plus the 2 meta-tools execute_graphql and discover_tools).
Summary
coretoolset as the only default toolsetGITLAB_TOOLSETS/discover_toolsDefault tools drop from 115 to 36, with approximate schema tokens down from 24.2k to 8.9k.
Tests
npm run buildnode --import tsx/esm --test test/test-ci-lint.tsnode --import tsx/esm --test test/test-todos.tsnode --import tsx/esm --test test/test-toolset-filtering.tsnpm run test:mockNote
Medium Risk
This is a behavior-breaking default for clients that assumed the old wide tool list without setting
GITLAB_TOOLSETS; upgrades need the documented restore string orGITLAB_TOOLSETS=allto avoid missing tools.Overview
Shrinks the default MCP tool surface by introducing a
coretoolset (35 tools) as the only always-on group whenGITLAB_TOOLSETSis unset, plusdiscover_tools. The former broad defaults (merge requests, issues, repositories, branches, projects, labels, CI, groups, users) are opt-in again.Registry changes mark those categories
isDefault: false, define overlapping tools in bothcoreand the full toolsets, and useTOOLSETS_BY_TOOL_NAMEso enabling a full category still exposes tools that also appear incore. Filtering tests now derive counts fromTOOLSET_DEFINITIONSand assert advanced tools (merge, drafts,push_files, etc.) stay out of the lean default.Docs and operator UX add
docs/tools/core.md, CLI flags--toolsets/--tools, env-var guidance foralland a pre-lean restore toolset list, opt-in notes on group pages, and updated skill/MkDocs index. Tests for CI lint and todos require explicitGITLAB_TOOLSETS=ci/issues.Reviewed by Cursor Bugbot for commit b24f928. Bugbot is set up for automated code reviews on this repo. Configure here.