@zereight/mcp-gitlab 2.3.20-next.198 → 2.3.20-next.199
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/utils/list-summary.js +75 -0
- package/package.json +1 -1
|
@@ -67,6 +67,9 @@ const LIST_SUMMARY_DEFAULT_EXCLUDED_TOOLS = new Set([
|
|
|
67
67
|
"list_webhooks", // url, event flags
|
|
68
68
|
"list_pipeline_triggers", // description
|
|
69
69
|
"list_job_artifacts", // path, type, size
|
|
70
|
+
"list_group_iterations", // start_date, due_date
|
|
71
|
+
"list_project_iterations", // start_date, due_date
|
|
72
|
+
"list_group_iteration_cadences", // start_date, duration_in_weeks, iterations_in_advance
|
|
70
73
|
// Small replies whose access fields are the point; summary: true keeps them (TOOL_SUMMARY_FIELDS).
|
|
71
74
|
"list_protected_branches", // *_access_levels, allow_force_push
|
|
72
75
|
"list_protected_tags", // create_access_levels
|
|
@@ -86,6 +89,7 @@ const LIST_SUMMARY_DEFAULT_EXCLUDED_TOOLS = new Set([
|
|
|
86
89
|
"list_group_variables", // environment_scope, variable_type
|
|
87
90
|
"list_merge_request_changed_files", // old_path, new_file/deleted_file/renamed_file
|
|
88
91
|
"list_work_items", // type, webUrl; assignees are strings, not users
|
|
92
|
+
"list_namespaces", // full_path, path, kind
|
|
89
93
|
]);
|
|
90
94
|
/**
|
|
91
95
|
* List tools that keep the full reply under GITLAB_MCP_LIST_SUMMARY_DEFAULT only
|
|
@@ -93,6 +97,77 @@ const LIST_SUMMARY_DEFAULT_EXCLUDED_TOOLS = new Set([
|
|
|
93
97
|
* the summary would drop.
|
|
94
98
|
*/
|
|
95
99
|
const CONTENT_ON_REQUEST_LIST_TOOLS = new Set(["list_wiki_pages", "list_group_wiki_pages"]);
|
|
100
|
+
/**
|
|
101
|
+
* List tools reviewed for GITLAB_MCP_LIST_SUMMARY_DEFAULT whose summary keeps what
|
|
102
|
+
* callers need, with the fields it must keep. Every list tool is in exactly one of
|
|
103
|
+
* this map, LIST_SUMMARY_DEFAULT_EXCLUDED_TOOLS, CONTENT_ON_REQUEST_LIST_TOOLS or
|
|
104
|
+
* NATIVE_SUMMARY_TOOLS: test/utils/list-summary-coverage.test.ts fails on a new
|
|
105
|
+
* list tool that is in none of them, or on a listed field the summary drops.
|
|
106
|
+
*/
|
|
107
|
+
export const LIST_SUMMARY_SAFE_TOOLS = {
|
|
108
|
+
list_issues: ["iid", "title", "state", "labels"],
|
|
109
|
+
list_issue_discussions: ["id", "notes"],
|
|
110
|
+
mr_discussions: ["id", "notes"],
|
|
111
|
+
list_merge_requests: ["iid", "title", "state", "source_branch", "target_branch", "draft"],
|
|
112
|
+
list_group_merge_requests: ["iid", "title", "state", "source_branch", "target_branch", "draft"],
|
|
113
|
+
list_deployment_merge_requests: ["iid", "title", "state", "source_branch", "target_branch"],
|
|
114
|
+
list_merge_request_pipelines: ["id", "status", "ref"],
|
|
115
|
+
list_pipelines: ["id", "status", "ref"],
|
|
116
|
+
list_pipeline_schedule_pipelines: ["id", "status", "ref"],
|
|
117
|
+
list_pipeline_schedules: ["id", "ref"],
|
|
118
|
+
list_pipeline_jobs: ["id", "name", "status"],
|
|
119
|
+
list_commit_statuses: ["id", "name", "status"],
|
|
120
|
+
list_deployments: ["id", "iid", "status", "ref"],
|
|
121
|
+
list_environments: ["id", "name", "state"],
|
|
122
|
+
list_commits: ["id", "short_id", "title"],
|
|
123
|
+
// Explicit (not a spread of TOOL_SUMMARY_FIELDS) so the coverage test guards that list.
|
|
124
|
+
list_branches: [
|
|
125
|
+
"name",
|
|
126
|
+
"protected",
|
|
127
|
+
"default",
|
|
128
|
+
"merged",
|
|
129
|
+
"can_push",
|
|
130
|
+
"developers_can_push",
|
|
131
|
+
"developers_can_merge",
|
|
132
|
+
],
|
|
133
|
+
list_tags: ["name"],
|
|
134
|
+
list_releases: ["name", "tag_name"],
|
|
135
|
+
list_milestones: ["id", "iid", "title", "state"],
|
|
136
|
+
list_group_milestones: ["id", "iid", "title", "state"],
|
|
137
|
+
list_labels: ["id", "name"],
|
|
138
|
+
list_projects: ["id", "path_with_namespace"],
|
|
139
|
+
list_group_projects: ["id", "path_with_namespace"],
|
|
140
|
+
list_snippets: ["id", "title", "web_url"],
|
|
141
|
+
list_project_runners: ["id", "status"],
|
|
142
|
+
list_merge_request_emoji_reactions: ["id", "name"],
|
|
143
|
+
list_merge_request_note_emoji_reactions: ["id", "name"],
|
|
144
|
+
list_issue_emoji_reactions: ["id", "name"],
|
|
145
|
+
list_issue_note_emoji_reactions: ["id", "name"],
|
|
146
|
+
list_work_item_emoji_reactions: ["id", "name"],
|
|
147
|
+
list_work_item_note_emoji_reactions: ["id", "name"],
|
|
148
|
+
};
|
|
149
|
+
/** Which of the lists above a summary-capable tool is in (test helper; no runtime effect). */
|
|
150
|
+
export function listSummaryClassifications(toolName) {
|
|
151
|
+
const found = [];
|
|
152
|
+
if (NATIVE_SUMMARY_TOOLS.has(toolName))
|
|
153
|
+
found.push("native");
|
|
154
|
+
if (LIST_SUMMARY_DEFAULT_EXCLUDED_TOOLS.has(toolName))
|
|
155
|
+
found.push("excluded");
|
|
156
|
+
if (CONTENT_ON_REQUEST_LIST_TOOLS.has(toolName))
|
|
157
|
+
found.push("content-on-request");
|
|
158
|
+
if (Object.hasOwn(LIST_SUMMARY_SAFE_TOOLS, toolName))
|
|
159
|
+
found.push("summary-safe");
|
|
160
|
+
return found.length > 0 ? found : ["unclassified"];
|
|
161
|
+
}
|
|
162
|
+
/** Every tool name the lists above mention (to catch stale entries). */
|
|
163
|
+
export function listSummaryClassifiedToolNames() {
|
|
164
|
+
return [
|
|
165
|
+
...NATIVE_SUMMARY_TOOLS,
|
|
166
|
+
...LIST_SUMMARY_DEFAULT_EXCLUDED_TOOLS,
|
|
167
|
+
...CONTENT_ON_REQUEST_LIST_TOOLS,
|
|
168
|
+
...Object.keys(LIST_SUMMARY_SAFE_TOOLS),
|
|
169
|
+
];
|
|
170
|
+
}
|
|
96
171
|
const CONTENT_REQUEST_ARGUMENTS = ["with_content", "render_html"];
|
|
97
172
|
/** Mirrors the boolean coercion of the tool schemas: true, 1, "true", "1". */
|
|
98
173
|
function isTruthyFlag(value) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zereight/mcp-gitlab",
|
|
3
|
-
"version": "2.3.20-next.
|
|
3
|
+
"version": "2.3.20-next.199",
|
|
4
4
|
"mcpName": "io.github.zereight/gitlab-mcp",
|
|
5
5
|
"description": "GitLab MCP server for projects, merge requests, issues, pipelines, wiki, releases, and more",
|
|
6
6
|
"keywords": [
|