chore(release): 1.0.43 - get_repository_tree is added read_only_mode
This commit is contained in:
34
index.ts
34
index.ts
@ -452,6 +452,7 @@ const readOnlyTools = [
|
|||||||
"list_labels",
|
"list_labels",
|
||||||
"get_label",
|
"get_label",
|
||||||
"list_group_projects",
|
"list_group_projects",
|
||||||
|
"get_repository_tree",
|
||||||
];
|
];
|
||||||
|
|
||||||
// Define which tools are related to wiki and can be toggled by USE_GITLAB_WIKI
|
// Define which tools are related to wiki and can be toggled by USE_GITLAB_WIKI
|
||||||
@ -1054,10 +1055,10 @@ async function listIssueDiscussions(
|
|||||||
projectId: string,
|
projectId: string,
|
||||||
issueIid: number,
|
issueIid: number,
|
||||||
options: {
|
options: {
|
||||||
page?: number,
|
page?: number;
|
||||||
per_page?: number,
|
per_page?: number;
|
||||||
sort?: "asc" | "desc",
|
sort?: "asc" | "desc";
|
||||||
order_by?: "created_at" | "updated_at"
|
order_by?: "created_at" | "updated_at";
|
||||||
} = {}
|
} = {}
|
||||||
): Promise<GitLabDiscussion[]> {
|
): Promise<GitLabDiscussion[]> {
|
||||||
projectId = decodeURIComponent(projectId); // Decode project ID
|
projectId = decodeURIComponent(projectId); // Decode project ID
|
||||||
@ -2549,9 +2550,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "update_issue_note": {
|
case "update_issue_note": {
|
||||||
const args = UpdateIssueNoteSchema.parse(
|
const args = UpdateIssueNoteSchema.parse(request.params.arguments);
|
||||||
request.params.arguments
|
|
||||||
);
|
|
||||||
const note = await updateIssueNote(
|
const note = await updateIssueNote(
|
||||||
args.project_id,
|
args.project_id,
|
||||||
args.issue_iid,
|
args.issue_iid,
|
||||||
@ -2565,9 +2564,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "create_issue_note": {
|
case "create_issue_note": {
|
||||||
const args = CreateIssueNoteSchema.parse(
|
const args = CreateIssueNoteSchema.parse(request.params.arguments);
|
||||||
request.params.arguments
|
|
||||||
);
|
|
||||||
const note = await createIssueNote(
|
const note = await createIssueNote(
|
||||||
args.project_id,
|
args.project_id,
|
||||||
args.issue_iid,
|
args.issue_iid,
|
||||||
@ -2757,8 +2754,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "create_merge_request_thread": {
|
case "create_merge_request_thread": {
|
||||||
const args = CreateMergeRequestThreadSchema.parse(request.params.arguments);
|
const args = CreateMergeRequestThreadSchema.parse(
|
||||||
const { project_id, merge_request_iid, body, position, created_at } = args;
|
request.params.arguments
|
||||||
|
);
|
||||||
|
const { project_id, merge_request_iid, body, position, created_at } =
|
||||||
|
args;
|
||||||
|
|
||||||
const thread = await createMergeRequestThread(
|
const thread = await createMergeRequestThread(
|
||||||
project_id,
|
project_id,
|
||||||
@ -2827,9 +2827,15 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|||||||
const args = ListIssueDiscussionsSchema.parse(request.params.arguments);
|
const args = ListIssueDiscussionsSchema.parse(request.params.arguments);
|
||||||
const { project_id, issue_iid, ...options } = args;
|
const { project_id, issue_iid, ...options } = args;
|
||||||
|
|
||||||
const discussions = await listIssueDiscussions(project_id, issue_iid, options);
|
const discussions = await listIssueDiscussions(
|
||||||
|
project_id,
|
||||||
|
issue_iid,
|
||||||
|
options
|
||||||
|
);
|
||||||
return {
|
return {
|
||||||
content: [{ type: "text", text: JSON.stringify(discussions, null, 2) }],
|
content: [
|
||||||
|
{ type: "text", text: JSON.stringify(discussions, null, 2) },
|
||||||
|
],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@zereight/mcp-gitlab",
|
"name": "@zereight/mcp-gitlab",
|
||||||
"version": "1.0.42",
|
"version": "1.0.43",
|
||||||
"description": "MCP server for using the GitLab API",
|
"description": "MCP server for using the GitLab API",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "zereight",
|
"author": "zereight",
|
||||||
|
Reference in New Issue
Block a user