From 74f110db7aaafb264213d7107d965da22a09c615 Mon Sep 17 00:00:00 2001 From: JoannaaKL Date: Fri, 31 Oct 2025 19:36:26 +0100 Subject: [PATCH] First round --- .../__toolsnaps__/add_issue_comment.snap | 3 +- pkg/github/__toolsnaps__/issue_read.snap | 3 +- pkg/github/__toolsnaps__/issue_write.snap | 3 +- .../__toolsnaps__/list_issue_types.snap | 3 +- pkg/github/__toolsnaps__/list_issues.snap | 3 +- pkg/github/__toolsnaps__/search_issues.snap | 3 +- pkg/github/__toolsnaps__/sub_issue_write.snap | 3 +- pkg/github/issues.go | 35 +++++++++++-------- 8 files changed, 35 insertions(+), 21 deletions(-) diff --git a/pkg/github/__toolsnaps__/add_issue_comment.snap b/pkg/github/__toolsnaps__/add_issue_comment.snap index 0672e0c3f..78522902e 100644 --- a/pkg/github/__toolsnaps__/add_issue_comment.snap +++ b/pkg/github/__toolsnaps__/add_issue_comment.snap @@ -1,7 +1,8 @@ { "annotations": { "title": "Add comment to issue", - "readOnlyHint": false + "readOnlyHint": false, + "openWorldHint": true }, "description": "Add a comment to a specific issue in a GitHub repository. Use this tool to add comments to pull requests as well (in this case pass pull request number as issue_number), but only if user is not asking specifically to add review comments.", "inputSchema": { diff --git a/pkg/github/__toolsnaps__/issue_read.snap b/pkg/github/__toolsnaps__/issue_read.snap index 9e9462df6..c135cd306 100644 --- a/pkg/github/__toolsnaps__/issue_read.snap +++ b/pkg/github/__toolsnaps__/issue_read.snap @@ -1,7 +1,8 @@ { "annotations": { "title": "Get issue details", - "readOnlyHint": true + "readOnlyHint": true, + "openWorldHint": true }, "description": "Get information about a specific issue in a GitHub repository.", "inputSchema": { diff --git a/pkg/github/__toolsnaps__/issue_write.snap b/pkg/github/__toolsnaps__/issue_write.snap index 3f2a37084..b90f5d3c4 100644 --- a/pkg/github/__toolsnaps__/issue_write.snap +++ b/pkg/github/__toolsnaps__/issue_write.snap @@ -1,7 +1,8 @@ { "annotations": { "title": "Create or update issue.", - "readOnlyHint": false + "readOnlyHint": false, + "openWorldHint": true }, "description": "Create a new or update an existing issue in a GitHub repository.", "inputSchema": { diff --git a/pkg/github/__toolsnaps__/list_issue_types.snap b/pkg/github/__toolsnaps__/list_issue_types.snap index 93c3e51d9..9c8e6431c 100644 --- a/pkg/github/__toolsnaps__/list_issue_types.snap +++ b/pkg/github/__toolsnaps__/list_issue_types.snap @@ -1,7 +1,8 @@ { "annotations": { "title": "List available issue types", - "readOnlyHint": true + "readOnlyHint": true, + "openWorldHint": true }, "description": "List supported issue types for repository owner (organization).", "inputSchema": { diff --git a/pkg/github/__toolsnaps__/list_issues.snap b/pkg/github/__toolsnaps__/list_issues.snap index 5475988c2..24c3b2e52 100644 --- a/pkg/github/__toolsnaps__/list_issues.snap +++ b/pkg/github/__toolsnaps__/list_issues.snap @@ -1,7 +1,8 @@ { "annotations": { "title": "List issues", - "readOnlyHint": true + "readOnlyHint": true, + "openWorldHint": true }, "description": "List issues in a GitHub repository. For pagination, use the 'endCursor' from the previous response's 'pageInfo' in the 'after' parameter.", "inputSchema": { diff --git a/pkg/github/__toolsnaps__/search_issues.snap b/pkg/github/__toolsnaps__/search_issues.snap index bf1982411..dd0f48f0e 100644 --- a/pkg/github/__toolsnaps__/search_issues.snap +++ b/pkg/github/__toolsnaps__/search_issues.snap @@ -1,7 +1,8 @@ { "annotations": { "title": "Search issues", - "readOnlyHint": true + "readOnlyHint": true, + "openWorldHint": true }, "description": "Search for issues in GitHub repositories using issues search syntax already scoped to is:issue", "inputSchema": { diff --git a/pkg/github/__toolsnaps__/sub_issue_write.snap b/pkg/github/__toolsnaps__/sub_issue_write.snap index d79e723f4..b66aa05a4 100644 --- a/pkg/github/__toolsnaps__/sub_issue_write.snap +++ b/pkg/github/__toolsnaps__/sub_issue_write.snap @@ -1,7 +1,8 @@ { "annotations": { "title": "Change sub-issue", - "readOnlyHint": false + "readOnlyHint": false, + "openWorldHint": true }, "description": "Add a sub-issue to a parent issue in a GitHub repository.", "inputSchema": { diff --git a/pkg/github/issues.go b/pkg/github/issues.go index 94f2f35e8..a127212fc 100644 --- a/pkg/github/issues.go +++ b/pkg/github/issues.go @@ -231,8 +231,9 @@ func IssueRead(getClient GetClientFn, getGQLClient GetGQLClientFn, t translation return mcp.NewTool("issue_read", mcp.WithDescription(t("TOOL_ISSUE_READ_DESCRIPTION", "Get information about a specific issue in a GitHub repository.")), mcp.WithToolAnnotation(mcp.ToolAnnotation{ - Title: t("TOOL_ISSUE_READ_USER_TITLE", "Get issue details"), - ReadOnlyHint: ToBoolPtr(true), + Title: t("TOOL_ISSUE_READ_USER_TITLE", "Get issue details"), + ReadOnlyHint: ToBoolPtr(true), + OpenWorldHint: ToBoolPtr(true), }), mcp.WithString("method", mcp.Required(), @@ -466,8 +467,9 @@ func ListIssueTypes(getClient GetClientFn, t translations.TranslationHelperFunc) return mcp.NewTool("list_issue_types", mcp.WithDescription(t("TOOL_LIST_ISSUE_TYPES_FOR_ORG", "List supported issue types for repository owner (organization).")), mcp.WithToolAnnotation(mcp.ToolAnnotation{ - Title: t("TOOL_LIST_ISSUE_TYPES_USER_TITLE", "List available issue types"), - ReadOnlyHint: ToBoolPtr(true), + Title: t("TOOL_LIST_ISSUE_TYPES_USER_TITLE", "List available issue types"), + ReadOnlyHint: ToBoolPtr(true), + OpenWorldHint: ToBoolPtr(true), }), mcp.WithString("owner", mcp.Required(), @@ -512,8 +514,9 @@ func AddIssueComment(getClient GetClientFn, t translations.TranslationHelperFunc return mcp.NewTool("add_issue_comment", mcp.WithDescription(t("TOOL_ADD_ISSUE_COMMENT_DESCRIPTION", "Add a comment to a specific issue in a GitHub repository. Use this tool to add comments to pull requests as well (in this case pass pull request number as issue_number), but only if user is not asking specifically to add review comments.")), mcp.WithToolAnnotation(mcp.ToolAnnotation{ - Title: t("TOOL_ADD_ISSUE_COMMENT_USER_TITLE", "Add comment to issue"), - ReadOnlyHint: ToBoolPtr(false), + Title: t("TOOL_ADD_ISSUE_COMMENT_USER_TITLE", "Add comment to issue"), + ReadOnlyHint: ToBoolPtr(false), + OpenWorldHint: ToBoolPtr(true), }), mcp.WithString("owner", mcp.Required(), @@ -586,8 +589,9 @@ func SubIssueWrite(getClient GetClientFn, t translations.TranslationHelperFunc) return mcp.NewTool("sub_issue_write", mcp.WithDescription(t("TOOL_SUB_ISSUE_WRITE_DESCRIPTION", "Add a sub-issue to a parent issue in a GitHub repository.")), mcp.WithToolAnnotation(mcp.ToolAnnotation{ - Title: t("TOOL_SUB_ISSUE_WRITE_USER_TITLE", "Change sub-issue"), - ReadOnlyHint: ToBoolPtr(false), + Title: t("TOOL_SUB_ISSUE_WRITE_USER_TITLE", "Change sub-issue"), + ReadOnlyHint: ToBoolPtr(false), + OpenWorldHint: ToBoolPtr(true), }), mcp.WithString("method", mcp.Required(), @@ -798,8 +802,9 @@ func SearchIssues(getClient GetClientFn, t translations.TranslationHelperFunc) ( return mcp.NewTool("search_issues", mcp.WithDescription(t("TOOL_SEARCH_ISSUES_DESCRIPTION", "Search for issues in GitHub repositories using issues search syntax already scoped to is:issue")), mcp.WithToolAnnotation(mcp.ToolAnnotation{ - Title: t("TOOL_SEARCH_ISSUES_USER_TITLE", "Search issues"), - ReadOnlyHint: ToBoolPtr(true), + Title: t("TOOL_SEARCH_ISSUES_USER_TITLE", "Search issues"), + ReadOnlyHint: ToBoolPtr(true), + OpenWorldHint: ToBoolPtr(true), }), mcp.WithString("query", mcp.Required(), @@ -843,8 +848,9 @@ func IssueWrite(getClient GetClientFn, getGQLClient GetGQLClientFn, t translatio return mcp.NewTool("issue_write", mcp.WithDescription(t("TOOL_ISSUE_WRITE_DESCRIPTION", "Create a new or update an existing issue in a GitHub repository.")), mcp.WithToolAnnotation(mcp.ToolAnnotation{ - Title: t("TOOL_ISSUE_WRITE_USER_TITLE", "Create or update issue."), - ReadOnlyHint: ToBoolPtr(false), + Title: t("TOOL_ISSUE_WRITE_USER_TITLE", "Create or update issue."), + ReadOnlyHint: ToBoolPtr(false), + OpenWorldHint: ToBoolPtr(true), }), mcp.WithString("method", mcp.Required(), @@ -1183,8 +1189,9 @@ func ListIssues(getGQLClient GetGQLClientFn, t translations.TranslationHelperFun return mcp.NewTool("list_issues", mcp.WithDescription(t("TOOL_LIST_ISSUES_DESCRIPTION", "List issues in a GitHub repository. For pagination, use the 'endCursor' from the previous response's 'pageInfo' in the 'after' parameter.")), mcp.WithToolAnnotation(mcp.ToolAnnotation{ - Title: t("TOOL_LIST_ISSUES_USER_TITLE", "List issues"), - ReadOnlyHint: ToBoolPtr(true), + Title: t("TOOL_LIST_ISSUES_USER_TITLE", "List issues"), + ReadOnlyHint: ToBoolPtr(true), + OpenWorldHint: ToBoolPtr(true), }), mcp.WithString("owner", mcp.Required(),