Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit15133bd

Browse files
committed
Fix linter errors with mcp-go 0.27.0 bump
1 parentfb5a4d9 commit15133bd

13 files changed

+50
-50
lines changed

‎pkg/github/code_scanning.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func GetCodeScanningAlert(getClient GetClientFn, t translations.TranslationHelpe
1818
mcp.WithDescription(t("TOOL_GET_CODE_SCANNING_ALERT_DESCRIPTION","Get details of a specific code scanning alert in a GitHub repository.")),
1919
mcp.WithToolAnnotation(mcp.ToolAnnotation{
2020
Title:t("TOOL_GET_CODE_SCANNING_ALERT_USER_TITLE","Get code scanning alert"),
21-
ReadOnlyHint:true,
21+
ReadOnlyHint:toBoolPtr(true),
2222
}),
2323
mcp.WithString("owner",
2424
mcp.Required(),
@@ -80,7 +80,7 @@ func ListCodeScanningAlerts(getClient GetClientFn, t translations.TranslationHel
8080
mcp.WithDescription(t("TOOL_LIST_CODE_SCANNING_ALERTS_DESCRIPTION","List code scanning alerts in a GitHub repository.")),
8181
mcp.WithToolAnnotation(mcp.ToolAnnotation{
8282
Title:t("TOOL_LIST_CODE_SCANNING_ALERTS_USER_TITLE","List code scanning alerts"),
83-
ReadOnlyHint:true,
83+
ReadOnlyHint:toBoolPtr(true),
8484
}),
8585
mcp.WithString("owner",
8686
mcp.Required(),

‎pkg/github/context_tools.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func GetMe(getClient GetClientFn, t translations.TranslationHelperFunc) (tool mc
1818
mcp.WithDescription(t("TOOL_GET_ME_DESCRIPTION","Get details of the authenticated GitHub user. Use this when a request include\"me\",\"my\"...")),
1919
mcp.WithToolAnnotation(mcp.ToolAnnotation{
2020
Title:t("TOOL_GET_ME_USER_TITLE","Get my user profile"),
21-
ReadOnlyHint:true,
21+
ReadOnlyHint:toBoolPtr(true),
2222
}),
2323
mcp.WithString("reason",
2424
mcp.Description("Optional: reason the session was created"),

‎pkg/github/dynamic_tools.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func EnableToolset(s *server.MCPServer, toolsetGroup *toolsets.ToolsetGroup, t t
2525
mcp.WithToolAnnotation(mcp.ToolAnnotation{
2626
Title:t("TOOL_ENABLE_TOOLSET_USER_TITLE","Enable a toolset"),
2727
// Not modifying GitHub data so no need to show a warning
28-
ReadOnlyHint:true,
28+
ReadOnlyHint:toBoolPtr(true),
2929
}),
3030
mcp.WithString("toolset",
3131
mcp.Required(),
@@ -64,7 +64,7 @@ func ListAvailableToolsets(toolsetGroup *toolsets.ToolsetGroup, t translations.T
6464
mcp.WithDescription(t("TOOL_LIST_AVAILABLE_TOOLSETS_DESCRIPTION","List all available toolsets this GitHub MCP server can offer, providing the enabled status of each. Use this when a task could be achieved with a GitHub tool and the currently available tools aren't enough. Call get_toolset_tools with these toolset names to discover specific tools you can call")),
6565
mcp.WithToolAnnotation(mcp.ToolAnnotation{
6666
Title:t("TOOL_LIST_AVAILABLE_TOOLSETS_USER_TITLE","List available toolsets"),
67-
ReadOnlyHint:true,
67+
ReadOnlyHint:toBoolPtr(true),
6868
}),
6969
),
7070
func(_ context.Context,_ mcp.CallToolRequest) (*mcp.CallToolResult,error) {
@@ -98,7 +98,7 @@ func GetToolsetsTools(toolsetGroup *toolsets.ToolsetGroup, t translations.Transl
9898
mcp.WithDescription(t("TOOL_GET_TOOLSET_TOOLS_DESCRIPTION","Lists all the capabilities that are enabled with the specified toolset, use this to get clarity on whether enabling a toolset would help you to complete a task")),
9999
mcp.WithToolAnnotation(mcp.ToolAnnotation{
100100
Title:t("TOOL_GET_TOOLSET_TOOLS_USER_TITLE","List all tools in a toolset"),
101-
ReadOnlyHint:true,
101+
ReadOnlyHint:toBoolPtr(true),
102102
}),
103103
mcp.WithString("toolset",
104104
mcp.Required(),

‎pkg/github/issues.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func GetIssue(getClient GetClientFn, t translations.TranslationHelperFunc) (tool
2020
mcp.WithDescription(t("TOOL_GET_ISSUE_DESCRIPTION","Get details of a specific issue in a GitHub repository.")),
2121
mcp.WithToolAnnotation(mcp.ToolAnnotation{
2222
Title:t("TOOL_GET_ISSUE_USER_TITLE","Get issue details"),
23-
ReadOnlyHint:true,
23+
ReadOnlyHint:toBoolPtr(true),
2424
}),
2525
mcp.WithString("owner",
2626
mcp.Required(),
@@ -82,7 +82,7 @@ func AddIssueComment(getClient GetClientFn, t translations.TranslationHelperFunc
8282
mcp.WithDescription(t("TOOL_ADD_ISSUE_COMMENT_DESCRIPTION","Add a comment to a specific issue in a GitHub repository.")),
8383
mcp.WithToolAnnotation(mcp.ToolAnnotation{
8484
Title:t("TOOL_ADD_ISSUE_COMMENT_USER_TITLE","Add comment to issue"),
85-
ReadOnlyHint:false,
85+
ReadOnlyHint:toBoolPtr(false),
8686
}),
8787
mcp.WithString("owner",
8888
mcp.Required(),
@@ -156,7 +156,7 @@ func SearchIssues(getClient GetClientFn, t translations.TranslationHelperFunc) (
156156
mcp.WithDescription(t("TOOL_SEARCH_ISSUES_DESCRIPTION","Search for issues in GitHub repositories.")),
157157
mcp.WithToolAnnotation(mcp.ToolAnnotation{
158158
Title:t("TOOL_SEARCH_ISSUES_USER_TITLE","Search issues"),
159-
ReadOnlyHint:true,
159+
ReadOnlyHint:toBoolPtr(true),
160160
}),
161161
mcp.WithString("q",
162162
mcp.Required(),
@@ -244,7 +244,7 @@ func CreateIssue(getClient GetClientFn, t translations.TranslationHelperFunc) (t
244244
mcp.WithDescription(t("TOOL_CREATE_ISSUE_DESCRIPTION","Create a new issue in a GitHub repository.")),
245245
mcp.WithToolAnnotation(mcp.ToolAnnotation{
246246
Title:t("TOOL_CREATE_ISSUE_USER_TITLE","Open new issue"),
247-
ReadOnlyHint:false,
247+
ReadOnlyHint:toBoolPtr(false),
248248
}),
249249
mcp.WithString("owner",
250250
mcp.Required(),
@@ -366,7 +366,7 @@ func ListIssues(getClient GetClientFn, t translations.TranslationHelperFunc) (to
366366
mcp.WithDescription(t("TOOL_LIST_ISSUES_DESCRIPTION","List issues in a GitHub repository.")),
367367
mcp.WithToolAnnotation(mcp.ToolAnnotation{
368368
Title:t("TOOL_LIST_ISSUES_USER_TITLE","List issues"),
369-
ReadOnlyHint:true,
369+
ReadOnlyHint:toBoolPtr(true),
370370
}),
371371
mcp.WithString("owner",
372372
mcp.Required(),
@@ -488,7 +488,7 @@ func UpdateIssue(getClient GetClientFn, t translations.TranslationHelperFunc) (t
488488
mcp.WithDescription(t("TOOL_UPDATE_ISSUE_DESCRIPTION","Update an existing issue in a GitHub repository.")),
489489
mcp.WithToolAnnotation(mcp.ToolAnnotation{
490490
Title:t("TOOL_UPDATE_ISSUE_USER_TITLE","Edit issue"),
491-
ReadOnlyHint:false,
491+
ReadOnlyHint:toBoolPtr(false),
492492
}),
493493
mcp.WithString("owner",
494494
mcp.Required(),
@@ -634,7 +634,7 @@ func GetIssueComments(getClient GetClientFn, t translations.TranslationHelperFun
634634
mcp.WithDescription(t("TOOL_GET_ISSUE_COMMENTS_DESCRIPTION","Get comments for a specific issue in a GitHub repository.")),
635635
mcp.WithToolAnnotation(mcp.ToolAnnotation{
636636
Title:t("TOOL_GET_ISSUE_COMMENTS_USER_TITLE","Get issue comments"),
637-
ReadOnlyHint:true,
637+
ReadOnlyHint:toBoolPtr(true),
638638
}),
639639
mcp.WithString("owner",
640640
mcp.Required(),

‎pkg/github/pullrequests.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func GetPullRequest(getClient GetClientFn, t translations.TranslationHelperFunc)
1919
mcp.WithDescription(t("TOOL_GET_PULL_REQUEST_DESCRIPTION","Get details of a specific pull request in a GitHub repository.")),
2020
mcp.WithToolAnnotation(mcp.ToolAnnotation{
2121
Title:t("TOOL_GET_PULL_REQUEST_USER_TITLE","Get pull request details"),
22-
ReadOnlyHint:true,
22+
ReadOnlyHint:toBoolPtr(true),
2323
}),
2424
mcp.WithString("owner",
2525
mcp.Required(),
@@ -81,7 +81,7 @@ func UpdatePullRequest(getClient GetClientFn, t translations.TranslationHelperFu
8181
mcp.WithDescription(t("TOOL_UPDATE_PULL_REQUEST_DESCRIPTION","Update an existing pull request in a GitHub repository.")),
8282
mcp.WithToolAnnotation(mcp.ToolAnnotation{
8383
Title:t("TOOL_UPDATE_PULL_REQUEST_USER_TITLE","Edit pull request"),
84-
ReadOnlyHint:false,
84+
ReadOnlyHint:toBoolPtr(false),
8585
}),
8686
mcp.WithString("owner",
8787
mcp.Required(),
@@ -202,7 +202,7 @@ func ListPullRequests(getClient GetClientFn, t translations.TranslationHelperFun
202202
mcp.WithDescription(t("TOOL_LIST_PULL_REQUESTS_DESCRIPTION","List pull requests in a GitHub repository.")),
203203
mcp.WithToolAnnotation(mcp.ToolAnnotation{
204204
Title:t("TOOL_LIST_PULL_REQUESTS_USER_TITLE","List pull requests"),
205-
ReadOnlyHint:true,
205+
ReadOnlyHint:toBoolPtr(true),
206206
}),
207207
mcp.WithString("owner",
208208
mcp.Required(),
@@ -311,7 +311,7 @@ func MergePullRequest(getClient GetClientFn, t translations.TranslationHelperFun
311311
mcp.WithDescription(t("TOOL_MERGE_PULL_REQUEST_DESCRIPTION","Merge a pull request in a GitHub repository.")),
312312
mcp.WithToolAnnotation(mcp.ToolAnnotation{
313313
Title:t("TOOL_MERGE_PULL_REQUEST_USER_TITLE","Merge pull request"),
314-
ReadOnlyHint:false,
314+
ReadOnlyHint:toBoolPtr(false),
315315
}),
316316
mcp.WithString("owner",
317317
mcp.Required(),
@@ -400,7 +400,7 @@ func GetPullRequestFiles(getClient GetClientFn, t translations.TranslationHelper
400400
mcp.WithDescription(t("TOOL_GET_PULL_REQUEST_FILES_DESCRIPTION","Get the files changed in a specific pull request.")),
401401
mcp.WithToolAnnotation(mcp.ToolAnnotation{
402402
Title:t("TOOL_GET_PULL_REQUEST_FILES_USER_TITLE","Get pull request files"),
403-
ReadOnlyHint:true,
403+
ReadOnlyHint:toBoolPtr(true),
404404
}),
405405
mcp.WithString("owner",
406406
mcp.Required(),
@@ -463,7 +463,7 @@ func GetPullRequestStatus(getClient GetClientFn, t translations.TranslationHelpe
463463
mcp.WithDescription(t("TOOL_GET_PULL_REQUEST_STATUS_DESCRIPTION","Get the status of a specific pull request.")),
464464
mcp.WithToolAnnotation(mcp.ToolAnnotation{
465465
Title:t("TOOL_GET_PULL_REQUEST_STATUS_USER_TITLE","Get pull request status checks"),
466-
ReadOnlyHint:true,
466+
ReadOnlyHint:toBoolPtr(true),
467467
}),
468468
mcp.WithString("owner",
469469
mcp.Required(),
@@ -540,7 +540,7 @@ func UpdatePullRequestBranch(getClient GetClientFn, t translations.TranslationHe
540540
mcp.WithDescription(t("TOOL_UPDATE_PULL_REQUEST_BRANCH_DESCRIPTION","Update the branch of a pull request with the latest changes from the base branch.")),
541541
mcp.WithToolAnnotation(mcp.ToolAnnotation{
542542
Title:t("TOOL_UPDATE_PULL_REQUEST_BRANCH_USER_TITLE","Update pull request branch"),
543-
ReadOnlyHint:false,
543+
ReadOnlyHint:toBoolPtr(false),
544544
}),
545545
mcp.WithString("owner",
546546
mcp.Required(),
@@ -618,7 +618,7 @@ func GetPullRequestComments(getClient GetClientFn, t translations.TranslationHel
618618
mcp.WithDescription(t("TOOL_GET_PULL_REQUEST_COMMENTS_DESCRIPTION","Get comments for a specific pull request.")),
619619
mcp.WithToolAnnotation(mcp.ToolAnnotation{
620620
Title:t("TOOL_GET_PULL_REQUEST_COMMENTS_USER_TITLE","Get pull request comments"),
621-
ReadOnlyHint:true,
621+
ReadOnlyHint:toBoolPtr(true),
622622
}),
623623
mcp.WithString("owner",
624624
mcp.Required(),
@@ -686,7 +686,7 @@ func AddPullRequestReviewComment(getClient GetClientFn, t translations.Translati
686686
mcp.WithDescription(t("TOOL_ADD_PULL_REQUEST_REVIEW_COMMENT_DESCRIPTION","Add a review comment to a pull request.")),
687687
mcp.WithToolAnnotation(mcp.ToolAnnotation{
688688
Title:t("TOOL_ADD_PULL_REQUEST_REVIEW_COMMENT_USER_TITLE","Add review comment to pull request"),
689-
ReadOnlyHint:false,
689+
ReadOnlyHint:toBoolPtr(false),
690690
}),
691691
mcp.WithString("owner",
692692
mcp.Required(),
@@ -860,7 +860,7 @@ func GetPullRequestReviews(getClient GetClientFn, t translations.TranslationHelp
860860
mcp.WithDescription(t("TOOL_GET_PULL_REQUEST_REVIEWS_DESCRIPTION","Get reviews for a specific pull request.")),
861861
mcp.WithToolAnnotation(mcp.ToolAnnotation{
862862
Title:t("TOOL_GET_PULL_REQUEST_REVIEWS_USER_TITLE","Get pull request reviews"),
863-
ReadOnlyHint:true,
863+
ReadOnlyHint:toBoolPtr(true),
864864
}),
865865
mcp.WithString("owner",
866866
mcp.Required(),
@@ -922,7 +922,7 @@ func CreatePullRequestReview(getClient GetClientFn, t translations.TranslationHe
922922
mcp.WithDescription(t("TOOL_CREATE_PULL_REQUEST_REVIEW_DESCRIPTION","Create a review for a pull request.")),
923923
mcp.WithToolAnnotation(mcp.ToolAnnotation{
924924
Title:t("TOOL_CREATE_PULL_REQUEST_REVIEW_USER_TITLE","Submit pull request review"),
925-
ReadOnlyHint:false,
925+
ReadOnlyHint:toBoolPtr(false),
926926
}),
927927
mcp.WithString("owner",
928928
mcp.Required(),
@@ -1138,7 +1138,7 @@ func CreatePullRequest(getClient GetClientFn, t translations.TranslationHelperFu
11381138
mcp.WithDescription(t("TOOL_CREATE_PULL_REQUEST_DESCRIPTION","Create a new pull request in a GitHub repository.")),
11391139
mcp.WithToolAnnotation(mcp.ToolAnnotation{
11401140
Title:t("TOOL_CREATE_PULL_REQUEST_USER_TITLE","Open new pull request"),
1141-
ReadOnlyHint:false,
1141+
ReadOnlyHint:toBoolPtr(false),
11421142
}),
11431143
mcp.WithString("owner",
11441144
mcp.Required(),

‎pkg/github/repositories.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func GetCommit(getClient GetClientFn, t translations.TranslationHelperFunc) (too
1818
mcp.WithDescription(t("TOOL_GET_COMMITS_DESCRIPTION","Get details for a commit from a GitHub repository")),
1919
mcp.WithToolAnnotation(mcp.ToolAnnotation{
2020
Title:t("TOOL_GET_COMMITS_USER_TITLE","Get commit details"),
21-
ReadOnlyHint:true,
21+
ReadOnlyHint:toBoolPtr(true),
2222
}),
2323
mcp.WithString("owner",
2424
mcp.Required(),
@@ -90,7 +90,7 @@ func ListCommits(getClient GetClientFn, t translations.TranslationHelperFunc) (t
9090
mcp.WithDescription(t("TOOL_LIST_COMMITS_DESCRIPTION","Get list of commits of a branch in a GitHub repository")),
9191
mcp.WithToolAnnotation(mcp.ToolAnnotation{
9292
Title:t("TOOL_LIST_COMMITS_USER_TITLE","List commits"),
93-
ReadOnlyHint:true,
93+
ReadOnlyHint:toBoolPtr(true),
9494
}),
9595
mcp.WithString("owner",
9696
mcp.Required(),
@@ -164,7 +164,7 @@ func ListBranches(getClient GetClientFn, t translations.TranslationHelperFunc) (
164164
mcp.WithDescription(t("TOOL_LIST_BRANCHES_DESCRIPTION","List branches in a GitHub repository")),
165165
mcp.WithToolAnnotation(mcp.ToolAnnotation{
166166
Title:t("TOOL_LIST_BRANCHES_USER_TITLE","List branches"),
167-
ReadOnlyHint:true,
167+
ReadOnlyHint:toBoolPtr(true),
168168
}),
169169
mcp.WithString("owner",
170170
mcp.Required(),
@@ -231,7 +231,7 @@ func CreateOrUpdateFile(getClient GetClientFn, t translations.TranslationHelperF
231231
mcp.WithDescription(t("TOOL_CREATE_OR_UPDATE_FILE_DESCRIPTION","Create or update a single file in a GitHub repository. If updating, you must provide the SHA of the file you want to update.")),
232232
mcp.WithToolAnnotation(mcp.ToolAnnotation{
233233
Title:t("TOOL_CREATE_OR_UPDATE_FILE_USER_TITLE","Create or update file"),
234-
ReadOnlyHint:false,
234+
ReadOnlyHint:toBoolPtr(false),
235235
}),
236236
mcp.WithString("owner",
237237
mcp.Required(),
@@ -340,7 +340,7 @@ func CreateRepository(getClient GetClientFn, t translations.TranslationHelperFun
340340
mcp.WithDescription(t("TOOL_CREATE_REPOSITORY_DESCRIPTION","Create a new GitHub repository in your account")),
341341
mcp.WithToolAnnotation(mcp.ToolAnnotation{
342342
Title:t("TOOL_CREATE_REPOSITORY_USER_TITLE","Create repository"),
343-
ReadOnlyHint:false,
343+
ReadOnlyHint:toBoolPtr(false),
344344
}),
345345
mcp.WithString("name",
346346
mcp.Required(),
@@ -414,7 +414,7 @@ func GetFileContents(getClient GetClientFn, t translations.TranslationHelperFunc
414414
mcp.WithDescription(t("TOOL_GET_FILE_CONTENTS_DESCRIPTION","Get the contents of a file or directory from a GitHub repository")),
415415
mcp.WithToolAnnotation(mcp.ToolAnnotation{
416416
Title:t("TOOL_GET_FILE_CONTENTS_USER_TITLE","Get file or directory contents"),
417-
ReadOnlyHint:true,
417+
ReadOnlyHint:toBoolPtr(true),
418418
}),
419419
mcp.WithString("owner",
420420
mcp.Required(),
@@ -491,7 +491,7 @@ func ForkRepository(getClient GetClientFn, t translations.TranslationHelperFunc)
491491
mcp.WithDescription(t("TOOL_FORK_REPOSITORY_DESCRIPTION","Fork a GitHub repository to your account or specified organization")),
492492
mcp.WithToolAnnotation(mcp.ToolAnnotation{
493493
Title:t("TOOL_FORK_REPOSITORY_USER_TITLE","Fork repository"),
494-
ReadOnlyHint:false,
494+
ReadOnlyHint:toBoolPtr(false),
495495
}),
496496
mcp.WithString("owner",
497497
mcp.Required(),
@@ -562,7 +562,7 @@ func CreateBranch(getClient GetClientFn, t translations.TranslationHelperFunc) (
562562
mcp.WithDescription(t("TOOL_CREATE_BRANCH_DESCRIPTION","Create a new branch in a GitHub repository")),
563563
mcp.WithToolAnnotation(mcp.ToolAnnotation{
564564
Title:t("TOOL_CREATE_BRANCH_USER_TITLE","Create branch"),
565-
ReadOnlyHint:false,
565+
ReadOnlyHint:toBoolPtr(false),
566566
}),
567567
mcp.WithString("owner",
568568
mcp.Required(),
@@ -651,7 +651,7 @@ func PushFiles(getClient GetClientFn, t translations.TranslationHelperFunc) (too
651651
mcp.WithDescription(t("TOOL_PUSH_FILES_DESCRIPTION","Push multiple files to a GitHub repository in a single commit")),
652652
mcp.WithToolAnnotation(mcp.ToolAnnotation{
653653
Title:t("TOOL_PUSH_FILES_USER_TITLE","Push files to repository"),
654-
ReadOnlyHint:false,
654+
ReadOnlyHint:toBoolPtr(false),
655655
}),
656656
mcp.WithString("owner",
657657
mcp.Required(),
@@ -803,7 +803,7 @@ func ListTags(getClient GetClientFn, t translations.TranslationHelperFunc) (tool
803803
mcp.WithDescription(t("TOOL_LIST_TAGS_DESCRIPTION","List git tags in a GitHub repository")),
804804
mcp.WithToolAnnotation(mcp.ToolAnnotation{
805805
Title:t("TOOL_LIST_TAGS_USER_TITLE","List tags"),
806-
ReadOnlyHint:true,
806+
ReadOnlyHint:toBoolPtr(true),
807807
}),
808808
mcp.WithString("owner",
809809
mcp.Required(),
@@ -868,7 +868,7 @@ func GetTag(getClient GetClientFn, t translations.TranslationHelperFunc) (tool m
868868
mcp.WithDescription(t("TOOL_GET_TAG_DESCRIPTION","Get details about a specific git tag in a GitHub repository")),
869869
mcp.WithToolAnnotation(mcp.ToolAnnotation{
870870
Title:t("TOOL_GET_TAG_USER_TITLE","Get tag details"),
871-
ReadOnlyHint:true,
871+
ReadOnlyHint:toBoolPtr(true),
872872
}),
873873
mcp.WithString("owner",
874874
mcp.Required(),

‎pkg/github/search.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func SearchRepositories(getClient GetClientFn, t translations.TranslationHelperF
1818
mcp.WithDescription(t("TOOL_SEARCH_REPOSITORIES_DESCRIPTION","Search for GitHub repositories")),
1919
mcp.WithToolAnnotation(mcp.ToolAnnotation{
2020
Title:t("TOOL_SEARCH_REPOSITORIES_USER_TITLE","Search repositories"),
21-
ReadOnlyHint:true,
21+
ReadOnlyHint:toBoolPtr(true),
2222
}),
2323
mcp.WithString("query",
2424
mcp.Required(),
@@ -76,7 +76,7 @@ func SearchCode(getClient GetClientFn, t translations.TranslationHelperFunc) (to
7676
mcp.WithDescription(t("TOOL_SEARCH_CODE_DESCRIPTION","Search for code across GitHub repositories")),
7777
mcp.WithToolAnnotation(mcp.ToolAnnotation{
7878
Title:t("TOOL_SEARCH_CODE_USER_TITLE","Search code"),
79-
ReadOnlyHint:true,
79+
ReadOnlyHint:toBoolPtr(true),
8080
}),
8181
mcp.WithString("q",
8282
mcp.Required(),
@@ -152,7 +152,7 @@ func SearchUsers(getClient GetClientFn, t translations.TranslationHelperFunc) (t
152152
mcp.WithDescription(t("TOOL_SEARCH_USERS_DESCRIPTION","Search for GitHub users")),
153153
mcp.WithToolAnnotation(mcp.ToolAnnotation{
154154
Title:t("TOOL_SEARCH_USERS_USER_TITLE","Search users"),
155-
ReadOnlyHint:true,
155+
ReadOnlyHint:toBoolPtr(true),
156156
}),
157157
mcp.WithString("q",
158158
mcp.Required(),

‎pkg/github/secret_scanning.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func GetSecretScanningAlert(getClient GetClientFn, t translations.TranslationHel
1919
mcp.WithDescription(t("TOOL_GET_SECRET_SCANNING_ALERT_DESCRIPTION","Get details of a specific secret scanning alert in a GitHub repository.")),
2020
mcp.WithToolAnnotation(mcp.ToolAnnotation{
2121
Title:t("TOOL_GET_SECRET_SCANNING_ALERT_USER_TITLE","Get secret scanning alert"),
22-
ReadOnlyHint:true,
22+
ReadOnlyHint:toBoolPtr(true),
2323
}),
2424
mcp.WithString("owner",
2525
mcp.Required(),
@@ -82,7 +82,7 @@ func ListSecretScanningAlerts(getClient GetClientFn, t translations.TranslationH
8282
mcp.WithDescription(t("TOOL_LIST_SECRET_SCANNING_ALERTS_DESCRIPTION","List secret scanning alerts in a GitHub repository.")),
8383
mcp.WithToolAnnotation(mcp.ToolAnnotation{
8484
Title:t("TOOL_LIST_SECRET_SCANNING_ALERTS_USER_TITLE","List secret scanning alerts"),
85-
ReadOnlyHint:true,
85+
ReadOnlyHint:toBoolPtr(true),
8686
}),
8787
mcp.WithString("owner",
8888
mcp.Required(),

‎pkg/github/tools.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,7 @@ func InitDynamicToolset(s *server.MCPServer, tsg *toolsets.ToolsetGroup, t trans
124124
dynamicToolSelection.Enabled=true
125125
returndynamicToolSelection
126126
}
127+
128+
functoBoolPtr(bbool)*bool {
129+
return&b
130+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp