diff --git a/go.mod b/go.mod index 661778fc3..3c4ea34c0 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,9 @@ module github.com/github/github-mcp-server go 1.24.0 +// Use fork with schema caching and SchemaProvider interface for zero-reflection schema generation +replace github.com/modelcontextprotocol/go-sdk => github.com/SamMorrowDrums/go-sdk v0.0.0-20251204141811-d56ca1559a02 + require ( github.com/google/go-github/v79 v79.0.0 github.com/google/jsonschema-go v0.3.0 diff --git a/go.sum b/go.sum index e422a548c..e23cbb4c9 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/SamMorrowDrums/go-sdk v0.0.0-20251204141811-d56ca1559a02 h1:fMiSefai2435z5MnNk4Nr+3UfHcEeBd8dUIzZGsBUPk= +github.com/SamMorrowDrums/go-sdk v0.0.0-20251204141811-d56ca1559a02/go.mod h1:6fM3LCm3yV7pAs8isnKLn07oKtB0MP9LHd3DfAcKw10= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= @@ -55,8 +57,6 @@ github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwX github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA= github.com/migueleliasweb/go-github-mock v1.3.0 h1:2sVP9JEMB2ubQw1IKto3/fzF51oFC6eVWOOFDgQoq88= github.com/migueleliasweb/go-github-mock v1.3.0/go.mod h1:ipQhV8fTcj/G6m7BKzin08GaJ/3B5/SonRAkgrk0zCY= -github.com/modelcontextprotocol/go-sdk v1.1.0 h1:Qjayg53dnKC4UZ+792W21e4BpwEZBzwgRW6LrjLWSwA= -github.com/modelcontextprotocol/go-sdk v1.1.0/go.mod h1:6fM3LCm3yV7pAs8isnKLn07oKtB0MP9LHd3DfAcKw10= github.com/muesli/cache2go v0.0.0-20221011235721-518229cd8021 h1:31Y+Yu373ymebRdJN1cWLLooHH8xAr0MhKTEJGV/87g= github.com/muesli/cache2go v0.0.0-20221011235721-518229cd8021/go.mod h1:WERUkUryfUWlrHnFSO/BEUZ+7Ns8aZy7iVOGewxKzcc= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= diff --git a/pkg/github/__toolsnaps__/fork_repository.snap b/pkg/github/__toolsnaps__/fork_repository.snap index c195bd7d2..02a20baac 100644 --- a/pkg/github/__toolsnaps__/fork_repository.snap +++ b/pkg/github/__toolsnaps__/fork_repository.snap @@ -12,7 +12,7 @@ "properties": { "organization": { "type": "string", - "description": "Organization to fork to" + "description": "Organization to fork to (defaults to authenticated user)" }, "owner": { "type": "string", @@ -22,7 +22,8 @@ "type": "string", "description": "Repository name" } - } + }, + "additionalProperties": false }, "name": "fork_repository" } \ No newline at end of file diff --git a/pkg/github/__toolsnaps__/get_latest_release.snap b/pkg/github/__toolsnaps__/get_latest_release.snap index 23b551a0f..838ca3ccc 100644 --- a/pkg/github/__toolsnaps__/get_latest_release.snap +++ b/pkg/github/__toolsnaps__/get_latest_release.snap @@ -19,7 +19,8 @@ "type": "string", "description": "Repository name" } - } + }, + "additionalProperties": false }, "name": "get_latest_release" } \ No newline at end of file diff --git a/pkg/github/__toolsnaps__/get_me.snap b/pkg/github/__toolsnaps__/get_me.snap index 2ccdeda5b..3c23458d8 100644 --- a/pkg/github/__toolsnaps__/get_me.snap +++ b/pkg/github/__toolsnaps__/get_me.snap @@ -4,6 +4,9 @@ "title": "Get my user profile" }, "description": "Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when information is missing to build other tool calls.", - "inputSchema": null, + "inputSchema": { + "type": "object", + "additionalProperties": false + }, "name": "get_me" } \ No newline at end of file diff --git a/pkg/github/__toolsnaps__/get_release_by_tag.snap b/pkg/github/__toolsnaps__/get_release_by_tag.snap index 77f19488c..275667f9f 100644 --- a/pkg/github/__toolsnaps__/get_release_by_tag.snap +++ b/pkg/github/__toolsnaps__/get_release_by_tag.snap @@ -22,9 +22,10 @@ }, "tag": { "type": "string", - "description": "Tag name (e.g., 'v1.0.0')" + "description": "Tag name (e.g. 'v1.0.0')" } - } + }, + "additionalProperties": false }, "name": "get_release_by_tag" } \ No newline at end of file diff --git a/pkg/github/__toolsnaps__/list_branches.snap b/pkg/github/__toolsnaps__/list_branches.snap index b589c9b7e..ea3258021 100644 --- a/pkg/github/__toolsnaps__/list_branches.snap +++ b/pkg/github/__toolsnaps__/list_branches.snap @@ -16,21 +16,19 @@ "description": "Repository owner" }, "page": { - "type": "number", - "description": "Page number for pagination (min 1)", - "minimum": 1 + "type": "integer", + "description": "Page number for pagination (min 1)" }, "perPage": { - "type": "number", - "description": "Results per page for pagination (min 1, max 100)", - "minimum": 1, - "maximum": 100 + "type": "integer", + "description": "Results per page for pagination (min 1 and max 100)" }, "repo": { "type": "string", "description": "Repository name" } - } + }, + "additionalProperties": false }, "name": "list_branches" } \ No newline at end of file diff --git a/pkg/github/__toolsnaps__/list_releases.snap b/pkg/github/__toolsnaps__/list_releases.snap index 98d4ce66f..94513746a 100644 --- a/pkg/github/__toolsnaps__/list_releases.snap +++ b/pkg/github/__toolsnaps__/list_releases.snap @@ -16,21 +16,19 @@ "description": "Repository owner" }, "page": { - "type": "number", - "description": "Page number for pagination (min 1)", - "minimum": 1 + "type": "integer", + "description": "Page number for pagination (min 1)" }, "perPage": { - "type": "number", - "description": "Results per page for pagination (min 1, max 100)", - "minimum": 1, - "maximum": 100 + "type": "integer", + "description": "Results per page for pagination (min 1 and max 100)" }, "repo": { "type": "string", "description": "Repository name" } - } + }, + "additionalProperties": false }, "name": "list_releases" } \ No newline at end of file diff --git a/pkg/github/__toolsnaps__/list_tags.snap b/pkg/github/__toolsnaps__/list_tags.snap index 5b667d19c..db2835fc4 100644 --- a/pkg/github/__toolsnaps__/list_tags.snap +++ b/pkg/github/__toolsnaps__/list_tags.snap @@ -16,21 +16,19 @@ "description": "Repository owner" }, "page": { - "type": "number", - "description": "Page number for pagination (min 1)", - "minimum": 1 + "type": "integer", + "description": "Page number for pagination (min 1)" }, "perPage": { - "type": "number", - "description": "Results per page for pagination (min 1, max 100)", - "minimum": 1, - "maximum": 100 + "type": "integer", + "description": "Results per page for pagination (min 1 and max 100)" }, "repo": { "type": "string", "description": "Repository name" } - } + }, + "additionalProperties": false }, "name": "list_tags" } \ No newline at end of file diff --git a/pkg/github/__toolsnaps__/search_code.snap b/pkg/github/__toolsnaps__/search_code.snap index aebd432bf..582e1e09f 100644 --- a/pkg/github/__toolsnaps__/search_code.snap +++ b/pkg/github/__toolsnaps__/search_code.snap @@ -12,32 +12,30 @@ "properties": { "order": { "type": "string", - "description": "Sort order for results", + "description": "Sort order for results (asc/desc)", "enum": [ "asc", "desc" ] }, "page": { - "type": "number", - "description": "Page number for pagination (min 1)", - "minimum": 1 + "type": "integer", + "description": "Page number for pagination (min 1)" }, "perPage": { - "type": "number", - "description": "Results per page for pagination (min 1, max 100)", - "minimum": 1, - "maximum": 100 + "type": "integer", + "description": "Results per page for pagination (min 1 and max 100)" }, "query": { "type": "string", - "description": "Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more." + "description": "Search query using GitHub code search syntax" }, "sort": { "type": "string", - "description": "Sort field ('indexed' only)" + "description": "Sort field (indexed only)" } - } + }, + "additionalProperties": false }, "name": "search_code" } \ No newline at end of file diff --git a/pkg/github/__toolsnaps__/search_orgs.snap b/pkg/github/__toolsnaps__/search_orgs.snap index 36eb948ae..2d82397c0 100644 --- a/pkg/github/__toolsnaps__/search_orgs.snap +++ b/pkg/github/__toolsnaps__/search_orgs.snap @@ -19,30 +19,28 @@ ] }, "page": { - "type": "number", - "description": "Page number for pagination (min 1)", - "minimum": 1 + "type": "integer", + "description": "Page number for pagination (min 1)" }, "perPage": { - "type": "number", - "description": "Results per page for pagination (min 1, max 100)", - "minimum": 1, - "maximum": 100 + "type": "integer", + "description": "Results per page for pagination (min 1 and max 100)" }, "query": { "type": "string", - "description": "Organization search query. Examples: 'microsoft', 'location:california', 'created:\u003e=2025-01-01'. Search is automatically scoped to type:org." + "description": "Organization search query using GitHub search syntax" }, "sort": { "type": "string", - "description": "Sort field by category", + "description": "Sort field", "enum": [ "followers", "repositories", "joined" ] } - } + }, + "additionalProperties": false }, "name": "search_orgs" } \ No newline at end of file diff --git a/pkg/github/__toolsnaps__/search_repositories.snap b/pkg/github/__toolsnaps__/search_repositories.snap index 881bc3816..7570bfa1a 100644 --- a/pkg/github/__toolsnaps__/search_repositories.snap +++ b/pkg/github/__toolsnaps__/search_repositories.snap @@ -12,35 +12,31 @@ "properties": { "minimal_output": { "type": "boolean", - "description": "Return minimal repository information (default: true). When false, returns full GitHub API repository objects.", - "default": true + "description": "Return minimal repository information - when false returns full GitHub API objects" }, "order": { "type": "string", - "description": "Sort order", + "description": "Sort order (asc/desc)", "enum": [ "asc", "desc" ] }, "page": { - "type": "number", - "description": "Page number for pagination (min 1)", - "minimum": 1 + "type": "integer", + "description": "Page number for pagination (min 1)" }, "perPage": { - "type": "number", - "description": "Results per page for pagination (min 1, max 100)", - "minimum": 1, - "maximum": 100 + "type": "integer", + "description": "Results per page for pagination (min 1 and max 100)" }, "query": { "type": "string", - "description": "Repository search query. Examples: 'machine learning in:name stars:\u003e1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering." + "description": "Repository search query using GitHub search syntax" }, "sort": { "type": "string", - "description": "Sort repositories by field, defaults to best match", + "description": "Sort repositories by field - defaults to best match", "enum": [ "stars", "forks", @@ -48,7 +44,8 @@ "updated" ] } - } + }, + "additionalProperties": false }, "name": "search_repositories" } \ No newline at end of file diff --git a/pkg/github/__toolsnaps__/search_users.snap b/pkg/github/__toolsnaps__/search_users.snap index 293107696..c42e72f6d 100644 --- a/pkg/github/__toolsnaps__/search_users.snap +++ b/pkg/github/__toolsnaps__/search_users.snap @@ -12,37 +12,35 @@ "properties": { "order": { "type": "string", - "description": "Sort order", + "description": "Sort order (asc/desc)", "enum": [ "asc", "desc" ] }, "page": { - "type": "number", - "description": "Page number for pagination (min 1)", - "minimum": 1 + "type": "integer", + "description": "Page number for pagination (min 1)" }, "perPage": { - "type": "number", - "description": "Results per page for pagination (min 1, max 100)", - "minimum": 1, - "maximum": 100 + "type": "integer", + "description": "Results per page for pagination (min 1 and max 100)" }, "query": { "type": "string", - "description": "User search query. Examples: 'john smith', 'location:seattle', 'followers:\u003e100'. Search is automatically scoped to type:user." + "description": "User search query using GitHub search syntax" }, "sort": { "type": "string", - "description": "Sort users by number of followers or repositories, or when the person joined GitHub.", + "description": "Sort users by followers/repositories/joined", "enum": [ "followers", "repositories", "joined" ] } - } + }, + "additionalProperties": false }, "name": "search_users" } \ No newline at end of file diff --git a/pkg/github/context_tools.go b/pkg/github/context_tools.go index 4f892b528..d8e8aed08 100644 --- a/pkg/github/context_tools.go +++ b/pkg/github/context_tools.go @@ -35,7 +35,7 @@ type UserDetails struct { } // GetMe creates a tool to get details of the authenticated user. -func GetMe(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) { +func GetMe(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[GetMeInput, any]) { return mcp.Tool{ Name: "get_me", Description: t("TOOL_GET_ME_DESCRIPTION", "Get details of the authenticated GitHub user. Use this when a request is about the user's own profile for GitHub. Or when information is missing to build other tool calls."), @@ -43,8 +43,9 @@ func GetMe(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Too Title: t("TOOL_GET_ME_USER_TITLE", "Get my user profile"), ReadOnlyHint: true, }, + InputSchema: GetMeInput{}.MCPSchema(), }, - mcp.ToolHandlerFor[map[string]any, any](func(ctx context.Context, _ *mcp.CallToolRequest, _ map[string]any) (*mcp.CallToolResult, any, error) { + mcp.ToolHandlerFor[GetMeInput, any](func(ctx context.Context, _ *mcp.CallToolRequest, _ GetMeInput) (*mcp.CallToolResult, any, error) { client, err := getClient(ctx) if err != nil { return utils.NewToolResultErrorFromErr("failed to get GitHub client", err), nil, nil diff --git a/pkg/github/context_tools_test.go b/pkg/github/context_tools_test.go index 96e21c233..24cfebb98 100644 --- a/pkg/github/context_tools_test.go +++ b/pkg/github/context_tools_test.go @@ -48,7 +48,6 @@ func Test_GetMe(t *testing.T) { tests := []struct { name string stubbedGetClientFn GetClientFn - requestArgs map[string]any expectToolError bool expectedUser *github.User expectedToolErrMsg string @@ -63,7 +62,6 @@ func Test_GetMe(t *testing.T) { ), ), ), - requestArgs: map[string]any{}, expectToolError: false, expectedUser: mockUser, }, @@ -77,16 +75,12 @@ func Test_GetMe(t *testing.T) { ), ), ), - requestArgs: map[string]any{ - "reason": "Testing API", - }, expectToolError: false, expectedUser: mockUser, }, { name: "getting client fails", stubbedGetClientFn: stubGetClientFnErr("expected test error"), - requestArgs: map[string]any{}, expectToolError: true, expectedToolErrMsg: "failed to get GitHub client: expected test error", }, @@ -100,7 +94,6 @@ func Test_GetMe(t *testing.T) { ), ), ), - requestArgs: map[string]any{}, expectToolError: true, expectedToolErrMsg: "expected test failure", }, @@ -110,8 +103,8 @@ func Test_GetMe(t *testing.T) { t.Run(tc.name, func(t *testing.T) { _, handler := GetMe(tc.stubbedGetClientFn, translations.NullTranslationHelper) - request := createMCPRequest(tc.requestArgs) - result, _, _ := handler(context.Background(), &request, tc.requestArgs) + // Call handler with empty typed input + result, _, _ := handler(context.Background(), nil, GetMeInput{}) textContent := getTextResult(t, result) if tc.expectToolError { diff --git a/pkg/github/github_mcp_gen.go b/pkg/github/github_mcp_gen.go new file mode 100644 index 000000000..40b18ef6f --- /dev/null +++ b/pkg/github/github_mcp_gen.go @@ -0,0 +1,4435 @@ +// Code generated by mcpgen. DO NOT EDIT. + +package github + +import ( + "github.com/google/jsonschema-go/jsonschema" +) + +// SearchRepositoriesInput schema variables (generated) +var ( + _searchrepositoriesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "query": { + Type: "string", + Description: "Repository search query using GitHub search syntax", + }, + "sort": { + Type: "string", + Description: "Sort repositories by field - defaults to best match", + Enum: []any{"stars", "forks", "help-wanted-issues", "updated"}, + }, + "order": { + Type: "string", + Description: "Sort order (asc/desc)", + Enum: []any{"asc", "desc"}, + }, + "minimal_output": { + Type: "boolean", + Description: "Return minimal repository information - when false returns full GitHub API objects", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "query", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _searchrepositoriesinputResolved, _ = _searchrepositoriesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for SearchRepositoriesInput. +// This implements mcp.SchemaProvider. +func (SearchRepositoriesInput) MCPSchema() *jsonschema.Schema { + return _searchrepositoriesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for SearchRepositoriesInput. +// This implements mcp.ResolvedSchemaProvider. +func (SearchRepositoriesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _searchrepositoriesinputResolved +} + +// SearchCodeInput schema variables (generated) +var ( + _searchcodeinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "query": { + Type: "string", + Description: "Search query using GitHub code search syntax", + }, + "sort": { + Type: "string", + Description: "Sort field (indexed only)", + }, + "order": { + Type: "string", + Description: "Sort order for results (asc/desc)", + Enum: []any{"asc", "desc"}, + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "query", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _searchcodeinputResolved, _ = _searchcodeinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for SearchCodeInput. +// This implements mcp.SchemaProvider. +func (SearchCodeInput) MCPSchema() *jsonschema.Schema { + return _searchcodeinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for SearchCodeInput. +// This implements mcp.ResolvedSchemaProvider. +func (SearchCodeInput) MCPResolvedSchema() *jsonschema.Resolved { + return _searchcodeinputResolved +} + +// SearchUsersInput schema variables (generated) +var ( + _searchusersinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "query": { + Type: "string", + Description: "User search query using GitHub search syntax", + }, + "sort": { + Type: "string", + Description: "Sort users by followers/repositories/joined", + Enum: []any{"followers", "repositories", "joined"}, + }, + "order": { + Type: "string", + Description: "Sort order (asc/desc)", + Enum: []any{"asc", "desc"}, + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "query", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _searchusersinputResolved, _ = _searchusersinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for SearchUsersInput. +// This implements mcp.SchemaProvider. +func (SearchUsersInput) MCPSchema() *jsonschema.Schema { + return _searchusersinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for SearchUsersInput. +// This implements mcp.ResolvedSchemaProvider. +func (SearchUsersInput) MCPResolvedSchema() *jsonschema.Resolved { + return _searchusersinputResolved +} + +// SearchIssuesInput schema variables (generated) +var ( + _searchissuesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "query": { + Type: "string", + Description: "Search query using GitHub issues search syntax", + }, + "owner": { + Type: "string", + Description: "Repository owner to scope the search", + }, + "repo": { + Type: "string", + Description: "Repository name to scope the search", + }, + "sort": { + Type: "string", + Description: "Sort by field", + Enum: []any{"comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated"}, + }, + "order": { + Type: "string", + Description: "Sort order (asc/desc)", + Enum: []any{"asc", "desc"}, + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "query", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _searchissuesinputResolved, _ = _searchissuesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for SearchIssuesInput. +// This implements mcp.SchemaProvider. +func (SearchIssuesInput) MCPSchema() *jsonschema.Schema { + return _searchissuesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for SearchIssuesInput. +// This implements mcp.ResolvedSchemaProvider. +func (SearchIssuesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _searchissuesinputResolved +} + +// SearchPullRequestsInput schema variables (generated) +var ( + _searchpullrequestsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "query": { + Type: "string", + Description: "Search query using GitHub pull requests search syntax", + }, + "owner": { + Type: "string", + Description: "Repository owner to scope the search", + }, + "repo": { + Type: "string", + Description: "Repository name to scope the search", + }, + "sort": { + Type: "string", + Description: "Sort by field", + Enum: []any{"comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated"}, + }, + "order": { + Type: "string", + Description: "Sort order (asc/desc)", + Enum: []any{"asc", "desc"}, + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "query", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _searchpullrequestsinputResolved, _ = _searchpullrequestsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for SearchPullRequestsInput. +// This implements mcp.SchemaProvider. +func (SearchPullRequestsInput) MCPSchema() *jsonschema.Schema { + return _searchpullrequestsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for SearchPullRequestsInput. +// This implements mcp.ResolvedSchemaProvider. +func (SearchPullRequestsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _searchpullrequestsinputResolved +} + +// GetFileContentsInput schema variables (generated) +var ( + _getfilecontentsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner (username or organization)", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "path": { + Type: "string", + Description: "Path to file or directory", + }, + "ref": { + Type: "string", + Description: "Git ref such as branch name or tag name or commit SHA", + }, + "sha": { + Type: "string", + Description: "Commit SHA (overrides ref if specified)", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getfilecontentsinputResolved, _ = _getfilecontentsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetFileContentsInput. +// This implements mcp.SchemaProvider. +func (GetFileContentsInput) MCPSchema() *jsonschema.Schema { + return _getfilecontentsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetFileContentsInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetFileContentsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getfilecontentsinputResolved +} + +// CreateIssueInput schema variables (generated) +var ( + _createissueinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "title": { + Type: "string", + Description: "Issue title", + }, + "body": { + Type: "string", + Description: "Issue body content", + }, + "assignees": { + Type: "array", + Description: "Usernames to assign to this issue", + }, + "labels": { + Type: "array", + Description: "Labels to add to this issue", + }, + "milestone": { + Type: "integer", + Description: "Milestone number to assign", + }, + }, + Required: []string{ + "owner", + "repo", + "title", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _createissueinputResolved, _ = _createissueinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for CreateIssueInput. +// This implements mcp.SchemaProvider. +func (CreateIssueInput) MCPSchema() *jsonschema.Schema { + return _createissueinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for CreateIssueInput. +// This implements mcp.ResolvedSchemaProvider. +func (CreateIssueInput) MCPResolvedSchema() *jsonschema.Resolved { + return _createissueinputResolved +} + +// CreatePullRequestInput schema variables (generated) +var ( + _createpullrequestinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "title": { + Type: "string", + Description: "Pull request title", + }, + "body": { + Type: "string", + Description: "Pull request body/description", + }, + "head": { + Type: "string", + Description: "Branch where your changes are implemented", + }, + "base": { + Type: "string", + Description: "Branch you want the changes pulled into", + }, + "draft": { + Type: "boolean", + Description: "Create as a draft pull request", + }, + "maintainer_can_modify": { + Type: "boolean", + Description: "Whether maintainers can modify the pull request", + }, + }, + Required: []string{ + "owner", + "repo", + "title", + "head", + "base", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _createpullrequestinputResolved, _ = _createpullrequestinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for CreatePullRequestInput. +// This implements mcp.SchemaProvider. +func (CreatePullRequestInput) MCPSchema() *jsonschema.Schema { + return _createpullrequestinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for CreatePullRequestInput. +// This implements mcp.ResolvedSchemaProvider. +func (CreatePullRequestInput) MCPResolvedSchema() *jsonschema.Resolved { + return _createpullrequestinputResolved +} + +// ListCommitsInput schema variables (generated) +var ( + _listcommitsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "sha": { + Type: "string", + Description: "SHA or branch to start listing commits from", + }, + "author": { + Type: "string", + Description: "Filter commits by author username or email", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listcommitsinputResolved, _ = _listcommitsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListCommitsInput. +// This implements mcp.SchemaProvider. +func (ListCommitsInput) MCPSchema() *jsonschema.Schema { + return _listcommitsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListCommitsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListCommitsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listcommitsinputResolved +} + +// GetCommitInput schema variables (generated) +var ( + _getcommitinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "sha": { + Type: "string", + Description: "Commit SHA or branch name or tag name", + }, + "include_diff": { + Type: "boolean", + Description: "Whether to include file diffs and stats in the response", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "owner", + "repo", + "sha", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getcommitinputResolved, _ = _getcommitinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetCommitInput. +// This implements mcp.SchemaProvider. +func (GetCommitInput) MCPSchema() *jsonschema.Schema { + return _getcommitinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetCommitInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetCommitInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getcommitinputResolved +} + +// ListBranchesInput schema variables (generated) +var ( + _listbranchesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listbranchesinputResolved, _ = _listbranchesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListBranchesInput. +// This implements mcp.SchemaProvider. +func (ListBranchesInput) MCPSchema() *jsonschema.Schema { + return _listbranchesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListBranchesInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListBranchesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listbranchesinputResolved +} + +// ListTagsInput schema variables (generated) +var ( + _listtagsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listtagsinputResolved, _ = _listtagsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListTagsInput. +// This implements mcp.SchemaProvider. +func (ListTagsInput) MCPSchema() *jsonschema.Schema { + return _listtagsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListTagsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListTagsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listtagsinputResolved +} + +// ListReleasesInput schema variables (generated) +var ( + _listreleasesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listreleasesinputResolved, _ = _listreleasesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListReleasesInput. +// This implements mcp.SchemaProvider. +func (ListReleasesInput) MCPSchema() *jsonschema.Schema { + return _listreleasesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListReleasesInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListReleasesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listreleasesinputResolved +} + +// GetReleaseByTagInput schema variables (generated) +var ( + _getreleasebytaginputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "tag": { + Type: "string", + Description: "Tag name (e.g. 'v1.0.0')", + }, + }, + Required: []string{ + "owner", + "repo", + "tag", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getreleasebytaginputResolved, _ = _getreleasebytaginputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetReleaseByTagInput. +// This implements mcp.SchemaProvider. +func (GetReleaseByTagInput) MCPSchema() *jsonschema.Schema { + return _getreleasebytaginputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetReleaseByTagInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetReleaseByTagInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getreleasebytaginputResolved +} + +// ListWorkflowsInput schema variables (generated) +var ( + _listworkflowsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listworkflowsinputResolved, _ = _listworkflowsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListWorkflowsInput. +// This implements mcp.SchemaProvider. +func (ListWorkflowsInput) MCPSchema() *jsonschema.Schema { + return _listworkflowsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListWorkflowsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListWorkflowsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listworkflowsinputResolved +} + +// ListWorkflowRunsInput schema variables (generated) +var ( + _listworkflowrunsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "workflow_id": { + Type: "string", + Description: "The workflow ID or workflow file name", + }, + "branch": { + Type: "string", + Description: "Filter by branch name", + }, + "actor": { + Type: "string", + Description: "Filter by actor (user who triggered the workflow)", + }, + "status": { + Type: "string", + Description: "Filter by status", + Enum: []any{"queued", "in_progress", "completed", "requested", "waiting"}, + }, + "event": { + Type: "string", + Description: "Filter by event type", + Enum: []any{"push", "pull_request", "workflow_dispatch", "schedule", "release"}, + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "owner", + "repo", + "workflow_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listworkflowrunsinputResolved, _ = _listworkflowrunsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListWorkflowRunsInput. +// This implements mcp.SchemaProvider. +func (ListWorkflowRunsInput) MCPSchema() *jsonschema.Schema { + return _listworkflowrunsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListWorkflowRunsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListWorkflowRunsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listworkflowrunsinputResolved +} + +// GetWorkflowRunInput schema variables (generated) +var ( + _getworkflowruninputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "run_id": { + Type: "integer", + Description: "The unique identifier of the workflow run", + }, + }, + Required: []string{ + "owner", + "repo", + "run_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getworkflowruninputResolved, _ = _getworkflowruninputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetWorkflowRunInput. +// This implements mcp.SchemaProvider. +func (GetWorkflowRunInput) MCPSchema() *jsonschema.Schema { + return _getworkflowruninputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetWorkflowRunInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetWorkflowRunInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getworkflowruninputResolved +} + +// ListNotificationsInput schema variables (generated) +var ( + _listnotificationsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "filter": { + Type: "string", + Description: "Filter notifications", + Enum: []any{"default", "include_read_notifications", "only_participating"}, + }, + "since": { + Type: "string", + Description: "Only show notifications updated after the given time (ISO 8601 format)", + }, + "before": { + Type: "string", + Description: "Only show notifications updated before the given time (ISO 8601 format)", + }, + "owner": { + Type: "string", + Description: "Repository owner to filter notifications", + }, + "repo": { + Type: "string", + Description: "Repository name to filter notifications", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{}, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listnotificationsinputResolved, _ = _listnotificationsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListNotificationsInput. +// This implements mcp.SchemaProvider. +func (ListNotificationsInput) MCPSchema() *jsonschema.Schema { + return _listnotificationsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListNotificationsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListNotificationsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listnotificationsinputResolved +} + +// GetRepositoryTreeInput schema variables (generated) +var ( + _getrepositorytreeinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner (username or organization)", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "tree_sha": { + Type: "string", + Description: "The SHA1 value or ref (branch or tag) name of the tree", + }, + "recursive": { + Type: "boolean", + Description: "Recursively fetch the tree", + }, + "path_filter": { + Type: "string", + Description: "Optional path prefix to filter the tree results", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getrepositorytreeinputResolved, _ = _getrepositorytreeinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetRepositoryTreeInput. +// This implements mcp.SchemaProvider. +func (GetRepositoryTreeInput) MCPSchema() *jsonschema.Schema { + return _getrepositorytreeinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetRepositoryTreeInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetRepositoryTreeInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getrepositorytreeinputResolved +} + +// CreateBranchInput schema variables (generated) +var ( + _createbranchinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "branch": { + Type: "string", + Description: "Name for the new branch", + }, + "from_ref": { + Type: "string", + Description: "The ref to create the branch from (defaults to the default branch)", + }, + }, + Required: []string{ + "owner", + "repo", + "branch", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _createbranchinputResolved, _ = _createbranchinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for CreateBranchInput. +// This implements mcp.SchemaProvider. +func (CreateBranchInput) MCPSchema() *jsonschema.Schema { + return _createbranchinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for CreateBranchInput. +// This implements mcp.ResolvedSchemaProvider. +func (CreateBranchInput) MCPResolvedSchema() *jsonschema.Resolved { + return _createbranchinputResolved +} + +// CreateOrUpdateFileInput schema variables (generated) +var ( + _createorupdatefileinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "path": { + Type: "string", + Description: "Path where to create/update the file", + }, + "content": { + Type: "string", + Description: "Content of the file", + }, + "message": { + Type: "string", + Description: "Commit message", + }, + "branch": { + Type: "string", + Description: "Branch to create/update the file in", + }, + "sha": { + Type: "string", + Description: "SHA of the file being replaced (required for updates)", + }, + }, + Required: []string{ + "owner", + "repo", + "path", + "content", + "message", + "branch", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _createorupdatefileinputResolved, _ = _createorupdatefileinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for CreateOrUpdateFileInput. +// This implements mcp.SchemaProvider. +func (CreateOrUpdateFileInput) MCPSchema() *jsonschema.Schema { + return _createorupdatefileinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for CreateOrUpdateFileInput. +// This implements mcp.ResolvedSchemaProvider. +func (CreateOrUpdateFileInput) MCPResolvedSchema() *jsonschema.Resolved { + return _createorupdatefileinputResolved +} + +// PushFilesInput schema variables (generated) +var ( + _pushfilesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "branch": { + Type: "string", + Description: "Branch to push to", + }, + "message": { + Type: "string", + Description: "Commit message", + }, + "files": { + Type: "array", + Description: "List of file operations to perform", + }, + }, + Required: []string{ + "owner", + "repo", + "branch", + "message", + "files", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _pushfilesinputResolved, _ = _pushfilesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for PushFilesInput. +// This implements mcp.SchemaProvider. +func (PushFilesInput) MCPSchema() *jsonschema.Schema { + return _pushfilesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for PushFilesInput. +// This implements mcp.ResolvedSchemaProvider. +func (PushFilesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _pushfilesinputResolved +} + +// ForkRepositoryInput schema variables (generated) +var ( + _forkrepositoryinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "organization": { + Type: "string", + Description: "Organization to fork to (defaults to authenticated user)", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _forkrepositoryinputResolved, _ = _forkrepositoryinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ForkRepositoryInput. +// This implements mcp.SchemaProvider. +func (ForkRepositoryInput) MCPSchema() *jsonschema.Schema { + return _forkrepositoryinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ForkRepositoryInput. +// This implements mcp.ResolvedSchemaProvider. +func (ForkRepositoryInput) MCPResolvedSchema() *jsonschema.Resolved { + return _forkrepositoryinputResolved +} + +// CreateRepositoryInput schema variables (generated) +var ( + _createrepositoryinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "name": { + Type: "string", + Description: "Repository name", + }, + "description": { + Type: "string", + Description: "Repository description", + }, + "private": { + Type: "boolean", + Description: "Whether the repository is private", + }, + "auto_init": { + Type: "boolean", + Description: "Initialize with a README", + }, + }, + Required: []string{ + "name", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _createrepositoryinputResolved, _ = _createrepositoryinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for CreateRepositoryInput. +// This implements mcp.SchemaProvider. +func (CreateRepositoryInput) MCPSchema() *jsonschema.Schema { + return _createrepositoryinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for CreateRepositoryInput. +// This implements mcp.ResolvedSchemaProvider. +func (CreateRepositoryInput) MCPResolvedSchema() *jsonschema.Resolved { + return _createrepositoryinputResolved +} + +// GetMeInput schema variables (generated) +var ( + _getmeinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{}, + Required: []string{}, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getmeinputResolved, _ = _getmeinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetMeInput. +// This implements mcp.SchemaProvider. +func (GetMeInput) MCPSchema() *jsonschema.Schema { + return _getmeinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetMeInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetMeInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getmeinputResolved +} + +// ListGistsInput schema variables (generated) +var ( + _listgistsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "username": { + Type: "string", + Description: "GitHub username (omit for authenticated user's gists)", + }, + "since": { + Type: "string", + Description: "Only gists updated after this time (ISO 8601 timestamp)", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{}, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listgistsinputResolved, _ = _listgistsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListGistsInput. +// This implements mcp.SchemaProvider. +func (ListGistsInput) MCPSchema() *jsonschema.Schema { + return _listgistsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListGistsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListGistsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listgistsinputResolved +} + +// GetGistInput schema variables (generated) +var ( + _getgistinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "gist_id": { + Type: "string", + Description: "The ID of the gist to retrieve", + }, + }, + Required: []string{ + "gist_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getgistinputResolved, _ = _getgistinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetGistInput. +// This implements mcp.SchemaProvider. +func (GetGistInput) MCPSchema() *jsonschema.Schema { + return _getgistinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetGistInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetGistInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getgistinputResolved +} + +// CreateGistInput schema variables (generated) +var ( + _creategistinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "description": { + Type: "string", + Description: "Description of the gist", + }, + "public": { + Type: "boolean", + Description: "Whether the gist is public", + }, + "files": { + Type: "object", + Description: "Map of filename to file content", + }, + }, + Required: []string{ + "files", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _creategistinputResolved, _ = _creategistinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for CreateGistInput. +// This implements mcp.SchemaProvider. +func (CreateGistInput) MCPSchema() *jsonschema.Schema { + return _creategistinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for CreateGistInput. +// This implements mcp.ResolvedSchemaProvider. +func (CreateGistInput) MCPResolvedSchema() *jsonschema.Resolved { + return _creategistinputResolved +} + +// UpdateGistInput schema variables (generated) +var ( + _updategistinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "gist_id": { + Type: "string", + Description: "The ID of the gist to update", + }, + "description": { + Type: "string", + Description: "New description for the gist", + }, + "files": { + Type: "object", + Description: "Map of filename to new file content", + }, + }, + Required: []string{ + "gist_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _updategistinputResolved, _ = _updategistinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for UpdateGistInput. +// This implements mcp.SchemaProvider. +func (UpdateGistInput) MCPSchema() *jsonschema.Schema { + return _updategistinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for UpdateGistInput. +// This implements mcp.ResolvedSchemaProvider. +func (UpdateGistInput) MCPResolvedSchema() *jsonschema.Resolved { + return _updategistinputResolved +} + +// ListLabelsInput schema variables (generated) +var ( + _listlabelsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listlabelsinputResolved, _ = _listlabelsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListLabelsInput. +// This implements mcp.SchemaProvider. +func (ListLabelsInput) MCPSchema() *jsonschema.Schema { + return _listlabelsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListLabelsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListLabelsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listlabelsinputResolved +} + +// GetLabelInput schema variables (generated) +var ( + _getlabelinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "name": { + Type: "string", + Description: "Label name", + }, + }, + Required: []string{ + "owner", + "repo", + "name", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getlabelinputResolved, _ = _getlabelinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetLabelInput. +// This implements mcp.SchemaProvider. +func (GetLabelInput) MCPSchema() *jsonschema.Schema { + return _getlabelinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetLabelInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetLabelInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getlabelinputResolved +} + +// ListDiscussionsInput schema variables (generated) +var ( + _listdiscussionsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "category_id": { + Type: "string", + Description: "Filter by category ID", + }, + "order_by": { + Type: "string", + Description: "Field to order by", + Enum: []any{"CREATED_AT", "UPDATED_AT"}, + }, + "direction": { + Type: "string", + Description: "Order direction", + Enum: []any{"ASC", "DESC"}, + }, + "first": { + Type: "integer", + Description: "Number of discussions to return", + }, + "after": { + Type: "string", + Description: "Cursor for pagination", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listdiscussionsinputResolved, _ = _listdiscussionsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListDiscussionsInput. +// This implements mcp.SchemaProvider. +func (ListDiscussionsInput) MCPSchema() *jsonschema.Schema { + return _listdiscussionsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListDiscussionsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListDiscussionsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listdiscussionsinputResolved +} + +// GetDiscussionInput schema variables (generated) +var ( + _getdiscussioninputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "discussion_number": { + Type: "integer", + Description: "Discussion number", + }, + }, + Required: []string{ + "owner", + "repo", + "discussion_number", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getdiscussioninputResolved, _ = _getdiscussioninputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetDiscussionInput. +// This implements mcp.SchemaProvider. +func (GetDiscussionInput) MCPSchema() *jsonschema.Schema { + return _getdiscussioninputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetDiscussionInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetDiscussionInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getdiscussioninputResolved +} + +// GetDiscussionCommentsInput schema variables (generated) +var ( + _getdiscussioncommentsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "discussion_number": { + Type: "integer", + Description: "Discussion number", + }, + "first": { + Type: "integer", + Description: "Number of comments to return", + }, + "after": { + Type: "string", + Description: "Cursor for pagination", + }, + }, + Required: []string{ + "owner", + "repo", + "discussion_number", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getdiscussioncommentsinputResolved, _ = _getdiscussioncommentsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetDiscussionCommentsInput. +// This implements mcp.SchemaProvider. +func (GetDiscussionCommentsInput) MCPSchema() *jsonschema.Schema { + return _getdiscussioncommentsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetDiscussionCommentsInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetDiscussionCommentsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getdiscussioncommentsinputResolved +} + +// ListDiscussionCategoriesInput schema variables (generated) +var ( + _listdiscussioncategoriesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "first": { + Type: "integer", + Description: "Number of categories to return", + }, + "after": { + Type: "string", + Description: "Cursor for pagination", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listdiscussioncategoriesinputResolved, _ = _listdiscussioncategoriesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListDiscussionCategoriesInput. +// This implements mcp.SchemaProvider. +func (ListDiscussionCategoriesInput) MCPSchema() *jsonschema.Schema { + return _listdiscussioncategoriesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListDiscussionCategoriesInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListDiscussionCategoriesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listdiscussioncategoriesinputResolved +} + +// ListProjectsInput schema variables (generated) +var ( + _listprojectsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner_type": { + Type: "string", + Description: "Owner type", + Enum: []any{"user", "org"}, + }, + "owner": { + Type: "string", + Description: "Owner name (user handle or org name)", + }, + "query": { + Type: "string", + Description: "Filter projects by title and state (e.g. 'roadmap is:open')", + }, + "per_page": { + Type: "integer", + Description: "Results per page", + }, + "after": { + Type: "string", + Description: "Forward pagination cursor", + }, + "before": { + Type: "string", + Description: "Backward pagination cursor", + }, + }, + Required: []string{ + "owner_type", + "owner", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listprojectsinputResolved, _ = _listprojectsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListProjectsInput. +// This implements mcp.SchemaProvider. +func (ListProjectsInput) MCPSchema() *jsonschema.Schema { + return _listprojectsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListProjectsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListProjectsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listprojectsinputResolved +} + +// GetProjectInput schema variables (generated) +var ( + _getprojectinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Owner of the project", + }, + "project_id": { + Type: "integer", + Description: "Project number", + }, + }, + Required: []string{ + "owner", + "project_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getprojectinputResolved, _ = _getprojectinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetProjectInput. +// This implements mcp.SchemaProvider. +func (GetProjectInput) MCPSchema() *jsonschema.Schema { + return _getprojectinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetProjectInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetProjectInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getprojectinputResolved +} + +// ListProjectItemsInput schema variables (generated) +var ( + _listprojectitemsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Owner of the project", + }, + "project_id": { + Type: "integer", + Description: "Project number", + }, + "first": { + Type: "integer", + Description: "Number of items to return", + }, + "after": { + Type: "string", + Description: "Cursor for pagination", + }, + }, + Required: []string{ + "owner", + "project_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listprojectitemsinputResolved, _ = _listprojectitemsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListProjectItemsInput. +// This implements mcp.SchemaProvider. +func (ListProjectItemsInput) MCPSchema() *jsonschema.Schema { + return _listprojectitemsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListProjectItemsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListProjectItemsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listprojectitemsinputResolved +} + +// GetProjectItemInput schema variables (generated) +var ( + _getprojectiteminputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Owner of the project", + }, + "project_id": { + Type: "integer", + Description: "Project number", + }, + "item_id": { + Type: "string", + Description: "Item ID", + }, + }, + Required: []string{ + "owner", + "project_id", + "item_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getprojectiteminputResolved, _ = _getprojectiteminputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetProjectItemInput. +// This implements mcp.SchemaProvider. +func (GetProjectItemInput) MCPSchema() *jsonschema.Schema { + return _getprojectiteminputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetProjectItemInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetProjectItemInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getprojectiteminputResolved +} + +// AddProjectItemInput schema variables (generated) +var ( + _addprojectiteminputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Owner of the project", + }, + "project_id": { + Type: "integer", + Description: "Project number", + }, + "content_id": { + Type: "string", + Description: "ID of the issue or PR to add", + }, + }, + Required: []string{ + "owner", + "project_id", + "content_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _addprojectiteminputResolved, _ = _addprojectiteminputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for AddProjectItemInput. +// This implements mcp.SchemaProvider. +func (AddProjectItemInput) MCPSchema() *jsonschema.Schema { + return _addprojectiteminputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for AddProjectItemInput. +// This implements mcp.ResolvedSchemaProvider. +func (AddProjectItemInput) MCPResolvedSchema() *jsonschema.Resolved { + return _addprojectiteminputResolved +} + +// UpdateProjectItemInput schema variables (generated) +var ( + _updateprojectiteminputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Owner of the project", + }, + "project_id": { + Type: "integer", + Description: "Project number", + }, + "item_id": { + Type: "string", + Description: "Item ID to update", + }, + "field_id": { + Type: "string", + Description: "Field ID to update", + }, + "value": { + Type: "object", + Description: "New value for the field", + }, + }, + Required: []string{ + "owner", + "project_id", + "item_id", + "field_id", + "value", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _updateprojectiteminputResolved, _ = _updateprojectiteminputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for UpdateProjectItemInput. +// This implements mcp.SchemaProvider. +func (UpdateProjectItemInput) MCPSchema() *jsonschema.Schema { + return _updateprojectiteminputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for UpdateProjectItemInput. +// This implements mcp.ResolvedSchemaProvider. +func (UpdateProjectItemInput) MCPResolvedSchema() *jsonschema.Resolved { + return _updateprojectiteminputResolved +} + +// DeleteProjectItemInput schema variables (generated) +var ( + _deleteprojectiteminputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Owner of the project", + }, + "project_id": { + Type: "integer", + Description: "Project number", + }, + "item_id": { + Type: "string", + Description: "Item ID to delete", + }, + }, + Required: []string{ + "owner", + "project_id", + "item_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _deleteprojectiteminputResolved, _ = _deleteprojectiteminputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for DeleteProjectItemInput. +// This implements mcp.SchemaProvider. +func (DeleteProjectItemInput) MCPSchema() *jsonschema.Schema { + return _deleteprojectiteminputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for DeleteProjectItemInput. +// This implements mcp.ResolvedSchemaProvider. +func (DeleteProjectItemInput) MCPResolvedSchema() *jsonschema.Resolved { + return _deleteprojectiteminputResolved +} + +// ListPullRequestsInput schema variables (generated) +var ( + _listpullrequestsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "state": { + Type: "string", + Description: "Filter by state", + Enum: []any{"open", "closed", "all"}, + }, + "head": { + Type: "string", + Description: "Filter by head user/org and branch", + }, + "base": { + Type: "string", + Description: "Filter by base branch", + }, + "sort": { + Type: "string", + Description: "Sort by", + Enum: []any{"created", "updated", "popularity", "long-running"}, + }, + "direction": { + Type: "string", + Description: "Sort direction", + Enum: []any{"asc", "desc"}, + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listpullrequestsinputResolved, _ = _listpullrequestsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListPullRequestsInput. +// This implements mcp.SchemaProvider. +func (ListPullRequestsInput) MCPSchema() *jsonschema.Schema { + return _listpullrequestsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListPullRequestsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListPullRequestsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listpullrequestsinputResolved +} + +// PullRequestReadInput schema variables (generated) +var ( + _pullrequestreadinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "method": { + Type: "string", + Description: "Read operation to perform", + Enum: []any{"get", "get_diff", "get_status", "get_files", "get_review_comments", "get_reviews", "get_comments"}, + }, + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "pullNumber": { + Type: "integer", + Description: "Pull request number", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "method", + "owner", + "repo", + "pullNumber", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _pullrequestreadinputResolved, _ = _pullrequestreadinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for PullRequestReadInput. +// This implements mcp.SchemaProvider. +func (PullRequestReadInput) MCPSchema() *jsonschema.Schema { + return _pullrequestreadinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for PullRequestReadInput. +// This implements mcp.ResolvedSchemaProvider. +func (PullRequestReadInput) MCPResolvedSchema() *jsonschema.Resolved { + return _pullrequestreadinputResolved +} + +// UpdatePullRequestInput schema variables (generated) +var ( + _updatepullrequestinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "pull_number": { + Type: "integer", + Description: "Pull request number", + }, + "title": { + Type: "string", + Description: "New title", + }, + "body": { + Type: "string", + Description: "New body", + }, + "state": { + Type: "string", + Description: "New state", + Enum: []any{"open", "closed"}, + }, + "base": { + Type: "string", + Description: "New base branch", + }, + "maintainer_can_modify": { + Type: "boolean", + Description: "Allow maintainer modifications", + }, + }, + Required: []string{ + "owner", + "repo", + "pull_number", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _updatepullrequestinputResolved, _ = _updatepullrequestinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for UpdatePullRequestInput. +// This implements mcp.SchemaProvider. +func (UpdatePullRequestInput) MCPSchema() *jsonschema.Schema { + return _updatepullrequestinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for UpdatePullRequestInput. +// This implements mcp.ResolvedSchemaProvider. +func (UpdatePullRequestInput) MCPResolvedSchema() *jsonschema.Resolved { + return _updatepullrequestinputResolved +} + +// MergePullRequestInput schema variables (generated) +var ( + _mergepullrequestinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "pull_number": { + Type: "integer", + Description: "Pull request number", + }, + "commit_title": { + Type: "string", + Description: "Title for the merge commit", + }, + "commit_message": { + Type: "string", + Description: "Message for the merge commit", + }, + "merge_method": { + Type: "string", + Description: "Merge method", + Enum: []any{"merge", "squash", "rebase"}, + }, + }, + Required: []string{ + "owner", + "repo", + "pull_number", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _mergepullrequestinputResolved, _ = _mergepullrequestinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for MergePullRequestInput. +// This implements mcp.SchemaProvider. +func (MergePullRequestInput) MCPSchema() *jsonschema.Schema { + return _mergepullrequestinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for MergePullRequestInput. +// This implements mcp.ResolvedSchemaProvider. +func (MergePullRequestInput) MCPResolvedSchema() *jsonschema.Resolved { + return _mergepullrequestinputResolved +} + +// UpdatePullRequestBranchInput schema variables (generated) +var ( + _updatepullrequestbranchinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "pull_number": { + Type: "integer", + Description: "Pull request number", + }, + "expected_head_sha": { + Type: "string", + Description: "Expected SHA of the head ref", + }, + }, + Required: []string{ + "owner", + "repo", + "pull_number", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _updatepullrequestbranchinputResolved, _ = _updatepullrequestbranchinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for UpdatePullRequestBranchInput. +// This implements mcp.SchemaProvider. +func (UpdatePullRequestBranchInput) MCPSchema() *jsonschema.Schema { + return _updatepullrequestbranchinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for UpdatePullRequestBranchInput. +// This implements mcp.ResolvedSchemaProvider. +func (UpdatePullRequestBranchInput) MCPResolvedSchema() *jsonschema.Resolved { + return _updatepullrequestbranchinputResolved +} + +// RequestCopilotReviewInput schema variables (generated) +var ( + _requestcopilotreviewinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "pull_number": { + Type: "integer", + Description: "Pull request number", + }, + }, + Required: []string{ + "owner", + "repo", + "pull_number", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _requestcopilotreviewinputResolved, _ = _requestcopilotreviewinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for RequestCopilotReviewInput. +// This implements mcp.SchemaProvider. +func (RequestCopilotReviewInput) MCPSchema() *jsonschema.Schema { + return _requestcopilotreviewinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for RequestCopilotReviewInput. +// This implements mcp.ResolvedSchemaProvider. +func (RequestCopilotReviewInput) MCPResolvedSchema() *jsonschema.Resolved { + return _requestcopilotreviewinputResolved +} + +// IssueReadInput schema variables (generated) +var ( + _issuereadinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "method": { + Type: "string", + Description: "Read operation to perform", + Enum: []any{"get", "get_comments", "get_sub_issues", "get_labels"}, + }, + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "issue_number": { + Type: "integer", + Description: "Issue number", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "method", + "owner", + "repo", + "issue_number", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _issuereadinputResolved, _ = _issuereadinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for IssueReadInput. +// This implements mcp.SchemaProvider. +func (IssueReadInput) MCPSchema() *jsonschema.Schema { + return _issuereadinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for IssueReadInput. +// This implements mcp.ResolvedSchemaProvider. +func (IssueReadInput) MCPResolvedSchema() *jsonschema.Resolved { + return _issuereadinputResolved +} + +// IssueWriteInput schema variables (generated) +var ( + _issuewriteinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "method": { + Type: "string", + Description: "Write operation to perform", + Enum: []any{"create", "update"}, + }, + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "issue_number": { + Type: "integer", + Description: "Issue number (for update)", + }, + "title": { + Type: "string", + Description: "Issue title", + }, + "body": { + Type: "string", + Description: "Issue body", + }, + "assignees": { + Type: "array", + Description: "Usernames to assign", + }, + "labels": { + Type: "array", + Description: "Labels to add", + }, + "milestone": { + Type: "integer", + Description: "Milestone number", + }, + "state": { + Type: "string", + Description: "Issue state", + Enum: []any{"open", "closed"}, + }, + "state_reason": { + Type: "string", + Description: "Reason for closing", + Enum: []any{"completed", "not_planned", "duplicate"}, + }, + }, + Required: []string{ + "method", + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _issuewriteinputResolved, _ = _issuewriteinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for IssueWriteInput. +// This implements mcp.SchemaProvider. +func (IssueWriteInput) MCPSchema() *jsonschema.Schema { + return _issuewriteinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for IssueWriteInput. +// This implements mcp.ResolvedSchemaProvider. +func (IssueWriteInput) MCPResolvedSchema() *jsonschema.Resolved { + return _issuewriteinputResolved +} + +// ListIssuesInput schema variables (generated) +var ( + _listissuesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "state": { + Type: "string", + Description: "Filter by state", + Enum: []any{"OPEN", "CLOSED"}, + }, + "labels": { + Type: "array", + Description: "Filter by labels", + }, + "orderBy": { + Type: "string", + Description: "Order by field", + Enum: []any{"CREATED_AT", "UPDATED_AT", "COMMENTS"}, + }, + "direction": { + Type: "string", + Description: "Order direction", + Enum: []any{"ASC", "DESC"}, + }, + "since": { + Type: "string", + Description: "Filter by date (ISO 8601 timestamp)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + "after": { + Type: "string", + Description: "Cursor for pagination", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listissuesinputResolved, _ = _listissuesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListIssuesInput. +// This implements mcp.SchemaProvider. +func (ListIssuesInput) MCPSchema() *jsonschema.Schema { + return _listissuesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListIssuesInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListIssuesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listissuesinputResolved +} + +// ListIssueTypesInput schema variables (generated) +var ( + _listissuetypesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Organization owner", + }, + }, + Required: []string{ + "owner", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listissuetypesinputResolved, _ = _listissuetypesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListIssueTypesInput. +// This implements mcp.SchemaProvider. +func (ListIssueTypesInput) MCPSchema() *jsonschema.Schema { + return _listissuetypesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListIssueTypesInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListIssueTypesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listissuetypesinputResolved +} + +// AddIssueCommentInput schema variables (generated) +var ( + _addissuecommentinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "issue_number": { + Type: "integer", + Description: "Issue number", + }, + "body": { + Type: "string", + Description: "Comment body", + }, + }, + Required: []string{ + "owner", + "repo", + "issue_number", + "body", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _addissuecommentinputResolved, _ = _addissuecommentinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for AddIssueCommentInput. +// This implements mcp.SchemaProvider. +func (AddIssueCommentInput) MCPSchema() *jsonschema.Schema { + return _addissuecommentinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for AddIssueCommentInput. +// This implements mcp.ResolvedSchemaProvider. +func (AddIssueCommentInput) MCPResolvedSchema() *jsonschema.Resolved { + return _addissuecommentinputResolved +} + +// StarRepositoryInput schema variables (generated) +var ( + _starrepositoryinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _starrepositoryinputResolved, _ = _starrepositoryinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for StarRepositoryInput. +// This implements mcp.SchemaProvider. +func (StarRepositoryInput) MCPSchema() *jsonschema.Schema { + return _starrepositoryinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for StarRepositoryInput. +// This implements mcp.ResolvedSchemaProvider. +func (StarRepositoryInput) MCPResolvedSchema() *jsonschema.Resolved { + return _starrepositoryinputResolved +} + +// UnstarRepositoryInput schema variables (generated) +var ( + _unstarrepositoryinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _unstarrepositoryinputResolved, _ = _unstarrepositoryinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for UnstarRepositoryInput. +// This implements mcp.SchemaProvider. +func (UnstarRepositoryInput) MCPSchema() *jsonschema.Schema { + return _unstarrepositoryinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for UnstarRepositoryInput. +// This implements mcp.ResolvedSchemaProvider. +func (UnstarRepositoryInput) MCPResolvedSchema() *jsonschema.Resolved { + return _unstarrepositoryinputResolved +} + +// ListStarredRepositoriesInput schema variables (generated) +var ( + _liststarredrepositoriesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "username": { + Type: "string", + Description: "GitHub username (defaults to authenticated user)", + }, + "sort": { + Type: "string", + Description: "Sort by", + Enum: []any{"created", "updated"}, + }, + "order": { + Type: "string", + Description: "Sort direction", + Enum: []any{"asc", "desc"}, + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{}, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _liststarredrepositoriesinputResolved, _ = _liststarredrepositoriesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListStarredRepositoriesInput. +// This implements mcp.SchemaProvider. +func (ListStarredRepositoriesInput) MCPSchema() *jsonschema.Schema { + return _liststarredrepositoriesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListStarredRepositoriesInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListStarredRepositoriesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _liststarredrepositoriesinputResolved +} + +// ListCodeScanningAlertsInput schema variables (generated) +var ( + _listcodescanningalertsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "ref": { + Type: "string", + Description: "Git ref to filter results", + }, + "state": { + Type: "string", + Description: "Filter by state", + Enum: []any{"open", "closed", "dismissed", "fixed"}, + }, + "severity": { + Type: "string", + Description: "Filter by severity", + Enum: []any{"critical", "high", "medium", "low", "warning", "note", "error"}, + }, + "tool_name": { + Type: "string", + Description: "Filter by tool name", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listcodescanningalertsinputResolved, _ = _listcodescanningalertsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListCodeScanningAlertsInput. +// This implements mcp.SchemaProvider. +func (ListCodeScanningAlertsInput) MCPSchema() *jsonschema.Schema { + return _listcodescanningalertsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListCodeScanningAlertsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListCodeScanningAlertsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listcodescanningalertsinputResolved +} + +// GetCodeScanningAlertInput schema variables (generated) +var ( + _getcodescanningalertinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "alertNumber": { + Type: "integer", + Description: "Alert number", + }, + }, + Required: []string{ + "owner", + "repo", + "alertNumber", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getcodescanningalertinputResolved, _ = _getcodescanningalertinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetCodeScanningAlertInput. +// This implements mcp.SchemaProvider. +func (GetCodeScanningAlertInput) MCPSchema() *jsonschema.Schema { + return _getcodescanningalertinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetCodeScanningAlertInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetCodeScanningAlertInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getcodescanningalertinputResolved +} + +// ListSecretScanningAlertsInput schema variables (generated) +var ( + _listsecretscanningalertsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "state": { + Type: "string", + Description: "Filter by state", + Enum: []any{"open", "resolved"}, + }, + "secret_type": { + Type: "string", + Description: "Filter by secret type", + }, + "resolution": { + Type: "string", + Description: "Filter by resolution", + Enum: []any{"false_positive", "wont_fix", "revoked", "pattern_edited", "pattern_deleted", "used_in_tests"}, + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listsecretscanningalertsinputResolved, _ = _listsecretscanningalertsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListSecretScanningAlertsInput. +// This implements mcp.SchemaProvider. +func (ListSecretScanningAlertsInput) MCPSchema() *jsonschema.Schema { + return _listsecretscanningalertsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListSecretScanningAlertsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListSecretScanningAlertsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listsecretscanningalertsinputResolved +} + +// GetSecretScanningAlertInput schema variables (generated) +var ( + _getsecretscanningalertinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "alertNumber": { + Type: "integer", + Description: "Alert number", + }, + }, + Required: []string{ + "owner", + "repo", + "alertNumber", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getsecretscanningalertinputResolved, _ = _getsecretscanningalertinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetSecretScanningAlertInput. +// This implements mcp.SchemaProvider. +func (GetSecretScanningAlertInput) MCPSchema() *jsonschema.Schema { + return _getsecretscanningalertinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetSecretScanningAlertInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetSecretScanningAlertInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getsecretscanningalertinputResolved +} + +// ListDependabotAlertsInput schema variables (generated) +var ( + _listdependabotalertsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "state": { + Type: "string", + Description: "Filter by state", + Enum: []any{"auto_dismissed", "dismissed", "fixed", "open"}, + }, + "severity": { + Type: "string", + Description: "Filter by severity", + Enum: []any{"low", "medium", "high", "critical"}, + }, + "page": { + Type: "integer", + Description: "Page number for pagination", + }, + "perPage": { + Type: "integer", + Description: "Results per page", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listdependabotalertsinputResolved, _ = _listdependabotalertsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListDependabotAlertsInput. +// This implements mcp.SchemaProvider. +func (ListDependabotAlertsInput) MCPSchema() *jsonschema.Schema { + return _listdependabotalertsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListDependabotAlertsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListDependabotAlertsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listdependabotalertsinputResolved +} + +// GetDependabotAlertInput schema variables (generated) +var ( + _getdependabotalertinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "alert_number": { + Type: "integer", + Description: "Alert number", + }, + }, + Required: []string{ + "owner", + "repo", + "alert_number", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getdependabotalertinputResolved, _ = _getdependabotalertinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetDependabotAlertInput. +// This implements mcp.SchemaProvider. +func (GetDependabotAlertInput) MCPSchema() *jsonschema.Schema { + return _getdependabotalertinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetDependabotAlertInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetDependabotAlertInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getdependabotalertinputResolved +} + +// GetLatestReleaseInput schema variables (generated) +var ( + _getlatestreleaseinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getlatestreleaseinputResolved, _ = _getlatestreleaseinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetLatestReleaseInput. +// This implements mcp.SchemaProvider. +func (GetLatestReleaseInput) MCPSchema() *jsonschema.Schema { + return _getlatestreleaseinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetLatestReleaseInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetLatestReleaseInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getlatestreleaseinputResolved +} + +// GetTagInput schema variables (generated) +var ( + _gettaginputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "tag": { + Type: "string", + Description: "Tag name", + }, + }, + Required: []string{ + "owner", + "repo", + "tag", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _gettaginputResolved, _ = _gettaginputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetTagInput. +// This implements mcp.SchemaProvider. +func (GetTagInput) MCPSchema() *jsonschema.Schema { + return _gettaginputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetTagInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetTagInput) MCPResolvedSchema() *jsonschema.Resolved { + return _gettaginputResolved +} + +// ListWorkflowJobsInput schema variables (generated) +var ( + _listworkflowjobsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "run_id": { + Type: "integer", + Description: "Workflow run ID", + }, + "filter": { + Type: "string", + Description: "Filter jobs", + Enum: []any{"latest", "all"}, + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "owner", + "repo", + "run_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listworkflowjobsinputResolved, _ = _listworkflowjobsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListWorkflowJobsInput. +// This implements mcp.SchemaProvider. +func (ListWorkflowJobsInput) MCPSchema() *jsonschema.Schema { + return _listworkflowjobsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListWorkflowJobsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListWorkflowJobsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listworkflowjobsinputResolved +} + +// GetJobLogsInput schema variables (generated) +var ( + _getjoblogsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "job_id": { + Type: "integer", + Description: "Job ID for single job logs", + }, + "run_id": { + Type: "integer", + Description: "Run ID for failed jobs logs", + }, + "failed_only": { + Type: "boolean", + Description: "Get logs for failed jobs only", + }, + "return_content": { + Type: "boolean", + Description: "Return actual log content instead of URLs", + }, + "tail_lines": { + Type: "integer", + Description: "Number of lines from end of log", + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getjoblogsinputResolved, _ = _getjoblogsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetJobLogsInput. +// This implements mcp.SchemaProvider. +func (GetJobLogsInput) MCPSchema() *jsonschema.Schema { + return _getjoblogsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetJobLogsInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetJobLogsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getjoblogsinputResolved +} + +// GetWorkflowRunLogsInput schema variables (generated) +var ( + _getworkflowrunlogsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "run_id": { + Type: "integer", + Description: "Workflow run ID", + }, + }, + Required: []string{ + "owner", + "repo", + "run_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getworkflowrunlogsinputResolved, _ = _getworkflowrunlogsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetWorkflowRunLogsInput. +// This implements mcp.SchemaProvider. +func (GetWorkflowRunLogsInput) MCPSchema() *jsonschema.Schema { + return _getworkflowrunlogsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetWorkflowRunLogsInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetWorkflowRunLogsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getworkflowrunlogsinputResolved +} + +// GetWorkflowRunUsageInput schema variables (generated) +var ( + _getworkflowrunusageinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "run_id": { + Type: "integer", + Description: "Workflow run ID", + }, + }, + Required: []string{ + "owner", + "repo", + "run_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getworkflowrunusageinputResolved, _ = _getworkflowrunusageinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetWorkflowRunUsageInput. +// This implements mcp.SchemaProvider. +func (GetWorkflowRunUsageInput) MCPSchema() *jsonschema.Schema { + return _getworkflowrunusageinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetWorkflowRunUsageInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetWorkflowRunUsageInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getworkflowrunusageinputResolved +} + +// ListWorkflowRunArtifactsInput schema variables (generated) +var ( + _listworkflowrunartifactsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "run_id": { + Type: "integer", + Description: "Workflow run ID", + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "owner", + "repo", + "run_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listworkflowrunartifactsinputResolved, _ = _listworkflowrunartifactsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListWorkflowRunArtifactsInput. +// This implements mcp.SchemaProvider. +func (ListWorkflowRunArtifactsInput) MCPSchema() *jsonschema.Schema { + return _listworkflowrunartifactsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListWorkflowRunArtifactsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListWorkflowRunArtifactsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listworkflowrunartifactsinputResolved +} + +// DownloadWorkflowRunArtifactInput schema variables (generated) +var ( + _downloadworkflowrunartifactinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "artifact_id": { + Type: "integer", + Description: "Artifact ID", + }, + }, + Required: []string{ + "owner", + "repo", + "artifact_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _downloadworkflowrunartifactinputResolved, _ = _downloadworkflowrunartifactinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for DownloadWorkflowRunArtifactInput. +// This implements mcp.SchemaProvider. +func (DownloadWorkflowRunArtifactInput) MCPSchema() *jsonschema.Schema { + return _downloadworkflowrunartifactinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for DownloadWorkflowRunArtifactInput. +// This implements mcp.ResolvedSchemaProvider. +func (DownloadWorkflowRunArtifactInput) MCPResolvedSchema() *jsonschema.Resolved { + return _downloadworkflowrunartifactinputResolved +} + +// CancelWorkflowRunInput schema variables (generated) +var ( + _cancelworkflowruninputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "run_id": { + Type: "integer", + Description: "Workflow run ID", + }, + }, + Required: []string{ + "owner", + "repo", + "run_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _cancelworkflowruninputResolved, _ = _cancelworkflowruninputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for CancelWorkflowRunInput. +// This implements mcp.SchemaProvider. +func (CancelWorkflowRunInput) MCPSchema() *jsonschema.Schema { + return _cancelworkflowruninputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for CancelWorkflowRunInput. +// This implements mcp.ResolvedSchemaProvider. +func (CancelWorkflowRunInput) MCPResolvedSchema() *jsonschema.Resolved { + return _cancelworkflowruninputResolved +} + +// RerunWorkflowRunInput schema variables (generated) +var ( + _rerunworkflowruninputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "run_id": { + Type: "integer", + Description: "Workflow run ID", + }, + }, + Required: []string{ + "owner", + "repo", + "run_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _rerunworkflowruninputResolved, _ = _rerunworkflowruninputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for RerunWorkflowRunInput. +// This implements mcp.SchemaProvider. +func (RerunWorkflowRunInput) MCPSchema() *jsonschema.Schema { + return _rerunworkflowruninputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for RerunWorkflowRunInput. +// This implements mcp.ResolvedSchemaProvider. +func (RerunWorkflowRunInput) MCPResolvedSchema() *jsonschema.Resolved { + return _rerunworkflowruninputResolved +} + +// RerunFailedJobsInput schema variables (generated) +var ( + _rerunfailedjobsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "run_id": { + Type: "integer", + Description: "Workflow run ID", + }, + }, + Required: []string{ + "owner", + "repo", + "run_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _rerunfailedjobsinputResolved, _ = _rerunfailedjobsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for RerunFailedJobsInput. +// This implements mcp.SchemaProvider. +func (RerunFailedJobsInput) MCPSchema() *jsonschema.Schema { + return _rerunfailedjobsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for RerunFailedJobsInput. +// This implements mcp.ResolvedSchemaProvider. +func (RerunFailedJobsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _rerunfailedjobsinputResolved +} + +// DeleteWorkflowRunLogsInput schema variables (generated) +var ( + _deleteworkflowrunlogsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "run_id": { + Type: "integer", + Description: "Workflow run ID", + }, + }, + Required: []string{ + "owner", + "repo", + "run_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _deleteworkflowrunlogsinputResolved, _ = _deleteworkflowrunlogsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for DeleteWorkflowRunLogsInput. +// This implements mcp.SchemaProvider. +func (DeleteWorkflowRunLogsInput) MCPSchema() *jsonschema.Schema { + return _deleteworkflowrunlogsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for DeleteWorkflowRunLogsInput. +// This implements mcp.ResolvedSchemaProvider. +func (DeleteWorkflowRunLogsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _deleteworkflowrunlogsinputResolved +} + +// RunWorkflowInput schema variables (generated) +var ( + _runworkflowinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "workflow_id": { + Type: "string", + Description: "Workflow ID or filename", + }, + "ref": { + Type: "string", + Description: "Git ref to run workflow from", + }, + "inputs": { + Type: "object", + Description: "Workflow inputs", + }, + }, + Required: []string{ + "owner", + "repo", + "workflow_id", + "ref", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _runworkflowinputResolved, _ = _runworkflowinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for RunWorkflowInput. +// This implements mcp.SchemaProvider. +func (RunWorkflowInput) MCPSchema() *jsonschema.Schema { + return _runworkflowinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for RunWorkflowInput. +// This implements mcp.ResolvedSchemaProvider. +func (RunWorkflowInput) MCPResolvedSchema() *jsonschema.Resolved { + return _runworkflowinputResolved +} + +// GetNotificationDetailsInput schema variables (generated) +var ( + _getnotificationdetailsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "notification_id": { + Type: "string", + Description: "Notification thread ID", + }, + }, + Required: []string{ + "notification_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getnotificationdetailsinputResolved, _ = _getnotificationdetailsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetNotificationDetailsInput. +// This implements mcp.SchemaProvider. +func (GetNotificationDetailsInput) MCPSchema() *jsonschema.Schema { + return _getnotificationdetailsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetNotificationDetailsInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetNotificationDetailsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getnotificationdetailsinputResolved +} + +// ManageNotificationSubscriptionInput schema variables (generated) +var ( + _managenotificationsubscriptioninputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "notification_id": { + Type: "string", + Description: "Notification thread ID", + }, + "action": { + Type: "string", + Description: "Action to perform", + Enum: []any{"get", "set", "delete"}, + }, + "ignored": { + Type: "boolean", + Description: "Whether to ignore notifications", + }, + }, + Required: []string{ + "notification_id", + "action", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _managenotificationsubscriptioninputResolved, _ = _managenotificationsubscriptioninputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ManageNotificationSubscriptionInput. +// This implements mcp.SchemaProvider. +func (ManageNotificationSubscriptionInput) MCPSchema() *jsonschema.Schema { + return _managenotificationsubscriptioninputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ManageNotificationSubscriptionInput. +// This implements mcp.ResolvedSchemaProvider. +func (ManageNotificationSubscriptionInput) MCPResolvedSchema() *jsonschema.Resolved { + return _managenotificationsubscriptioninputResolved +} + +// ManageRepositoryNotificationSubscriptionInput schema variables (generated) +var ( + _managerepositorynotificationsubscriptioninputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "action": { + Type: "string", + Description: "Action to perform", + Enum: []any{"get", "set", "delete"}, + }, + "ignored": { + Type: "boolean", + Description: "Whether to ignore notifications", + }, + }, + Required: []string{ + "owner", + "repo", + "action", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _managerepositorynotificationsubscriptioninputResolved, _ = _managerepositorynotificationsubscriptioninputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ManageRepositoryNotificationSubscriptionInput. +// This implements mcp.SchemaProvider. +func (ManageRepositoryNotificationSubscriptionInput) MCPSchema() *jsonschema.Schema { + return _managerepositorynotificationsubscriptioninputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ManageRepositoryNotificationSubscriptionInput. +// This implements mcp.ResolvedSchemaProvider. +func (ManageRepositoryNotificationSubscriptionInput) MCPResolvedSchema() *jsonschema.Resolved { + return _managerepositorynotificationsubscriptioninputResolved +} + +// MarkAllNotificationsReadInput schema variables (generated) +var ( + _markallnotificationsreadinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "last_read_at": { + Type: "string", + Description: "Timestamp of last read notification (ISO 8601)", + }, + "read": { + Type: "boolean", + Description: "Whether to mark as read", + }, + "owner": { + Type: "string", + Description: "Repository owner (for repo-specific marking)", + }, + "repo": { + Type: "string", + Description: "Repository name (for repo-specific marking)", + }, + }, + Required: []string{}, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _markallnotificationsreadinputResolved, _ = _markallnotificationsreadinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for MarkAllNotificationsReadInput. +// This implements mcp.SchemaProvider. +func (MarkAllNotificationsReadInput) MCPSchema() *jsonschema.Schema { + return _markallnotificationsreadinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for MarkAllNotificationsReadInput. +// This implements mcp.ResolvedSchemaProvider. +func (MarkAllNotificationsReadInput) MCPResolvedSchema() *jsonschema.Resolved { + return _markallnotificationsreadinputResolved +} + +// DismissNotificationInput schema variables (generated) +var ( + _dismissnotificationinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "thread_id": { + Type: "string", + Description: "Notification thread ID", + }, + }, + Required: []string{ + "thread_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _dismissnotificationinputResolved, _ = _dismissnotificationinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for DismissNotificationInput. +// This implements mcp.SchemaProvider. +func (DismissNotificationInput) MCPSchema() *jsonschema.Schema { + return _dismissnotificationinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for DismissNotificationInput. +// This implements mcp.ResolvedSchemaProvider. +func (DismissNotificationInput) MCPResolvedSchema() *jsonschema.Resolved { + return _dismissnotificationinputResolved +} + +// GetTeamsInput schema variables (generated) +var ( + _getteamsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "org": { + Type: "string", + Description: "Organization name", + }, + "page": { + Type: "integer", + Description: "Page number for pagination", + }, + "perPage": { + Type: "integer", + Description: "Results per page", + }, + }, + Required: []string{ + "org", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getteamsinputResolved, _ = _getteamsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetTeamsInput. +// This implements mcp.SchemaProvider. +func (GetTeamsInput) MCPSchema() *jsonschema.Schema { + return _getteamsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetTeamsInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetTeamsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getteamsinputResolved +} + +// GetTeamMembersInput schema variables (generated) +var ( + _getteammembersinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "org": { + Type: "string", + Description: "Organization name", + }, + "team_slug": { + Type: "string", + Description: "Team slug", + }, + "role": { + Type: "string", + Description: "Filter by role", + Enum: []any{"member", "maintainer", "all"}, + }, + "page": { + Type: "integer", + Description: "Page number for pagination", + }, + "perPage": { + Type: "integer", + Description: "Results per page", + }, + }, + Required: []string{ + "org", + "team_slug", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getteammembersinputResolved, _ = _getteammembersinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetTeamMembersInput. +// This implements mcp.SchemaProvider. +func (GetTeamMembersInput) MCPSchema() *jsonschema.Schema { + return _getteammembersinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetTeamMembersInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetTeamMembersInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getteammembersinputResolved +} + +// DeleteFileInput schema variables (generated) +var ( + _deletefileinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "path": { + Type: "string", + Description: "Path to the file to delete", + }, + "message": { + Type: "string", + Description: "Commit message", + }, + "branch": { + Type: "string", + Description: "Branch containing the file", + }, + "sha": { + Type: "string", + Description: "SHA of the file being deleted", + }, + }, + Required: []string{ + "owner", + "repo", + "path", + "message", + "branch", + "sha", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _deletefileinputResolved, _ = _deletefileinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for DeleteFileInput. +// This implements mcp.SchemaProvider. +func (DeleteFileInput) MCPSchema() *jsonschema.Schema { + return _deletefileinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for DeleteFileInput. +// This implements mcp.ResolvedSchemaProvider. +func (DeleteFileInput) MCPResolvedSchema() *jsonschema.Resolved { + return _deletefileinputResolved +} + +// SearchOrgsInput schema variables (generated) +var ( + _searchorgsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "query": { + Type: "string", + Description: "Organization search query using GitHub search syntax", + }, + "sort": { + Type: "string", + Description: "Sort field", + Enum: []any{"followers", "repositories", "joined"}, + }, + "order": { + Type: "string", + Description: "Sort order", + Enum: []any{"asc", "desc"}, + }, + "page": { + Type: "integer", + Description: "Page number for pagination (min 1)", + }, + "perPage": { + Type: "integer", + Description: "Results per page for pagination (min 1 and max 100)", + }, + }, + Required: []string{ + "query", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _searchorgsinputResolved, _ = _searchorgsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for SearchOrgsInput. +// This implements mcp.SchemaProvider. +func (SearchOrgsInput) MCPSchema() *jsonschema.Schema { + return _searchorgsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for SearchOrgsInput. +// This implements mcp.ResolvedSchemaProvider. +func (SearchOrgsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _searchorgsinputResolved +} + +// SubIssueWriteInput schema variables (generated) +var ( + _subissuewriteinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "method": { + Type: "string", + Description: "Action to perform (add/remove/reprioritize)", + }, + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "issue_number": { + Type: "integer", + Description: "The number of the parent issue", + }, + "sub_issue_id": { + Type: "integer", + Description: "The ID of the sub-issue (not the issue number)", + }, + "replace_parent": { + Type: "boolean", + Description: "Replace the sub-issue's current parent (add method only)", + }, + "after_id": { + Type: "integer", + Description: "Sub-issue ID to prioritize after", + }, + "before_id": { + Type: "integer", + Description: "Sub-issue ID to prioritize before", + }, + }, + Required: []string{ + "method", + "owner", + "repo", + "issue_number", + "sub_issue_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _subissuewriteinputResolved, _ = _subissuewriteinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for SubIssueWriteInput. +// This implements mcp.SchemaProvider. +func (SubIssueWriteInput) MCPSchema() *jsonschema.Schema { + return _subissuewriteinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for SubIssueWriteInput. +// This implements mcp.ResolvedSchemaProvider. +func (SubIssueWriteInput) MCPResolvedSchema() *jsonschema.Resolved { + return _subissuewriteinputResolved +} + +// LabelWriteInput schema variables (generated) +var ( + _labelwriteinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "method": { + Type: "string", + Description: "Operation to perform", + Enum: []any{"create", "update", "delete"}, + }, + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "name": { + Type: "string", + Description: "Label name", + }, + "new_name": { + Type: "string", + Description: "New name for the label (update only)", + }, + "color": { + Type: "string", + Description: "Label color as 6-character hex code without # prefix", + }, + "description": { + Type: "string", + Description: "Label description", + }, + }, + Required: []string{ + "method", + "owner", + "repo", + "name", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _labelwriteinputResolved, _ = _labelwriteinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for LabelWriteInput. +// This implements mcp.SchemaProvider. +func (LabelWriteInput) MCPSchema() *jsonschema.Schema { + return _labelwriteinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for LabelWriteInput. +// This implements mcp.ResolvedSchemaProvider. +func (LabelWriteInput) MCPResolvedSchema() *jsonschema.Resolved { + return _labelwriteinputResolved +} + +// PullRequestReviewWriteInput schema variables (generated) +var ( + _pullrequestreviewwriteinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "method": { + Type: "string", + Description: "Write operation to perform", + Enum: []any{"create", "submit_pending", "delete_pending"}, + }, + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "pullNumber": { + Type: "integer", + Description: "Pull request number", + }, + "body": { + Type: "string", + Description: "Review comment text", + }, + "event": { + Type: "string", + Description: "Review action to perform", + Enum: []any{"APPROVE", "REQUEST_CHANGES", "COMMENT"}, + }, + "commitID": { + Type: "string", + Description: "SHA of commit to review", + }, + }, + Required: []string{ + "method", + "owner", + "repo", + "pullNumber", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _pullrequestreviewwriteinputResolved, _ = _pullrequestreviewwriteinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for PullRequestReviewWriteInput. +// This implements mcp.SchemaProvider. +func (PullRequestReviewWriteInput) MCPSchema() *jsonschema.Schema { + return _pullrequestreviewwriteinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for PullRequestReviewWriteInput. +// This implements mcp.ResolvedSchemaProvider. +func (PullRequestReviewWriteInput) MCPResolvedSchema() *jsonschema.Resolved { + return _pullrequestreviewwriteinputResolved +} + +// AddCommentToPendingReviewInput schema variables (generated) +var ( + _addcommenttopendingreviewinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "pullNumber": { + Type: "integer", + Description: "Pull request number", + }, + "path": { + Type: "string", + Description: "Relative path to the file that necessitates a comment", + }, + "body": { + Type: "string", + Description: "The text of the review comment", + }, + "subjectType": { + Type: "string", + Description: "The level at which the comment is targeted", + Enum: []any{"FILE", "LINE"}, + }, + "line": { + Type: "integer", + Description: "Line of the blob in the PR diff (for multi-line - last line of range)", + }, + "side": { + Type: "string", + Description: "Side of the diff to comment on", + Enum: []any{"LEFT", "RIGHT"}, + }, + "startLine": { + Type: "integer", + Description: "For multi-line comments - first line of range", + }, + "startSide": { + Type: "string", + Description: "For multi-line comments - starting side", + Enum: []any{"LEFT", "RIGHT"}, + }, + }, + Required: []string{ + "owner", + "repo", + "pullNumber", + "path", + "body", + "subjectType", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _addcommenttopendingreviewinputResolved, _ = _addcommenttopendingreviewinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for AddCommentToPendingReviewInput. +// This implements mcp.SchemaProvider. +func (AddCommentToPendingReviewInput) MCPSchema() *jsonschema.Schema { + return _addcommenttopendingreviewinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for AddCommentToPendingReviewInput. +// This implements mcp.ResolvedSchemaProvider. +func (AddCommentToPendingReviewInput) MCPResolvedSchema() *jsonschema.Resolved { + return _addcommenttopendingreviewinputResolved +} + +// AssignCopilotToIssueInput schema variables (generated) +var ( + _assigncopilottoissueinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "issueNumber": { + Type: "integer", + Description: "Issue number", + }, + }, + Required: []string{ + "owner", + "repo", + "issueNumber", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _assigncopilottoissueinputResolved, _ = _assigncopilottoissueinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for AssignCopilotToIssueInput. +// This implements mcp.SchemaProvider. +func (AssignCopilotToIssueInput) MCPSchema() *jsonschema.Schema { + return _assigncopilottoissueinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for AssignCopilotToIssueInput. +// This implements mcp.ResolvedSchemaProvider. +func (AssignCopilotToIssueInput) MCPResolvedSchema() *jsonschema.Resolved { + return _assigncopilottoissueinputResolved +} + +// ListProjectFieldsInput schema variables (generated) +var ( + _listprojectfieldsinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner_type": { + Type: "string", + Description: "Owner type", + Enum: []any{"user", "org"}, + }, + "owner": { + Type: "string", + Description: "Owner name", + }, + "project_number": { + Type: "integer", + Description: "Project number", + }, + "per_page": { + Type: "integer", + Description: "Results per page", + }, + "after": { + Type: "string", + Description: "Forward pagination cursor", + }, + "before": { + Type: "string", + Description: "Backward pagination cursor", + }, + }, + Required: []string{ + "owner_type", + "owner", + "project_number", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listprojectfieldsinputResolved, _ = _listprojectfieldsinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListProjectFieldsInput. +// This implements mcp.SchemaProvider. +func (ListProjectFieldsInput) MCPSchema() *jsonschema.Schema { + return _listprojectfieldsinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListProjectFieldsInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListProjectFieldsInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listprojectfieldsinputResolved +} + +// GetProjectFieldInput schema variables (generated) +var ( + _getprojectfieldinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner_type": { + Type: "string", + Description: "Owner type", + Enum: []any{"user", "org"}, + }, + "owner": { + Type: "string", + Description: "Owner name", + }, + "project_number": { + Type: "integer", + Description: "Project number", + }, + "field_id": { + Type: "integer", + Description: "Field ID", + }, + }, + Required: []string{ + "owner_type", + "owner", + "project_number", + "field_id", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getprojectfieldinputResolved, _ = _getprojectfieldinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetProjectFieldInput. +// This implements mcp.SchemaProvider. +func (GetProjectFieldInput) MCPSchema() *jsonschema.Schema { + return _getprojectfieldinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetProjectFieldInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetProjectFieldInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getprojectfieldinputResolved +} + +// ListGlobalSecurityAdvisoriesInput schema variables (generated) +var ( + _listglobalsecurityadvisoriesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "ghsaId": { + Type: "string", + Description: "Filter by GitHub Security Advisory ID", + }, + "type": { + Type: "string", + Description: "Advisory type", + Enum: []any{"reviewed", "malware", "unreviewed"}, + }, + "cveId": { + Type: "string", + Description: "Filter by CVE ID", + }, + "ecosystem": { + Type: "string", + Description: "Filter by package ecosystem", + Enum: []any{"actions", "composer", "erlang", "go", "maven", "npm", "nuget", "other", "pip", "pub", "rubygems", "rust"}, + }, + "severity": { + Type: "string", + Description: "Filter by severity", + Enum: []any{"unknown", "low", "medium", "high", "critical"}, + }, + "cwes": { + Type: "array", + Description: "Filter by Common Weakness Enumeration IDs", + }, + "isWithdrawn": { + Type: "boolean", + Description: "Whether to only return withdrawn advisories", + }, + "affects": { + Type: "string", + Description: "Filter by affected package or version", + }, + "published": { + Type: "string", + Description: "Filter by publish date (ISO 8601)", + }, + "updated": { + Type: "string", + Description: "Filter by update date (ISO 8601)", + }, + "modified": { + Type: "string", + Description: "Filter by publish or update date (ISO 8601)", + }, + "page": { + Type: "integer", + Description: "Page number for pagination", + }, + "perPage": { + Type: "integer", + Description: "Results per page", + }, + }, + Required: []string{}, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listglobalsecurityadvisoriesinputResolved, _ = _listglobalsecurityadvisoriesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListGlobalSecurityAdvisoriesInput. +// This implements mcp.SchemaProvider. +func (ListGlobalSecurityAdvisoriesInput) MCPSchema() *jsonschema.Schema { + return _listglobalsecurityadvisoriesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListGlobalSecurityAdvisoriesInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListGlobalSecurityAdvisoriesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listglobalsecurityadvisoriesinputResolved +} + +// GetGlobalSecurityAdvisoryInput schema variables (generated) +var ( + _getglobalsecurityadvisoryinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "ghsaId": { + Type: "string", + Description: "GitHub Security Advisory ID (GHSA-xxxx-xxxx-xxxx)", + }, + }, + Required: []string{ + "ghsaId", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _getglobalsecurityadvisoryinputResolved, _ = _getglobalsecurityadvisoryinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for GetGlobalSecurityAdvisoryInput. +// This implements mcp.SchemaProvider. +func (GetGlobalSecurityAdvisoryInput) MCPSchema() *jsonschema.Schema { + return _getglobalsecurityadvisoryinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for GetGlobalSecurityAdvisoryInput. +// This implements mcp.ResolvedSchemaProvider. +func (GetGlobalSecurityAdvisoryInput) MCPResolvedSchema() *jsonschema.Resolved { + return _getglobalsecurityadvisoryinputResolved +} + +// ListOrgRepositorySecurityAdvisoriesInput schema variables (generated) +var ( + _listorgrepositorysecurityadvisoriesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "org": { + Type: "string", + Description: "Organization name", + }, + "direction": { + Type: "string", + Description: "Sort direction", + Enum: []any{"asc", "desc"}, + }, + "sort": { + Type: "string", + Description: "Sort field", + Enum: []any{"created", "updated", "published"}, + }, + "state": { + Type: "string", + Description: "Filter by advisory state", + Enum: []any{"triage", "draft", "published", "closed"}, + }, + }, + Required: []string{ + "org", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listorgrepositorysecurityadvisoriesinputResolved, _ = _listorgrepositorysecurityadvisoriesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListOrgRepositorySecurityAdvisoriesInput. +// This implements mcp.SchemaProvider. +func (ListOrgRepositorySecurityAdvisoriesInput) MCPSchema() *jsonschema.Schema { + return _listorgrepositorysecurityadvisoriesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListOrgRepositorySecurityAdvisoriesInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListOrgRepositorySecurityAdvisoriesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listorgrepositorysecurityadvisoriesinputResolved +} + +// ListRepositorySecurityAdvisoriesInput schema variables (generated) +var ( + _listrepositorysecurityadvisoriesinputSchema = &jsonschema.Schema{ + Type: "object", + Properties: map[string]*jsonschema.Schema{ + "owner": { + Type: "string", + Description: "Repository owner", + }, + "repo": { + Type: "string", + Description: "Repository name", + }, + "direction": { + Type: "string", + Description: "Sort direction", + Enum: []any{"asc", "desc"}, + }, + "sort": { + Type: "string", + Description: "Sort field", + Enum: []any{"created", "updated", "published"}, + }, + "state": { + Type: "string", + Description: "Filter by advisory state", + Enum: []any{"triage", "draft", "published", "closed"}, + }, + }, + Required: []string{ + "owner", + "repo", + }, + AdditionalProperties: &jsonschema.Schema{Not: &jsonschema.Schema{}}, + } + _listrepositorysecurityadvisoriesinputResolved, _ = _listrepositorysecurityadvisoriesinputSchema.Resolve(nil) +) + +// MCPSchema returns the pre-computed JSON schema for ListRepositorySecurityAdvisoriesInput. +// This implements mcp.SchemaProvider. +func (ListRepositorySecurityAdvisoriesInput) MCPSchema() *jsonschema.Schema { + return _listrepositorysecurityadvisoriesinputSchema +} + +// MCPResolvedSchema returns the pre-resolved JSON schema for ListRepositorySecurityAdvisoriesInput. +// This implements mcp.ResolvedSchemaProvider. +func (ListRepositorySecurityAdvisoriesInput) MCPResolvedSchema() *jsonschema.Resolved { + return _listrepositorysecurityadvisoriesinputResolved +} diff --git a/pkg/github/repositories.go b/pkg/github/repositories.go index dbf24e8e3..18d594dee 100644 --- a/pkg/github/repositories.go +++ b/pkg/github/repositories.go @@ -222,89 +222,60 @@ func ListCommits(getClient GetClientFn, t translations.TranslationHelperFunc) (m } // ListBranches creates a tool to list branches in a GitHub repository. -func ListBranches(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) { - tool := mcp.Tool{ - Name: "list_branches", - Description: t("TOOL_LIST_BRANCHES_DESCRIPTION", "List branches in a GitHub repository"), - Annotations: &mcp.ToolAnnotations{ - Title: t("TOOL_LIST_BRANCHES_USER_TITLE", "List branches"), - ReadOnlyHint: true, +func ListBranches(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[ListBranchesInput, any]) { + return mcp.Tool{ + Name: "list_branches", + Description: t("TOOL_LIST_BRANCHES_DESCRIPTION", "List branches in a GitHub repository"), + Annotations: &mcp.ToolAnnotations{ + Title: t("TOOL_LIST_BRANCHES_USER_TITLE", "List branches"), + ReadOnlyHint: true, + }, + InputSchema: ListBranchesInput{}.MCPSchema(), }, - InputSchema: WithPagination(&jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "owner": { - Type: "string", - Description: "Repository owner", - }, - "repo": { - Type: "string", - Description: "Repository name", + func(ctx context.Context, _ *mcp.CallToolRequest, input ListBranchesInput) (*mcp.CallToolResult, any, error) { + opts := &github.BranchListOptions{ + ListOptions: github.ListOptions{ + Page: input.Page, + PerPage: input.PerPage, }, - }, - Required: []string{"owner", "repo"}, - }), - } + } - handler := mcp.ToolHandlerFor[map[string]any, any](func(ctx context.Context, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) { - owner, err := RequiredParam[string](args, "owner") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - repo, err := RequiredParam[string](args, "repo") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - pagination, err := OptionalPaginationParams(args) - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } + client, err := getClient(ctx) + if err != nil { + return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) + } - opts := &github.BranchListOptions{ - ListOptions: github.ListOptions{ - Page: pagination.Page, - PerPage: pagination.PerPage, - }, - } + branches, resp, err := client.Repositories.ListBranches(ctx, input.Owner, input.Repo, opts) + if err != nil { + return ghErrors.NewGitHubAPIErrorResponse(ctx, + "failed to list branches", + resp, + err, + ), nil, nil + } + defer func() { _ = resp.Body.Close() }() - client, err := getClient(ctx) - if err != nil { - return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) - } + if resp.StatusCode != http.StatusOK { + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, fmt.Errorf("failed to read response body: %w", err) + } + return utils.NewToolResultError(fmt.Sprintf("failed to list branches: %s", string(body))), nil, nil + } - branches, resp, err := client.Repositories.ListBranches(ctx, owner, repo, opts) - if err != nil { - return ghErrors.NewGitHubAPIErrorResponse(ctx, - "failed to list branches", - resp, - err, - ), nil, nil - } - defer func() { _ = resp.Body.Close() }() + // Convert to minimal branches + minimalBranches := make([]MinimalBranch, 0, len(branches)) + for _, branch := range branches { + minimalBranches = append(minimalBranches, convertToMinimalBranch(branch)) + } - if resp.StatusCode != http.StatusOK { - body, err := io.ReadAll(resp.Body) + r, err := json.Marshal(minimalBranches) if err != nil { - return nil, nil, fmt.Errorf("failed to read response body: %w", err) + return nil, nil, fmt.Errorf("failed to marshal response: %w", err) } - return utils.NewToolResultError(fmt.Sprintf("failed to list branches: %s", string(body))), nil, nil - } - // Convert to minimal branches - minimalBranches := make([]MinimalBranch, 0, len(branches)) - for _, branch := range branches { - minimalBranches = append(minimalBranches, convertToMinimalBranch(branch)) + return utils.NewToolResultText(string(r)), nil, nil } - - r, err := json.Marshal(minimalBranches) - if err != nil { - return nil, nil, fmt.Errorf("failed to marshal response: %w", err) - } - - return utils.NewToolResultText(string(r)), nil, nil - }) - - return tool, handler } // CreateOrUpdateFile creates a tool to create or update a file in a GitHub repository. @@ -755,95 +726,62 @@ func GetFileContents(getClient GetClientFn, getRawClient raw.GetRawClientFn, t t } // ForkRepository creates a tool to fork a repository. -func ForkRepository(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) { - tool := mcp.Tool{ - Name: "fork_repository", - Description: t("TOOL_FORK_REPOSITORY_DESCRIPTION", "Fork a GitHub repository to your account or specified organization"), - Annotations: &mcp.ToolAnnotations{ - Title: t("TOOL_FORK_REPOSITORY_USER_TITLE", "Fork repository"), - ReadOnlyHint: false, - }, - InputSchema: &jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "owner": { - Type: "string", - Description: "Repository owner", - }, - "repo": { - Type: "string", - Description: "Repository name", - }, - "organization": { - Type: "string", - Description: "Organization to fork to", - }, +func ForkRepository(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[ForkRepositoryInput, any]) { + return mcp.Tool{ + Name: "fork_repository", + Description: t("TOOL_FORK_REPOSITORY_DESCRIPTION", "Fork a GitHub repository to your account or specified organization"), + Annotations: &mcp.ToolAnnotations{ + Title: t("TOOL_FORK_REPOSITORY_USER_TITLE", "Fork repository"), + ReadOnlyHint: false, }, - Required: []string{"owner", "repo"}, + InputSchema: ForkRepositoryInput{}.MCPSchema(), }, - } + func(ctx context.Context, _ *mcp.CallToolRequest, input ForkRepositoryInput) (*mcp.CallToolResult, any, error) { + opts := &github.RepositoryCreateForkOptions{} + if input.Organization != "" { + opts.Organization = input.Organization + } - handler := mcp.ToolHandlerFor[map[string]any, any](func(ctx context.Context, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) { - owner, err := RequiredParam[string](args, "owner") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - repo, err := RequiredParam[string](args, "repo") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - org, err := OptionalParam[string](args, "organization") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } + client, err := getClient(ctx) + if err != nil { + return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) + } + forkedRepo, resp, err := client.Repositories.CreateFork(ctx, input.Owner, input.Repo, opts) + if err != nil { + // Check if it's an acceptedError. An acceptedError indicates that the update is in progress, + // and it's not a real error. + if resp != nil && resp.StatusCode == http.StatusAccepted && isAcceptedError(err) { + return utils.NewToolResultText("Fork is in progress"), nil, nil + } + return ghErrors.NewGitHubAPIErrorResponse(ctx, + "failed to fork repository", + resp, + err, + ), nil, nil + } + defer func() { _ = resp.Body.Close() }() - opts := &github.RepositoryCreateForkOptions{} - if org != "" { - opts.Organization = org - } + if resp.StatusCode != http.StatusAccepted { + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, fmt.Errorf("failed to read response body: %w", err) + } + return utils.NewToolResultError(fmt.Sprintf("failed to fork repository: %s", string(body))), nil, nil + } - client, err := getClient(ctx) - if err != nil { - return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) - } - forkedRepo, resp, err := client.Repositories.CreateFork(ctx, owner, repo, opts) - if err != nil { - // Check if it's an acceptedError. An acceptedError indicates that the update is in progress, - // and it's not a real error. - if resp != nil && resp.StatusCode == http.StatusAccepted && isAcceptedError(err) { - return utils.NewToolResultText("Fork is in progress"), nil, nil + // Return minimal response with just essential information + minimalResponse := MinimalResponse{ + ID: fmt.Sprintf("%d", forkedRepo.GetID()), + URL: forkedRepo.GetHTMLURL(), } - return ghErrors.NewGitHubAPIErrorResponse(ctx, - "failed to fork repository", - resp, - err, - ), nil, nil - } - defer func() { _ = resp.Body.Close() }() - if resp.StatusCode != http.StatusAccepted { - body, err := io.ReadAll(resp.Body) + r, err := json.Marshal(minimalResponse) if err != nil { - return nil, nil, fmt.Errorf("failed to read response body: %w", err) + return nil, nil, fmt.Errorf("failed to marshal response: %w", err) } - return utils.NewToolResultError(fmt.Sprintf("failed to fork repository: %s", string(body))), nil, nil - } - // Return minimal response with just essential information - minimalResponse := MinimalResponse{ - ID: fmt.Sprintf("%d", forkedRepo.GetID()), - URL: forkedRepo.GetHTMLURL(), + return utils.NewToolResultText(string(r)), nil, nil } - - r, err := json.Marshal(minimalResponse) - if err != nil { - return nil, nil, fmt.Errorf("failed to marshal response: %w", err) - } - - return utils.NewToolResultText(string(r)), nil, nil - }) - - return tool, handler } // DeleteFile creates a tool to delete a file in a GitHub repository. @@ -1331,81 +1269,52 @@ func PushFiles(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp } // ListTags creates a tool to list tags in a GitHub repository. -func ListTags(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) { - tool := mcp.Tool{ - Name: "list_tags", - Description: t("TOOL_LIST_TAGS_DESCRIPTION", "List git tags in a GitHub repository"), - Annotations: &mcp.ToolAnnotations{ - Title: t("TOOL_LIST_TAGS_USER_TITLE", "List tags"), - ReadOnlyHint: true, - }, - InputSchema: WithPagination(&jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "owner": { - Type: "string", - Description: "Repository owner", - }, - "repo": { - Type: "string", - Description: "Repository name", - }, +func ListTags(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[ListTagsInput, any]) { + return mcp.Tool{ + Name: "list_tags", + Description: t("TOOL_LIST_TAGS_DESCRIPTION", "List git tags in a GitHub repository"), + Annotations: &mcp.ToolAnnotations{ + Title: t("TOOL_LIST_TAGS_USER_TITLE", "List tags"), + ReadOnlyHint: true, }, - Required: []string{"owner", "repo"}, - }), - } - - handler := mcp.ToolHandlerFor[map[string]any, any](func(ctx context.Context, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) { - owner, err := RequiredParam[string](args, "owner") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - repo, err := RequiredParam[string](args, "repo") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - pagination, err := OptionalPaginationParams(args) - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } + InputSchema: ListTagsInput{}.MCPSchema(), + }, + func(ctx context.Context, _ *mcp.CallToolRequest, input ListTagsInput) (*mcp.CallToolResult, any, error) { + opts := &github.ListOptions{ + Page: input.Page, + PerPage: input.PerPage, + } - opts := &github.ListOptions{ - Page: pagination.Page, - PerPage: pagination.PerPage, - } + client, err := getClient(ctx) + if err != nil { + return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) + } - client, err := getClient(ctx) - if err != nil { - return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) - } + tags, resp, err := client.Repositories.ListTags(ctx, input.Owner, input.Repo, opts) + if err != nil { + return ghErrors.NewGitHubAPIErrorResponse(ctx, + "failed to list tags", + resp, + err, + ), nil, nil + } + defer func() { _ = resp.Body.Close() }() - tags, resp, err := client.Repositories.ListTags(ctx, owner, repo, opts) - if err != nil { - return ghErrors.NewGitHubAPIErrorResponse(ctx, - "failed to list tags", - resp, - err, - ), nil, nil - } - defer func() { _ = resp.Body.Close() }() + if resp.StatusCode != http.StatusOK { + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, fmt.Errorf("failed to read response body: %w", err) + } + return utils.NewToolResultError(fmt.Sprintf("failed to list tags: %s", string(body))), nil, nil + } - if resp.StatusCode != http.StatusOK { - body, err := io.ReadAll(resp.Body) + r, err := json.Marshal(tags) if err != nil { - return nil, nil, fmt.Errorf("failed to read response body: %w", err) + return nil, nil, fmt.Errorf("failed to marshal response: %w", err) } - return utils.NewToolResultError(fmt.Sprintf("failed to list tags: %s", string(body))), nil, nil - } - r, err := json.Marshal(tags) - if err != nil { - return nil, nil, fmt.Errorf("failed to marshal response: %w", err) + return utils.NewToolResultText(string(r)), nil, nil } - - return utils.NewToolResultText(string(r)), nil, nil - }) - - return tool, handler } // GetTag creates a tool to get details about a specific tag in a GitHub repository. @@ -1506,218 +1415,131 @@ func GetTag(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.To } // ListReleases creates a tool to list releases in a GitHub repository. -func ListReleases(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) { - tool := mcp.Tool{ - Name: "list_releases", - Description: t("TOOL_LIST_RELEASES_DESCRIPTION", "List releases in a GitHub repository"), - Annotations: &mcp.ToolAnnotations{ - Title: t("TOOL_LIST_RELEASES_USER_TITLE", "List releases"), - ReadOnlyHint: true, - }, - InputSchema: WithPagination(&jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "owner": { - Type: "string", - Description: "Repository owner", - }, - "repo": { - Type: "string", - Description: "Repository name", - }, +func ListReleases(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[ListReleasesInput, any]) { + return mcp.Tool{ + Name: "list_releases", + Description: t("TOOL_LIST_RELEASES_DESCRIPTION", "List releases in a GitHub repository"), + Annotations: &mcp.ToolAnnotations{ + Title: t("TOOL_LIST_RELEASES_USER_TITLE", "List releases"), + ReadOnlyHint: true, }, - Required: []string{"owner", "repo"}, - }), - } - - handler := mcp.ToolHandlerFor[map[string]any, any](func(ctx context.Context, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) { - owner, err := RequiredParam[string](args, "owner") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - repo, err := RequiredParam[string](args, "repo") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - pagination, err := OptionalPaginationParams(args) - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } + InputSchema: ListReleasesInput{}.MCPSchema(), + }, + func(ctx context.Context, _ *mcp.CallToolRequest, input ListReleasesInput) (*mcp.CallToolResult, any, error) { + opts := &github.ListOptions{ + Page: input.Page, + PerPage: input.PerPage, + } - opts := &github.ListOptions{ - Page: pagination.Page, - PerPage: pagination.PerPage, - } + client, err := getClient(ctx) + if err != nil { + return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) + } - client, err := getClient(ctx) - if err != nil { - return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) - } + releases, resp, err := client.Repositories.ListReleases(ctx, input.Owner, input.Repo, opts) + if err != nil { + return nil, nil, fmt.Errorf("failed to list releases: %w", err) + } + defer func() { _ = resp.Body.Close() }() - releases, resp, err := client.Repositories.ListReleases(ctx, owner, repo, opts) - if err != nil { - return nil, nil, fmt.Errorf("failed to list releases: %w", err) - } - defer func() { _ = resp.Body.Close() }() + if resp.StatusCode != http.StatusOK { + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, fmt.Errorf("failed to read response body: %w", err) + } + return utils.NewToolResultError(fmt.Sprintf("failed to list releases: %s", string(body))), nil, nil + } - if resp.StatusCode != http.StatusOK { - body, err := io.ReadAll(resp.Body) + r, err := json.Marshal(releases) if err != nil { - return nil, nil, fmt.Errorf("failed to read response body: %w", err) + return nil, nil, fmt.Errorf("failed to marshal response: %w", err) } - return utils.NewToolResultError(fmt.Sprintf("failed to list releases: %s", string(body))), nil, nil - } - r, err := json.Marshal(releases) - if err != nil { - return nil, nil, fmt.Errorf("failed to marshal response: %w", err) + return utils.NewToolResultText(string(r)), nil, nil } - - return utils.NewToolResultText(string(r)), nil, nil - }) - - return tool, handler } // GetLatestRelease creates a tool to get the latest release in a GitHub repository. -func GetLatestRelease(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) { - tool := mcp.Tool{ - Name: "get_latest_release", - Description: t("TOOL_GET_LATEST_RELEASE_DESCRIPTION", "Get the latest release in a GitHub repository"), - Annotations: &mcp.ToolAnnotations{ - Title: t("TOOL_GET_LATEST_RELEASE_USER_TITLE", "Get latest release"), - ReadOnlyHint: true, - }, - InputSchema: &jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "owner": { - Type: "string", - Description: "Repository owner", - }, - "repo": { - Type: "string", - Description: "Repository name", - }, +func GetLatestRelease(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[GetLatestReleaseInput, any]) { + return mcp.Tool{ + Name: "get_latest_release", + Description: t("TOOL_GET_LATEST_RELEASE_DESCRIPTION", "Get the latest release in a GitHub repository"), + Annotations: &mcp.ToolAnnotations{ + Title: t("TOOL_GET_LATEST_RELEASE_USER_TITLE", "Get latest release"), + ReadOnlyHint: true, }, - Required: []string{"owner", "repo"}, + InputSchema: GetLatestReleaseInput{}.MCPSchema(), }, - } - - handler := mcp.ToolHandlerFor[map[string]any, any](func(ctx context.Context, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) { - owner, err := RequiredParam[string](args, "owner") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - repo, err := RequiredParam[string](args, "repo") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } + func(ctx context.Context, _ *mcp.CallToolRequest, input GetLatestReleaseInput) (*mcp.CallToolResult, any, error) { + client, err := getClient(ctx) + if err != nil { + return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) + } - client, err := getClient(ctx) - if err != nil { - return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) - } + release, resp, err := client.Repositories.GetLatestRelease(ctx, input.Owner, input.Repo) + if err != nil { + return nil, nil, fmt.Errorf("failed to get latest release: %w", err) + } + defer func() { _ = resp.Body.Close() }() - release, resp, err := client.Repositories.GetLatestRelease(ctx, owner, repo) - if err != nil { - return nil, nil, fmt.Errorf("failed to get latest release: %w", err) - } - defer func() { _ = resp.Body.Close() }() + if resp.StatusCode != http.StatusOK { + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, fmt.Errorf("failed to read response body: %w", err) + } + return utils.NewToolResultError(fmt.Sprintf("failed to get latest release: %s", string(body))), nil, nil + } - if resp.StatusCode != http.StatusOK { - body, err := io.ReadAll(resp.Body) + r, err := json.Marshal(release) if err != nil { - return nil, nil, fmt.Errorf("failed to read response body: %w", err) + return nil, nil, fmt.Errorf("failed to marshal response: %w", err) } - return utils.NewToolResultError(fmt.Sprintf("failed to get latest release: %s", string(body))), nil, nil - } - r, err := json.Marshal(release) - if err != nil { - return nil, nil, fmt.Errorf("failed to marshal response: %w", err) + return utils.NewToolResultText(string(r)), nil, nil } - - return utils.NewToolResultText(string(r)), nil, nil - }) - - return tool, handler } -func GetReleaseByTag(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) { - tool := mcp.Tool{ - Name: "get_release_by_tag", - Description: t("TOOL_GET_RELEASE_BY_TAG_DESCRIPTION", "Get a specific release by its tag name in a GitHub repository"), - Annotations: &mcp.ToolAnnotations{ - Title: t("TOOL_GET_RELEASE_BY_TAG_USER_TITLE", "Get a release by tag name"), - ReadOnlyHint: true, - }, - InputSchema: &jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "owner": { - Type: "string", - Description: "Repository owner", - }, - "repo": { - Type: "string", - Description: "Repository name", - }, - "tag": { - Type: "string", - Description: "Tag name (e.g., 'v1.0.0')", - }, +func GetReleaseByTag(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[GetReleaseByTagInput, any]) { + return mcp.Tool{ + Name: "get_release_by_tag", + Description: t("TOOL_GET_RELEASE_BY_TAG_DESCRIPTION", "Get a specific release by its tag name in a GitHub repository"), + Annotations: &mcp.ToolAnnotations{ + Title: t("TOOL_GET_RELEASE_BY_TAG_USER_TITLE", "Get a release by tag name"), + ReadOnlyHint: true, }, - Required: []string{"owner", "repo", "tag"}, + InputSchema: GetReleaseByTagInput{}.MCPSchema(), }, - } - - handler := mcp.ToolHandlerFor[map[string]any, any](func(ctx context.Context, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) { - owner, err := RequiredParam[string](args, "owner") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - repo, err := RequiredParam[string](args, "repo") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - tag, err := RequiredParam[string](args, "tag") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } + func(ctx context.Context, _ *mcp.CallToolRequest, input GetReleaseByTagInput) (*mcp.CallToolResult, any, error) { + client, err := getClient(ctx) + if err != nil { + return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) + } - client, err := getClient(ctx) - if err != nil { - return nil, nil, fmt.Errorf("failed to get GitHub client: %w", err) - } + release, resp, err := client.Repositories.GetReleaseByTag(ctx, input.Owner, input.Repo, input.Tag) + if err != nil { + return ghErrors.NewGitHubAPIErrorResponse(ctx, + fmt.Sprintf("failed to get release by tag: %s", input.Tag), + resp, + err, + ), nil, nil + } + defer func() { _ = resp.Body.Close() }() - release, resp, err := client.Repositories.GetReleaseByTag(ctx, owner, repo, tag) - if err != nil { - return ghErrors.NewGitHubAPIErrorResponse(ctx, - fmt.Sprintf("failed to get release by tag: %s", tag), - resp, - err, - ), nil, nil - } - defer func() { _ = resp.Body.Close() }() + if resp.StatusCode != http.StatusOK { + body, err := io.ReadAll(resp.Body) + if err != nil { + return nil, nil, fmt.Errorf("failed to read response body: %w", err) + } + return utils.NewToolResultError(fmt.Sprintf("failed to get release by tag: %s", string(body))), nil, nil + } - if resp.StatusCode != http.StatusOK { - body, err := io.ReadAll(resp.Body) + r, err := json.Marshal(release) if err != nil { - return nil, nil, fmt.Errorf("failed to read response body: %w", err) + return nil, nil, fmt.Errorf("failed to marshal response: %w", err) } - return utils.NewToolResultError(fmt.Sprintf("failed to get release by tag: %s", string(body))), nil, nil - } - r, err := json.Marshal(release) - if err != nil { - return nil, nil, fmt.Errorf("failed to marshal response: %w", err) + return utils.NewToolResultText(string(r)), nil, nil } - - return utils.NewToolResultText(string(r)), nil, nil - }) - - return tool, handler } // filterPaths filters the entries in a GitHub tree to find paths that diff --git a/pkg/github/repositories_test.go b/pkg/github/repositories_test.go index 7e76d4230..aabeb1319 100644 --- a/pkg/github/repositories_test.go +++ b/pkg/github/repositories_test.go @@ -335,8 +335,9 @@ func Test_ForkRepository(t *testing.T) { tool, _ := ForkRepository(stubGetClientFn(mockClient), translations.NullTranslationHelper) require.NoError(t, toolsnaps.Test(tool.Name, tool)) - schema, ok := tool.InputSchema.(*jsonschema.Schema) - require.True(t, ok, "InputSchema should be *jsonschema.Schema") + // Get schema from the input type's MCPSchema() method + schema := ForkRepositoryInput{}.MCPSchema() + require.NotNil(t, schema, "MCPSchema should return a schema") assert.Equal(t, "fork_repository", tool.Name) assert.NotEmpty(t, tool.Description) @@ -362,7 +363,7 @@ func Test_ForkRepository(t *testing.T) { tests := []struct { name string mockedClient *http.Client - requestArgs map[string]interface{} + input ForkRepositoryInput expectError bool expectedRepo *github.Repository expectedErrMsg string @@ -375,9 +376,9 @@ func Test_ForkRepository(t *testing.T) { mockResponse(t, http.StatusAccepted, mockForkedRepo), ), ), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", + input: ForkRepositoryInput{ + Owner: "owner", + Repo: "repo", }, expectError: false, expectedRepo: mockForkedRepo, @@ -393,9 +394,9 @@ func Test_ForkRepository(t *testing.T) { }), ), ), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", + input: ForkRepositoryInput{ + Owner: "owner", + Repo: "repo", }, expectError: true, expectedErrMsg: "failed to fork repository", @@ -408,11 +409,8 @@ func Test_ForkRepository(t *testing.T) { client := github.NewClient(tc.mockedClient) _, handler := ForkRepository(stubGetClientFn(client), translations.NullTranslationHelper) - // Create call request - request := createMCPRequest(tc.requestArgs) - - // Call handler - result, _, err := handler(context.Background(), &request, tc.requestArgs) + // Call handler with typed input + result, _, err := handler(context.Background(), nil, tc.input) // Verify results if tc.expectError { @@ -1694,8 +1692,9 @@ func Test_ListBranches(t *testing.T) { tool, _ := ListBranches(stubGetClientFn(mockClient), translations.NullTranslationHelper) require.NoError(t, toolsnaps.Test(tool.Name, tool)) - schema, ok := tool.InputSchema.(*jsonschema.Schema) - require.True(t, ok, "InputSchema should be *jsonschema.Schema") + // Get schema from the input type's MCPSchema() method + schema := ListBranchesInput{}.MCPSchema() + require.NotNil(t, schema, "MCPSchema should return a schema") assert.Equal(t, "list_branches", tool.Name) assert.NotEmpty(t, tool.Description) @@ -1720,17 +1719,17 @@ func Test_ListBranches(t *testing.T) { // Test cases tests := []struct { name string - args map[string]interface{} + input ListBranchesInput mockResponses []mock.MockBackendOption wantErr bool errContains string }{ { name: "success", - args: map[string]interface{}{ - "owner": "owner", - "repo": "repo", - "page": float64(2), + input: ListBranchesInput{ + Owner: "owner", + Repo: "repo", + Page: 2, }, mockResponses: []mock.MockBackendOption{ mock.WithRequestMatch( @@ -1740,24 +1739,6 @@ func Test_ListBranches(t *testing.T) { }, wantErr: false, }, - { - name: "missing owner", - args: map[string]interface{}{ - "repo": "repo", - }, - mockResponses: []mock.MockBackendOption{}, - wantErr: false, - errContains: "missing required parameter: owner", - }, - { - name: "missing repo", - args: map[string]interface{}{ - "owner": "owner", - }, - mockResponses: []mock.MockBackendOption{}, - wantErr: false, - errContains: "missing required parameter: repo", - }, } for _, tt := range tests { @@ -1766,11 +1747,8 @@ func Test_ListBranches(t *testing.T) { mockClient := github.NewClient(mock.NewMockedHTTPClient(tt.mockResponses...)) _, handler := ListBranches(stubGetClientFn(mockClient), translations.NullTranslationHelper) - // Create request - request := createMCPRequest(tt.args) - - // Call handler - result, _, err := handler(context.Background(), &request, tt.args) + // Call handler with typed input + result, _, err := handler(context.Background(), nil, tt.input) if tt.wantErr { require.Error(t, err) if tt.errContains != "" { @@ -1791,13 +1769,13 @@ func Test_ListBranches(t *testing.T) { textContent := getTextResult(t, result) require.NotEmpty(t, textContent.Text) - // Verify response - var branches []*github.Branch + // Verify response - note: we now return MinimalBranch, not full Branch + var branches []MinimalBranch err = json.Unmarshal([]byte(textContent.Text), &branches) require.NoError(t, err) assert.Len(t, branches, 2) - assert.Equal(t, "main", *branches[0].Name) - assert.Equal(t, "develop", *branches[1].Name) + assert.Equal(t, "main", branches[0].Name) + assert.Equal(t, "develop", branches[1].Name) }) } } @@ -1989,8 +1967,9 @@ func Test_ListTags(t *testing.T) { tool, _ := ListTags(stubGetClientFn(mockClient), translations.NullTranslationHelper) require.NoError(t, toolsnaps.Test(tool.Name, tool)) - schema, ok := tool.InputSchema.(*jsonschema.Schema) - require.True(t, ok, "InputSchema should be *jsonschema.Schema") + // Get schema from the input type's MCPSchema() method + schema := ListTagsInput{}.MCPSchema() + require.NotNil(t, schema, "MCPSchema should return a schema") assert.Equal(t, "list_tags", tool.Name) assert.NotEmpty(t, tool.Description) @@ -2023,7 +2002,7 @@ func Test_ListTags(t *testing.T) { tests := []struct { name string mockedClient *http.Client - requestArgs map[string]interface{} + input ListTagsInput expectError bool expectedTags []*github.RepositoryTag expectedErrMsg string @@ -2041,9 +2020,9 @@ func Test_ListTags(t *testing.T) { ), ), ), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", + input: ListTagsInput{ + Owner: "owner", + Repo: "repo", }, expectError: false, expectedTags: mockTags, @@ -2059,9 +2038,9 @@ func Test_ListTags(t *testing.T) { }), ), ), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", + input: ListTagsInput{ + Owner: "owner", + Repo: "repo", }, expectError: true, expectedErrMsg: "failed to list tags", @@ -2074,11 +2053,8 @@ func Test_ListTags(t *testing.T) { client := github.NewClient(tc.mockedClient) _, handler := ListTags(stubGetClientFn(client), translations.NullTranslationHelper) - // Create call request - request := createMCPRequest(tc.requestArgs) - - // Call handler - result, _, err := handler(context.Background(), &request, tc.requestArgs) + // Call handler with typed input + result, _, err := handler(context.Background(), nil, tc.input) // Verify results if tc.expectError { @@ -2271,8 +2247,9 @@ func Test_ListReleases(t *testing.T) { tool, _ := ListReleases(stubGetClientFn(mockClient), translations.NullTranslationHelper) require.NoError(t, toolsnaps.Test(tool.Name, tool)) - schema, ok := tool.InputSchema.(*jsonschema.Schema) - require.True(t, ok, "InputSchema should be *jsonschema.Schema") + // Get schema from the input type's MCPSchema() method + schema := ListReleasesInput{}.MCPSchema() + require.NotNil(t, schema, "MCPSchema should return a schema") assert.Equal(t, "list_releases", tool.Name) assert.NotEmpty(t, tool.Description) @@ -2296,7 +2273,7 @@ func Test_ListReleases(t *testing.T) { tests := []struct { name string mockedClient *http.Client - requestArgs map[string]interface{} + input ListReleasesInput expectError bool expectedResult []*github.RepositoryRelease expectedErrMsg string @@ -2309,9 +2286,9 @@ func Test_ListReleases(t *testing.T) { mockReleases, ), ), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", + input: ListReleasesInput{ + Owner: "owner", + Repo: "repo", }, expectError: false, expectedResult: mockReleases, @@ -2327,9 +2304,9 @@ func Test_ListReleases(t *testing.T) { }), ), ), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", + input: ListReleasesInput{ + Owner: "owner", + Repo: "repo", }, expectError: true, expectedErrMsg: "failed to list releases", @@ -2340,8 +2317,7 @@ func Test_ListReleases(t *testing.T) { t.Run(tc.name, func(t *testing.T) { client := github.NewClient(tc.mockedClient) _, handler := ListReleases(stubGetClientFn(client), translations.NullTranslationHelper) - request := createMCPRequest(tc.requestArgs) - result, _, err := handler(context.Background(), &request, tc.requestArgs) + result, _, err := handler(context.Background(), nil, tc.input) if tc.expectError { require.Error(t, err) @@ -2366,8 +2342,9 @@ func Test_GetLatestRelease(t *testing.T) { tool, _ := GetLatestRelease(stubGetClientFn(mockClient), translations.NullTranslationHelper) require.NoError(t, toolsnaps.Test(tool.Name, tool)) - schema, ok := tool.InputSchema.(*jsonschema.Schema) - require.True(t, ok, "InputSchema should be *jsonschema.Schema") + // Get schema from the input type's MCPSchema() method + schema := GetLatestReleaseInput{}.MCPSchema() + require.NotNil(t, schema, "MCPSchema should return a schema") assert.Equal(t, "get_latest_release", tool.Name) assert.NotEmpty(t, tool.Description) @@ -2384,7 +2361,7 @@ func Test_GetLatestRelease(t *testing.T) { tests := []struct { name string mockedClient *http.Client - requestArgs map[string]interface{} + input GetLatestReleaseInput expectError bool expectedResult *github.RepositoryRelease expectedErrMsg string @@ -2397,9 +2374,9 @@ func Test_GetLatestRelease(t *testing.T) { mockRelease, ), ), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", + input: GetLatestReleaseInput{ + Owner: "owner", + Repo: "repo", }, expectError: false, expectedResult: mockRelease, @@ -2415,9 +2392,9 @@ func Test_GetLatestRelease(t *testing.T) { }), ), ), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", + input: GetLatestReleaseInput{ + Owner: "owner", + Repo: "repo", }, expectError: true, expectedErrMsg: "failed to get latest release", @@ -2428,8 +2405,7 @@ func Test_GetLatestRelease(t *testing.T) { t.Run(tc.name, func(t *testing.T) { client := github.NewClient(tc.mockedClient) _, handler := GetLatestRelease(stubGetClientFn(client), translations.NullTranslationHelper) - request := createMCPRequest(tc.requestArgs) - result, _, err := handler(context.Background(), &request, tc.requestArgs) + result, _, err := handler(context.Background(), nil, tc.input) if tc.expectError { require.Error(t, err) @@ -2452,8 +2428,9 @@ func Test_GetReleaseByTag(t *testing.T) { tool, _ := GetReleaseByTag(stubGetClientFn(mockClient), translations.NullTranslationHelper) require.NoError(t, toolsnaps.Test(tool.Name, tool)) - schema, ok := tool.InputSchema.(*jsonschema.Schema) - require.True(t, ok, "InputSchema should be *jsonschema.Schema") + // Get schema from the input type's MCPSchema() method + schema := GetReleaseByTagInput{}.MCPSchema() + require.NotNil(t, schema, "MCPSchema should return a schema") assert.Equal(t, "get_release_by_tag", tool.Name) assert.NotEmpty(t, tool.Description) @@ -2478,7 +2455,7 @@ func Test_GetReleaseByTag(t *testing.T) { tests := []struct { name string mockedClient *http.Client - requestArgs map[string]interface{} + input GetReleaseByTagInput expectError bool expectedResult *github.RepositoryRelease expectedErrMsg string @@ -2491,44 +2468,14 @@ func Test_GetReleaseByTag(t *testing.T) { mockRelease, ), ), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", - "tag": "v1.0.0", + input: GetReleaseByTagInput{ + Owner: "owner", + Repo: "repo", + Tag: "v1.0.0", }, expectError: false, expectedResult: mockRelease, }, - { - name: "missing owner parameter", - mockedClient: mock.NewMockedHTTPClient(), - requestArgs: map[string]interface{}{ - "repo": "repo", - "tag": "v1.0.0", - }, - expectError: false, // Returns tool error, not Go error - expectedErrMsg: "missing required parameter: owner", - }, - { - name: "missing repo parameter", - mockedClient: mock.NewMockedHTTPClient(), - requestArgs: map[string]interface{}{ - "owner": "owner", - "tag": "v1.0.0", - }, - expectError: false, // Returns tool error, not Go error - expectedErrMsg: "missing required parameter: repo", - }, - { - name: "missing tag parameter", - mockedClient: mock.NewMockedHTTPClient(), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", - }, - expectError: false, // Returns tool error, not Go error - expectedErrMsg: "missing required parameter: tag", - }, { name: "release by tag not found", mockedClient: mock.NewMockedHTTPClient( @@ -2540,10 +2487,10 @@ func Test_GetReleaseByTag(t *testing.T) { }), ), ), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", - "tag": "v999.0.0", + input: GetReleaseByTagInput{ + Owner: "owner", + Repo: "repo", + Tag: "v999.0.0", }, expectError: false, // API errors return tool errors, not Go errors expectedErrMsg: "failed to get release by tag: v999.0.0", @@ -2559,10 +2506,10 @@ func Test_GetReleaseByTag(t *testing.T) { }), ), ), - requestArgs: map[string]interface{}{ - "owner": "owner", - "repo": "repo", - "tag": "v1.0.0", + input: GetReleaseByTagInput{ + Owner: "owner", + Repo: "repo", + Tag: "v1.0.0", }, expectError: false, // API errors return tool errors, not Go errors expectedErrMsg: "failed to get release by tag: v1.0.0", @@ -2574,9 +2521,7 @@ func Test_GetReleaseByTag(t *testing.T) { client := github.NewClient(tc.mockedClient) _, handler := GetReleaseByTag(stubGetClientFn(client), translations.NullTranslationHelper) - request := createMCPRequest(tc.requestArgs) - - result, _, err := handler(context.Background(), &request, tc.requestArgs) + result, _, err := handler(context.Background(), nil, tc.input) if tc.expectError { require.Error(t, err) diff --git a/pkg/github/search.go b/pkg/github/search.go index cffd0bf15..41972ae3d 100644 --- a/pkg/github/search.go +++ b/pkg/github/search.go @@ -11,39 +11,11 @@ import ( "github.com/github/github-mcp-server/pkg/translations" "github.com/github/github-mcp-server/pkg/utils" "github.com/google/go-github/v79/github" - "github.com/google/jsonschema-go/jsonschema" "github.com/modelcontextprotocol/go-sdk/mcp" ) // SearchRepositories creates a tool to search for GitHub repositories. -func SearchRepositories(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) { - schema := &jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "query": { - Type: "string", - Description: "Repository search query. Examples: 'machine learning in:name stars:>1000 language:python', 'topic:react', 'user:facebook'. Supports advanced search syntax for precise filtering.", - }, - "sort": { - Type: "string", - Description: "Sort repositories by field, defaults to best match", - Enum: []any{"stars", "forks", "help-wanted-issues", "updated"}, - }, - "order": { - Type: "string", - Description: "Sort order", - Enum: []any{"asc", "desc"}, - }, - "minimal_output": { - Type: "boolean", - Description: "Return minimal repository information (default: true). When false, returns full GitHub API repository objects.", - Default: json.RawMessage(`true`), - }, - }, - Required: []string{"query"}, - } - WithPagination(schema) - +func SearchRepositories(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[SearchRepositoriesInput, any]) { return mcp.Tool{ Name: "search_repositories", Description: t("TOOL_SEARCH_REPOSITORIES_DESCRIPTION", "Find GitHub repositories by name, description, readme, topics, or other metadata. Perfect for discovering projects, finding examples, or locating specific repositories across GitHub."), @@ -51,35 +23,15 @@ func SearchRepositories(getClient GetClientFn, t translations.TranslationHelperF Title: t("TOOL_SEARCH_REPOSITORIES_USER_TITLE", "Search repositories"), ReadOnlyHint: true, }, - InputSchema: schema, + InputSchema: SearchRepositoriesInput{}.MCPSchema(), }, - func(ctx context.Context, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) { - query, err := RequiredParam[string](args, "query") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - sort, err := OptionalParam[string](args, "sort") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - order, err := OptionalParam[string](args, "order") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - pagination, err := OptionalPaginationParams(args) - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - minimalOutput, err := OptionalBoolParamWithDefault(args, "minimal_output", true) - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } + func(ctx context.Context, _ *mcp.CallToolRequest, input SearchRepositoriesInput) (*mcp.CallToolResult, any, error) { opts := &github.SearchOptions{ - Sort: sort, - Order: order, + Sort: input.Sort, + Order: input.Order, ListOptions: github.ListOptions{ - Page: pagination.Page, - PerPage: pagination.PerPage, + Page: input.Page, + PerPage: input.PerPage, }, } @@ -87,10 +39,10 @@ func SearchRepositories(getClient GetClientFn, t translations.TranslationHelperF if err != nil { return utils.NewToolResultErrorFromErr("failed to get GitHub client", err), nil, nil } - result, resp, err := client.Search.Repositories(ctx, query, opts) + result, resp, err := client.Search.Repositories(ctx, input.Query, opts) if err != nil { return ghErrors.NewGitHubAPIErrorResponse(ctx, - fmt.Sprintf("failed to search repositories with query '%s'", query), + fmt.Sprintf("failed to search repositories with query '%s'", input.Query), resp, err, ), nil, nil @@ -107,7 +59,7 @@ func SearchRepositories(getClient GetClientFn, t translations.TranslationHelperF // Return either minimal or full response based on parameter var r []byte - if minimalOutput { + if input.MinimalOutput { minimalRepos := make([]MinimalRepository, 0, len(result.Repositories)) for _, repo := range result.Repositories { minimalRepo := MinimalRepository{ @@ -161,28 +113,7 @@ func SearchRepositories(getClient GetClientFn, t translations.TranslationHelperF } // SearchCode creates a tool to search for code across GitHub repositories. -func SearchCode(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) { - schema := &jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "query": { - Type: "string", - Description: "Search query using GitHub's powerful code search syntax. Examples: 'content:Skill language:Java org:github', 'NOT is:archived language:Python OR language:go', 'repo:github/github-mcp-server'. Supports exact matching, language filters, path filters, and more.", - }, - "sort": { - Type: "string", - Description: "Sort field ('indexed' only)", - }, - "order": { - Type: "string", - Description: "Sort order for results", - Enum: []any{"asc", "desc"}, - }, - }, - Required: []string{"query"}, - } - WithPagination(schema) - +func SearchCode(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[SearchCodeInput, any]) { return mcp.Tool{ Name: "search_code", Description: t("TOOL_SEARCH_CODE_DESCRIPTION", "Fast and precise code search across ALL GitHub repositories using GitHub's native search engine. Best for finding exact symbols, functions, classes, or specific code patterns."), @@ -190,32 +121,15 @@ func SearchCode(getClient GetClientFn, t translations.TranslationHelperFunc) (mc Title: t("TOOL_SEARCH_CODE_USER_TITLE", "Search code"), ReadOnlyHint: true, }, - InputSchema: schema, + InputSchema: SearchCodeInput{}.MCPSchema(), }, - func(ctx context.Context, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) { - query, err := RequiredParam[string](args, "query") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - sort, err := OptionalParam[string](args, "sort") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - order, err := OptionalParam[string](args, "order") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - pagination, err := OptionalPaginationParams(args) - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - + func(ctx context.Context, _ *mcp.CallToolRequest, input SearchCodeInput) (*mcp.CallToolResult, any, error) { opts := &github.SearchOptions{ - Sort: sort, - Order: order, + Sort: input.Sort, + Order: input.Order, ListOptions: github.ListOptions{ - PerPage: pagination.PerPage, - Page: pagination.Page, + PerPage: input.PerPage, + Page: input.Page, }, } @@ -224,10 +138,10 @@ func SearchCode(getClient GetClientFn, t translations.TranslationHelperFunc) (mc return utils.NewToolResultErrorFromErr("failed to get GitHub client", err), nil, nil } - result, resp, err := client.Search.Code(ctx, query, opts) + result, resp, err := client.Search.Code(ctx, input.Query, opts) if err != nil { return ghErrors.NewGitHubAPIErrorResponse(ctx, - fmt.Sprintf("failed to search code with query '%s'", query), + fmt.Sprintf("failed to search code with query '%s'", input.Query), resp, err, ), nil, nil @@ -251,31 +165,37 @@ func SearchCode(getClient GetClientFn, t translations.TranslationHelperFunc) (mc } } -func userOrOrgHandler(accountType string, getClient GetClientFn) mcp.ToolHandlerFor[map[string]any, any] { - return func(ctx context.Context, _ *mcp.CallToolRequest, args map[string]any) (*mcp.CallToolResult, any, error) { - query, err := RequiredParam[string](args, "query") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - sort, err := OptionalParam[string](args, "sort") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - order, err := OptionalParam[string](args, "order") - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } - pagination, err := OptionalPaginationParams(args) - if err != nil { - return utils.NewToolResultError(err.Error()), nil, nil - } +// userOrOrgSearchInput is a common interface for user/org search inputs +type userOrOrgSearchInput interface { + GetQuery() string + GetSort() string + GetOrder() string + GetPage() int + GetPerPage() int +} +// Add getters to SearchUsersInput +func (s SearchUsersInput) GetQuery() string { return s.Query } +func (s SearchUsersInput) GetSort() string { return s.Sort } +func (s SearchUsersInput) GetOrder() string { return s.Order } +func (s SearchUsersInput) GetPage() int { return s.Page } +func (s SearchUsersInput) GetPerPage() int { return s.PerPage } + +// Add getters to SearchOrgsInput +func (s SearchOrgsInput) GetQuery() string { return s.Query } +func (s SearchOrgsInput) GetSort() string { return s.Sort } +func (s SearchOrgsInput) GetOrder() string { return s.Order } +func (s SearchOrgsInput) GetPage() int { return s.Page } +func (s SearchOrgsInput) GetPerPage() int { return s.PerPage } + +func userOrOrgHandlerTyped[T userOrOrgSearchInput](accountType string, getClient GetClientFn) mcp.ToolHandlerFor[T, any] { + return func(ctx context.Context, _ *mcp.CallToolRequest, input T) (*mcp.CallToolResult, any, error) { opts := &github.SearchOptions{ - Sort: sort, - Order: order, + Sort: input.GetSort(), + Order: input.GetOrder(), ListOptions: github.ListOptions{ - PerPage: pagination.PerPage, - Page: pagination.Page, + PerPage: input.GetPerPage(), + Page: input.GetPage(), }, } @@ -284,14 +204,14 @@ func userOrOrgHandler(accountType string, getClient GetClientFn) mcp.ToolHandler return utils.NewToolResultErrorFromErr("failed to get GitHub client", err), nil, nil } - searchQuery := query - if !hasTypeFilter(query) { - searchQuery = "type:" + accountType + " " + query + searchQuery := input.GetQuery() + if !hasTypeFilter(searchQuery) { + searchQuery = "type:" + accountType + " " + searchQuery } result, resp, err := client.Search.Users(ctx, searchQuery, opts) if err != nil { return ghErrors.NewGitHubAPIErrorResponse(ctx, - fmt.Sprintf("failed to search %ss with query '%s'", accountType, query), + fmt.Sprintf("failed to search %ss with query '%s'", accountType, input.GetQuery()), resp, err, ), nil, nil @@ -340,29 +260,7 @@ func userOrOrgHandler(accountType string, getClient GetClientFn) mcp.ToolHandler } // SearchUsers creates a tool to search for GitHub users. -func SearchUsers(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) { - schema := &jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "query": { - Type: "string", - Description: "User search query. Examples: 'john smith', 'location:seattle', 'followers:>100'. Search is automatically scoped to type:user.", - }, - "sort": { - Type: "string", - Description: "Sort users by number of followers or repositories, or when the person joined GitHub.", - Enum: []any{"followers", "repositories", "joined"}, - }, - "order": { - Type: "string", - Description: "Sort order", - Enum: []any{"asc", "desc"}, - }, - }, - Required: []string{"query"}, - } - WithPagination(schema) - +func SearchUsers(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[SearchUsersInput, any]) { return mcp.Tool{ Name: "search_users", Description: t("TOOL_SEARCH_USERS_DESCRIPTION", "Find GitHub users by username, real name, or other profile information. Useful for locating developers, contributors, or team members."), @@ -370,34 +268,12 @@ func SearchUsers(getClient GetClientFn, t translations.TranslationHelperFunc) (m Title: t("TOOL_SEARCH_USERS_USER_TITLE", "Search users"), ReadOnlyHint: true, }, - InputSchema: schema, - }, userOrOrgHandler("user", getClient) + InputSchema: SearchUsersInput{}.MCPSchema(), + }, userOrOrgHandlerTyped[SearchUsersInput]("user", getClient) } // SearchOrgs creates a tool to search for GitHub organizations. -func SearchOrgs(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[map[string]any, any]) { - schema := &jsonschema.Schema{ - Type: "object", - Properties: map[string]*jsonschema.Schema{ - "query": { - Type: "string", - Description: "Organization search query. Examples: 'microsoft', 'location:california', 'created:>=2025-01-01'. Search is automatically scoped to type:org.", - }, - "sort": { - Type: "string", - Description: "Sort field by category", - Enum: []any{"followers", "repositories", "joined"}, - }, - "order": { - Type: "string", - Description: "Sort order", - Enum: []any{"asc", "desc"}, - }, - }, - Required: []string{"query"}, - } - WithPagination(schema) - +func SearchOrgs(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, mcp.ToolHandlerFor[SearchOrgsInput, any]) { return mcp.Tool{ Name: "search_orgs", Description: t("TOOL_SEARCH_ORGS_DESCRIPTION", "Find GitHub organizations by name, location, or other organization metadata. Ideal for discovering companies, open source foundations, or teams."), @@ -405,6 +281,6 @@ func SearchOrgs(getClient GetClientFn, t translations.TranslationHelperFunc) (mc Title: t("TOOL_SEARCH_ORGS_USER_TITLE", "Search organizations"), ReadOnlyHint: true, }, - InputSchema: schema, - }, userOrOrgHandler("org", getClient) + InputSchema: SearchOrgsInput{}.MCPSchema(), + }, userOrOrgHandlerTyped[SearchOrgsInput]("org", getClient) } diff --git a/pkg/github/search_test.go b/pkg/github/search_test.go index 0b923edcd..1c669d7bd 100644 --- a/pkg/github/search_test.go +++ b/pkg/github/search_test.go @@ -9,7 +9,6 @@ import ( "github.com/github/github-mcp-server/internal/toolsnaps" "github.com/github/github-mcp-server/pkg/translations" "github.com/google/go-github/v79/github" - "github.com/google/jsonschema-go/jsonschema" "github.com/migueleliasweb/go-github-mock/src/mock" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -24,8 +23,9 @@ func Test_SearchRepositories(t *testing.T) { assert.Equal(t, "search_repositories", tool.Name) assert.NotEmpty(t, tool.Description) - schema, ok := tool.InputSchema.(*jsonschema.Schema) - require.True(t, ok, "InputSchema should be *jsonschema.Schema") + // Get schema from the input type's MCPSchema() method + schema := SearchRepositoriesInput{}.MCPSchema() + require.NotNil(t, schema, "MCPSchema should return a schema") assert.Contains(t, schema.Properties, "query") assert.Contains(t, schema.Properties, "sort") assert.Contains(t, schema.Properties, "order") @@ -60,7 +60,7 @@ func Test_SearchRepositories(t *testing.T) { tests := []struct { name string mockedClient *http.Client - requestArgs map[string]interface{} + input SearchRepositoriesInput expectError bool expectedResult *github.RepositoriesSearchResult expectedErrMsg string @@ -81,12 +81,12 @@ func Test_SearchRepositories(t *testing.T) { ), ), ), - requestArgs: map[string]interface{}{ - "query": "golang test", - "sort": "stars", - "order": "desc", - "page": float64(2), - "perPage": float64(10), + input: SearchRepositoriesInput{ + Query: "golang test", + Sort: "stars", + Order: "desc", + Page: 2, + PerPage: 10, }, expectError: false, expectedResult: mockSearchResult, @@ -97,16 +97,14 @@ func Test_SearchRepositories(t *testing.T) { mock.WithRequestMatchHandler( mock.GetSearchRepositories, expectQueryParams(t, map[string]string{ - "q": "golang test", - "page": "1", - "per_page": "30", + "q": "golang test", }).andThen( mockResponse(t, http.StatusOK, mockSearchResult), ), ), ), - requestArgs: map[string]interface{}{ - "query": "golang test", + input: SearchRepositoriesInput{ + Query: "golang test", }, expectError: false, expectedResult: mockSearchResult, @@ -122,8 +120,8 @@ func Test_SearchRepositories(t *testing.T) { }), ), ), - requestArgs: map[string]interface{}{ - "query": "invalid:query", + input: SearchRepositoriesInput{ + Query: "invalid:query", }, expectError: true, expectedErrMsg: "failed to search repositories", @@ -136,11 +134,8 @@ func Test_SearchRepositories(t *testing.T) { client := github.NewClient(tc.mockedClient) _, handler := SearchRepositories(stubGetClientFn(client), translations.NullTranslationHelper) - // Create call request - request := createMCPRequest(tc.requestArgs) - - // Call handler - result, _, err := handler(context.Background(), &request, tc.requestArgs) + // Call handler with typed input + result, _, err := handler(context.Background(), nil, tc.input) // Verify results if tc.expectError { @@ -195,9 +190,7 @@ func Test_SearchRepositories_FullOutput(t *testing.T) { mock.WithRequestMatchHandler( mock.GetSearchRepositories, expectQueryParams(t, map[string]string{ - "q": "golang test", - "page": "1", - "per_page": "30", + "q": "golang test", }).andThen( mockResponse(t, http.StatusOK, mockSearchResult), ), @@ -207,14 +200,12 @@ func Test_SearchRepositories_FullOutput(t *testing.T) { client := github.NewClient(mockedClient) _, handlerTest := SearchRepositories(stubGetClientFn(client), translations.NullTranslationHelper) - args := map[string]interface{}{ - "query": "golang test", - "minimal_output": false, + input := SearchRepositoriesInput{ + Query: "golang test", + MinimalOutput: false, } - request := createMCPRequest(args) - - result, _, err := handlerTest(context.Background(), &request, args) + result, _, err := handlerTest(context.Background(), nil, input) require.NoError(t, err) require.False(t, result.IsError) @@ -243,8 +234,9 @@ func Test_SearchCode(t *testing.T) { assert.Equal(t, "search_code", tool.Name) assert.NotEmpty(t, tool.Description) - schema, ok := tool.InputSchema.(*jsonschema.Schema) - require.True(t, ok, "InputSchema should be *jsonschema.Schema") + // Get schema from the input type's MCPSchema() method + schema := SearchCodeInput{}.MCPSchema() + require.NotNil(t, schema, "MCPSchema should return a schema") assert.Contains(t, schema.Properties, "query") assert.Contains(t, schema.Properties, "sort") assert.Contains(t, schema.Properties, "order") @@ -277,7 +269,7 @@ func Test_SearchCode(t *testing.T) { tests := []struct { name string mockedClient *http.Client - requestArgs map[string]interface{} + input SearchCodeInput expectError bool expectedResult *github.CodeSearchResult expectedErrMsg string @@ -298,12 +290,12 @@ func Test_SearchCode(t *testing.T) { ), ), ), - requestArgs: map[string]interface{}{ - "query": "fmt.Println language:go", - "sort": "indexed", - "order": "desc", - "page": float64(1), - "perPage": float64(30), + input: SearchCodeInput{ + Query: "fmt.Println language:go", + Sort: "indexed", + Order: "desc", + Page: 1, + PerPage: 30, }, expectError: false, expectedResult: mockSearchResult, @@ -314,16 +306,14 @@ func Test_SearchCode(t *testing.T) { mock.WithRequestMatchHandler( mock.GetSearchCode, expectQueryParams(t, map[string]string{ - "q": "fmt.Println language:go", - "page": "1", - "per_page": "30", + "q": "fmt.Println language:go", }).andThen( mockResponse(t, http.StatusOK, mockSearchResult), ), ), ), - requestArgs: map[string]interface{}{ - "query": "fmt.Println language:go", + input: SearchCodeInput{ + Query: "fmt.Println language:go", }, expectError: false, expectedResult: mockSearchResult, @@ -339,8 +329,8 @@ func Test_SearchCode(t *testing.T) { }), ), ), - requestArgs: map[string]interface{}{ - "query": "invalid:query", + input: SearchCodeInput{ + Query: "invalid:query", }, expectError: true, expectedErrMsg: "failed to search code", @@ -353,11 +343,8 @@ func Test_SearchCode(t *testing.T) { client := github.NewClient(tc.mockedClient) _, handler := SearchCode(stubGetClientFn(client), translations.NullTranslationHelper) - // Create call request - request := createMCPRequest(tc.requestArgs) - - // Call handler - result, _, err := handler(context.Background(), &request, tc.requestArgs) + // Call handler with typed input + result, _, err := handler(context.Background(), nil, tc.input) // Verify results if tc.expectError { @@ -401,8 +388,9 @@ func Test_SearchUsers(t *testing.T) { assert.Equal(t, "search_users", tool.Name) assert.NotEmpty(t, tool.Description) - schema, ok := tool.InputSchema.(*jsonschema.Schema) - require.True(t, ok, "InputSchema should be *jsonschema.Schema") + // Get schema from the input type's MCPSchema() method + schema := SearchUsersInput{}.MCPSchema() + require.NotNil(t, schema, "MCPSchema should return a schema") assert.Contains(t, schema.Properties, "query") assert.Contains(t, schema.Properties, "sort") assert.Contains(t, schema.Properties, "order") @@ -434,7 +422,7 @@ func Test_SearchUsers(t *testing.T) { tests := []struct { name string mockedClient *http.Client - requestArgs map[string]interface{} + input SearchUsersInput expectError bool expectedResult *github.UsersSearchResult expectedErrMsg string @@ -455,12 +443,12 @@ func Test_SearchUsers(t *testing.T) { ), ), ), - requestArgs: map[string]interface{}{ - "query": "location:finland language:go", - "sort": "followers", - "order": "desc", - "page": float64(1), - "perPage": float64(30), + input: SearchUsersInput{ + Query: "location:finland language:go", + Sort: "followers", + Order: "desc", + Page: 1, + PerPage: 30, }, expectError: false, expectedResult: mockSearchResult, @@ -471,16 +459,14 @@ func Test_SearchUsers(t *testing.T) { mock.WithRequestMatchHandler( mock.GetSearchUsers, expectQueryParams(t, map[string]string{ - "q": "type:user location:finland language:go", - "page": "1", - "per_page": "30", + "q": "type:user location:finland language:go", }).andThen( mockResponse(t, http.StatusOK, mockSearchResult), ), ), ), - requestArgs: map[string]interface{}{ - "query": "location:finland language:go", + input: SearchUsersInput{ + Query: "location:finland language:go", }, expectError: false, expectedResult: mockSearchResult, @@ -491,16 +477,14 @@ func Test_SearchUsers(t *testing.T) { mock.WithRequestMatchHandler( mock.GetSearchUsers, expectQueryParams(t, map[string]string{ - "q": "type:user location:seattle followers:>100", - "page": "1", - "per_page": "30", + "q": "type:user location:seattle followers:>100", }).andThen( mockResponse(t, http.StatusOK, mockSearchResult), ), ), ), - requestArgs: map[string]interface{}{ - "query": "type:user location:seattle followers:>100", + input: SearchUsersInput{ + Query: "type:user location:seattle followers:>100", }, expectError: false, expectedResult: mockSearchResult, @@ -511,16 +495,14 @@ func Test_SearchUsers(t *testing.T) { mock.WithRequestMatchHandler( mock.GetSearchUsers, expectQueryParams(t, map[string]string{ - "q": "type:user (location:seattle OR location:california) followers:>50", - "page": "1", - "per_page": "30", + "q": "type:user (location:seattle OR location:california) followers:>50", }).andThen( mockResponse(t, http.StatusOK, mockSearchResult), ), ), ), - requestArgs: map[string]interface{}{ - "query": "type:user (location:seattle OR location:california) followers:>50", + input: SearchUsersInput{ + Query: "type:user (location:seattle OR location:california) followers:>50", }, expectError: false, expectedResult: mockSearchResult, @@ -536,8 +518,8 @@ func Test_SearchUsers(t *testing.T) { }), ), ), - requestArgs: map[string]interface{}{ - "query": "invalid:query", + input: SearchUsersInput{ + Query: "invalid:query", }, expectError: true, expectedErrMsg: "failed to search users", @@ -550,11 +532,8 @@ func Test_SearchUsers(t *testing.T) { client := github.NewClient(tc.mockedClient) _, handler := SearchUsers(stubGetClientFn(client), translations.NullTranslationHelper) - // Create call request - request := createMCPRequest(tc.requestArgs) - - // Call handler - result, _, err := handler(context.Background(), &request, tc.requestArgs) + // Call handler with typed input + result, _, err := handler(context.Background(), nil, tc.input) // Verify results if tc.expectError { @@ -600,8 +579,9 @@ func Test_SearchOrgs(t *testing.T) { assert.Equal(t, "search_orgs", tool.Name) assert.NotEmpty(t, tool.Description) - schema, ok := tool.InputSchema.(*jsonschema.Schema) - require.True(t, ok, "InputSchema should be *jsonschema.Schema") + // Get schema from the input type's MCPSchema() method + schema := SearchOrgsInput{}.MCPSchema() + require.NotNil(t, schema, "MCPSchema should return a schema") assert.Contains(t, schema.Properties, "query") assert.Contains(t, schema.Properties, "sort") assert.Contains(t, schema.Properties, "order") @@ -632,7 +612,7 @@ func Test_SearchOrgs(t *testing.T) { tests := []struct { name string mockedClient *http.Client - requestArgs map[string]interface{} + input SearchOrgsInput expectError bool expectedResult *github.UsersSearchResult expectedErrMsg string @@ -643,16 +623,14 @@ func Test_SearchOrgs(t *testing.T) { mock.WithRequestMatchHandler( mock.GetSearchUsers, expectQueryParams(t, map[string]string{ - "q": "type:org github", - "page": "1", - "per_page": "30", + "q": "type:org github", }).andThen( mockResponse(t, http.StatusOK, mockSearchResult), ), ), ), - requestArgs: map[string]interface{}{ - "query": "github", + input: SearchOrgsInput{ + Query: "github", }, expectError: false, expectedResult: mockSearchResult, @@ -663,16 +641,14 @@ func Test_SearchOrgs(t *testing.T) { mock.WithRequestMatchHandler( mock.GetSearchUsers, expectQueryParams(t, map[string]string{ - "q": "type:org location:california followers:>1000", - "page": "1", - "per_page": "30", + "q": "type:org location:california followers:>1000", }).andThen( mockResponse(t, http.StatusOK, mockSearchResult), ), ), ), - requestArgs: map[string]interface{}{ - "query": "type:org location:california followers:>1000", + input: SearchOrgsInput{ + Query: "type:org location:california followers:>1000", }, expectError: false, expectedResult: mockSearchResult, @@ -683,16 +659,14 @@ func Test_SearchOrgs(t *testing.T) { mock.WithRequestMatchHandler( mock.GetSearchUsers, expectQueryParams(t, map[string]string{ - "q": "type:org (location:seattle OR location:california OR location:newyork) repos:>10", - "page": "1", - "per_page": "30", + "q": "type:org (location:seattle OR location:california OR location:newyork) repos:>10", }).andThen( mockResponse(t, http.StatusOK, mockSearchResult), ), ), ), - requestArgs: map[string]interface{}{ - "query": "type:org (location:seattle OR location:california OR location:newyork) repos:>10", + input: SearchOrgsInput{ + Query: "type:org (location:seattle OR location:california OR location:newyork) repos:>10", }, expectError: false, expectedResult: mockSearchResult, @@ -708,8 +682,8 @@ func Test_SearchOrgs(t *testing.T) { }), ), ), - requestArgs: map[string]interface{}{ - "query": "invalid:query", + input: SearchOrgsInput{ + Query: "invalid:query", }, expectError: true, expectedErrMsg: "failed to search orgs", @@ -722,11 +696,8 @@ func Test_SearchOrgs(t *testing.T) { client := github.NewClient(tc.mockedClient) _, handler := SearchOrgs(stubGetClientFn(client), translations.NullTranslationHelper) - // Create call request - request := createMCPRequest(tc.requestArgs) - - // Call handler - result, _, err := handler(context.Background(), &request, tc.requestArgs) + // Call handler with typed input + result, _, err := handler(context.Background(), nil, tc.input) // Verify results if tc.expectError { diff --git a/pkg/github/tool_inputs.go b/pkg/github/tool_inputs.go new file mode 100644 index 000000000..dc9661a8e --- /dev/null +++ b/pkg/github/tool_inputs.go @@ -0,0 +1,838 @@ +package github + +// Tool input types for MCP tools. These structs use json and jsonschema tags +// to define the input schema for each tool. The mcpgen code generator creates +// SchemaProvider implementations for these types, enabling zero-reflection +// schema generation at runtime. +// +// To regenerate after modifying input types, run: +// go generate ./pkg/github/... + +//go:generate mcpgen -type=SearchRepositoriesInput,SearchCodeInput,SearchUsersInput,SearchIssuesInput,SearchPullRequestsInput,GetFileContentsInput,CreateIssueInput,CreatePullRequestInput,ListCommitsInput,GetCommitInput,ListBranchesInput,ListTagsInput,ListReleasesInput,GetReleaseByTagInput,ListWorkflowsInput,ListWorkflowRunsInput,GetWorkflowRunInput,ListNotificationsInput,GetRepositoryTreeInput,CreateBranchInput,CreateOrUpdateFileInput,PushFilesInput,ForkRepositoryInput,CreateRepositoryInput,GetMeInput,ListGistsInput,GetGistInput,CreateGistInput,UpdateGistInput,ListLabelsInput,GetLabelInput,ListDiscussionsInput,GetDiscussionInput,GetDiscussionCommentsInput,ListDiscussionCategoriesInput,ListProjectsInput,GetProjectInput,ListProjectItemsInput,GetProjectItemInput,AddProjectItemInput,UpdateProjectItemInput,DeleteProjectItemInput,ListPullRequestsInput,PullRequestReadInput,UpdatePullRequestInput,MergePullRequestInput,UpdatePullRequestBranchInput,RequestCopilotReviewInput,IssueReadInput,IssueWriteInput,ListIssuesInput,ListIssueTypesInput,AddIssueCommentInput,StarRepositoryInput,UnstarRepositoryInput,ListStarredRepositoriesInput,ListCodeScanningAlertsInput,GetCodeScanningAlertInput,ListSecretScanningAlertsInput,GetSecretScanningAlertInput,ListDependabotAlertsInput,GetDependabotAlertInput,GetLatestReleaseInput,GetTagInput,ListWorkflowJobsInput,GetJobLogsInput,GetWorkflowRunLogsInput,GetWorkflowRunUsageInput,ListWorkflowRunArtifactsInput,DownloadWorkflowRunArtifactInput,CancelWorkflowRunInput,RerunWorkflowRunInput,RerunFailedJobsInput,DeleteWorkflowRunLogsInput,RunWorkflowInput,GetNotificationDetailsInput,ManageNotificationSubscriptionInput,ManageRepositoryNotificationSubscriptionInput,MarkAllNotificationsReadInput,DismissNotificationInput,GetTeamsInput,GetTeamMembersInput,DeleteFileInput,SearchOrgsInput,SubIssueWriteInput,LabelWriteInput,PullRequestReviewWriteInput,AddCommentToPendingReviewInput,AssignCopilotToIssueInput,ListProjectFieldsInput,GetProjectFieldInput,ListGlobalSecurityAdvisoriesInput,GetGlobalSecurityAdvisoryInput,ListOrgRepositorySecurityAdvisoriesInput,ListRepositorySecurityAdvisoriesInput + +// SearchRepositoriesInput defines input parameters for the search_repositories tool. +type SearchRepositoriesInput struct { + Query string `json:"query" jsonschema:"required,description=Repository search query using GitHub search syntax"` + Sort string `json:"sort" jsonschema:"description=Sort repositories by field - defaults to best match,enum=stars|forks|help-wanted-issues|updated"` + Order string `json:"order" jsonschema:"description=Sort order (asc/desc),enum=asc|desc"` + MinimalOutput bool `json:"minimal_output" jsonschema:"description=Return minimal repository information - when false returns full GitHub API objects"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// SearchCodeInput defines input parameters for the search_code tool. +type SearchCodeInput struct { + Query string `json:"query" jsonschema:"required,description=Search query using GitHub code search syntax"` + Sort string `json:"sort" jsonschema:"description=Sort field (indexed only)"` + Order string `json:"order" jsonschema:"description=Sort order for results (asc/desc),enum=asc|desc"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// SearchUsersInput defines input parameters for the search_users tool. +type SearchUsersInput struct { + Query string `json:"query" jsonschema:"required,description=User search query using GitHub search syntax"` + Sort string `json:"sort" jsonschema:"description=Sort users by followers/repositories/joined,enum=followers|repositories|joined"` + Order string `json:"order" jsonschema:"description=Sort order (asc/desc),enum=asc|desc"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// SearchIssuesInput defines input parameters for the search_issues tool. +type SearchIssuesInput struct { + Query string `json:"query" jsonschema:"required,description=Search query using GitHub issues search syntax"` + Owner string `json:"owner" jsonschema:"description=Repository owner to scope the search"` + Repo string `json:"repo" jsonschema:"description=Repository name to scope the search"` + Sort string `json:"sort" jsonschema:"description=Sort by field,enum=comments|reactions|reactions-+1|reactions--1|reactions-smile|reactions-thinking_face|reactions-heart|reactions-tada|interactions|created|updated"` + Order string `json:"order" jsonschema:"description=Sort order (asc/desc),enum=asc|desc"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// SearchPullRequestsInput defines input parameters for the search_pull_requests tool. +type SearchPullRequestsInput struct { + Query string `json:"query" jsonschema:"required,description=Search query using GitHub pull requests search syntax"` + Owner string `json:"owner" jsonschema:"description=Repository owner to scope the search"` + Repo string `json:"repo" jsonschema:"description=Repository name to scope the search"` + Sort string `json:"sort" jsonschema:"description=Sort by field,enum=comments|reactions|reactions-+1|reactions--1|reactions-smile|reactions-thinking_face|reactions-heart|reactions-tada|interactions|created|updated"` + Order string `json:"order" jsonschema:"description=Sort order (asc/desc),enum=asc|desc"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// GetFileContentsInput defines input parameters for the get_file_contents tool. +type GetFileContentsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner (username or organization)"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Path string `json:"path" jsonschema:"description=Path to file or directory"` + Ref string `json:"ref" jsonschema:"description=Git ref such as branch name or tag name or commit SHA"` + SHA string `json:"sha" jsonschema:"description=Commit SHA (overrides ref if specified)"` +} + +// CreateIssueInput defines input parameters for creating a new issue. +type CreateIssueInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Title string `json:"title" jsonschema:"required,description=Issue title"` + Body string `json:"body" jsonschema:"description=Issue body content"` + Assignees []string `json:"assignees" jsonschema:"description=Usernames to assign to this issue"` + Labels []string `json:"labels" jsonschema:"description=Labels to add to this issue"` + Milestone int `json:"milestone" jsonschema:"description=Milestone number to assign"` +} + +// CreatePullRequestInput defines input parameters for creating a pull request. +type CreatePullRequestInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Title string `json:"title" jsonschema:"required,description=Pull request title"` + Body string `json:"body" jsonschema:"description=Pull request body/description"` + Head string `json:"head" jsonschema:"required,description=Branch where your changes are implemented"` + Base string `json:"base" jsonschema:"required,description=Branch you want the changes pulled into"` + Draft bool `json:"draft" jsonschema:"description=Create as a draft pull request"` + MaintainerCanModify bool `json:"maintainer_can_modify" jsonschema:"description=Whether maintainers can modify the pull request"` +} + +// ListCommitsInput defines input parameters for listing commits. +type ListCommitsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + SHA string `json:"sha" jsonschema:"description=SHA or branch to start listing commits from"` + Author string `json:"author" jsonschema:"description=Filter commits by author username or email"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// GetCommitInput defines input parameters for getting a commit. +type GetCommitInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + SHA string `json:"sha" jsonschema:"required,description=Commit SHA or branch name or tag name"` + IncludeDiff bool `json:"include_diff" jsonschema:"description=Whether to include file diffs and stats in the response"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// ListBranchesInput defines input parameters for listing branches. +type ListBranchesInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// ListTagsInput defines input parameters for listing tags. +type ListTagsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// ListReleasesInput defines input parameters for listing releases. +type ListReleasesInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// GetReleaseByTagInput defines input parameters for getting a release by tag. +type GetReleaseByTagInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Tag string `json:"tag" jsonschema:"required,description=Tag name (e.g. 'v1.0.0')"` +} + +// ListWorkflowsInput defines input parameters for listing workflows. +type ListWorkflowsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// ListWorkflowRunsInput defines input parameters for listing workflow runs. +type ListWorkflowRunsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + WorkflowID string `json:"workflow_id" jsonschema:"required,description=The workflow ID or workflow file name"` + Branch string `json:"branch" jsonschema:"description=Filter by branch name"` + Actor string `json:"actor" jsonschema:"description=Filter by actor (user who triggered the workflow)"` + Status string `json:"status" jsonschema:"description=Filter by status,enum=queued|in_progress|completed|requested|waiting"` + Event string `json:"event" jsonschema:"description=Filter by event type,enum=push|pull_request|workflow_dispatch|schedule|release"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// GetWorkflowRunInput defines input parameters for getting a workflow run. +type GetWorkflowRunInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + RunID int `json:"run_id" jsonschema:"required,description=The unique identifier of the workflow run"` +} + +// ListNotificationsInput defines input parameters for listing notifications. +type ListNotificationsInput struct { + Filter string `json:"filter" jsonschema:"description=Filter notifications,enum=default|include_read_notifications|only_participating"` + Since string `json:"since" jsonschema:"description=Only show notifications updated after the given time (ISO 8601 format)"` + Before string `json:"before" jsonschema:"description=Only show notifications updated before the given time (ISO 8601 format)"` + Owner string `json:"owner" jsonschema:"description=Repository owner to filter notifications"` + Repo string `json:"repo" jsonschema:"description=Repository name to filter notifications"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// GetRepositoryTreeInput defines input parameters for getting repository tree. +type GetRepositoryTreeInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner (username or organization)"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + TreeSHA string `json:"tree_sha" jsonschema:"description=The SHA1 value or ref (branch or tag) name of the tree"` + Recursive bool `json:"recursive" jsonschema:"description=Recursively fetch the tree"` + PathFilter string `json:"path_filter" jsonschema:"description=Optional path prefix to filter the tree results"` +} + +// CreateBranchInput defines input parameters for creating a branch. +type CreateBranchInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Branch string `json:"branch" jsonschema:"required,description=Name for the new branch"` + FromRef string `json:"from_ref" jsonschema:"description=The ref to create the branch from (defaults to the default branch)"` +} + +// CreateOrUpdateFileInput defines input parameters for creating or updating a file. +type CreateOrUpdateFileInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Path string `json:"path" jsonschema:"required,description=Path where to create/update the file"` + Content string `json:"content" jsonschema:"required,description=Content of the file"` + Message string `json:"message" jsonschema:"required,description=Commit message"` + Branch string `json:"branch" jsonschema:"required,description=Branch to create/update the file in"` + SHA string `json:"sha" jsonschema:"description=SHA of the file being replaced (required for updates)"` +} + +// PushFilesInput defines input parameters for pushing multiple files. +type PushFilesInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Branch string `json:"branch" jsonschema:"required,description=Branch to push to"` + Message string `json:"message" jsonschema:"required,description=Commit message"` + Files []FileOperation `json:"files" jsonschema:"required,description=List of file operations to perform"` +} + +// FileOperation represents a file operation for push_files. +type FileOperation struct { + Path string `json:"path" jsonschema:"required,description=Path to the file"` + Content string `json:"content" jsonschema:"description=Content of the file (for create/update)"` +} + +// ForkRepositoryInput defines input parameters for forking a repository. +type ForkRepositoryInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Organization string `json:"organization" jsonschema:"description=Organization to fork to (defaults to authenticated user)"` +} + +// CreateRepositoryInput defines input parameters for creating a repository. +type CreateRepositoryInput struct { + Name string `json:"name" jsonschema:"required,description=Repository name"` + Description string `json:"description" jsonschema:"description=Repository description"` + Private bool `json:"private" jsonschema:"description=Whether the repository is private"` + AutoInit bool `json:"auto_init" jsonschema:"description=Initialize with a README"` +} + +// GetMeInput defines input parameters for getting authenticated user info. +type GetMeInput struct{} + +// ListGistsInput defines input parameters for listing gists. +type ListGistsInput struct { + Username string `json:"username" jsonschema:"description=GitHub username (omit for authenticated user's gists)"` + Since string `json:"since" jsonschema:"description=Only gists updated after this time (ISO 8601 timestamp)"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// GetGistInput defines input parameters for getting a gist. +type GetGistInput struct { + GistID string `json:"gist_id" jsonschema:"required,description=The ID of the gist to retrieve"` +} + +// CreateGistInput defines input parameters for creating a gist. +type CreateGistInput struct { + Description string `json:"description" jsonschema:"description=Description of the gist"` + Public bool `json:"public" jsonschema:"description=Whether the gist is public"` + Files map[string]string `json:"files" jsonschema:"required,description=Map of filename to file content"` +} + +// UpdateGistInput defines input parameters for updating a gist. +type UpdateGistInput struct { + GistID string `json:"gist_id" jsonschema:"required,description=The ID of the gist to update"` + Description string `json:"description" jsonschema:"description=New description for the gist"` + Files map[string]string `json:"files" jsonschema:"description=Map of filename to new file content"` +} + +// ListLabelsInput defines input parameters for listing labels. +type ListLabelsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// GetLabelInput defines input parameters for getting a label. +type GetLabelInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Name string `json:"name" jsonschema:"required,description=Label name"` +} + +// ListDiscussionsInput defines input parameters for listing discussions. +type ListDiscussionsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + CategoryID string `json:"category_id" jsonschema:"description=Filter by category ID"` + OrderBy string `json:"order_by" jsonschema:"description=Field to order by,enum=CREATED_AT|UPDATED_AT"` + Direction string `json:"direction" jsonschema:"description=Order direction,enum=ASC|DESC"` + First int `json:"first" jsonschema:"description=Number of discussions to return"` + After string `json:"after" jsonschema:"description=Cursor for pagination"` +} + +// GetDiscussionInput defines input parameters for getting a discussion. +type GetDiscussionInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + DiscussionNumber int `json:"discussion_number" jsonschema:"required,description=Discussion number"` +} + +// GetDiscussionCommentsInput defines input parameters for getting discussion comments. +type GetDiscussionCommentsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + DiscussionNumber int `json:"discussion_number" jsonschema:"required,description=Discussion number"` + First int `json:"first" jsonschema:"description=Number of comments to return"` + After string `json:"after" jsonschema:"description=Cursor for pagination"` +} + +// ListDiscussionCategoriesInput defines input parameters for listing discussion categories. +type ListDiscussionCategoriesInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + First int `json:"first" jsonschema:"description=Number of categories to return"` + After string `json:"after" jsonschema:"description=Cursor for pagination"` +} + +// ListProjectsInput defines input parameters for listing projects. +type ListProjectsInput struct { + OwnerType string `json:"owner_type" jsonschema:"required,description=Owner type,enum=user|org"` + Owner string `json:"owner" jsonschema:"required,description=Owner name (user handle or org name)"` + Query string `json:"query" jsonschema:"description=Filter projects by title and state (e.g. 'roadmap is:open')"` + PerPage int `json:"per_page" jsonschema:"description=Results per page"` + After string `json:"after" jsonschema:"description=Forward pagination cursor"` + Before string `json:"before" jsonschema:"description=Backward pagination cursor"` +} + +// GetProjectInput defines input parameters for getting a project. +type GetProjectInput struct { + Owner string `json:"owner" jsonschema:"required,description=Owner of the project"` + ProjectID int `json:"project_id" jsonschema:"required,description=Project number"` +} + +// ListProjectItemsInput defines input parameters for listing project items. +type ListProjectItemsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Owner of the project"` + ProjectID int `json:"project_id" jsonschema:"required,description=Project number"` + First int `json:"first" jsonschema:"description=Number of items to return"` + After string `json:"after" jsonschema:"description=Cursor for pagination"` +} + +// GetProjectItemInput defines input parameters for getting a project item. +type GetProjectItemInput struct { + Owner string `json:"owner" jsonschema:"required,description=Owner of the project"` + ProjectID int `json:"project_id" jsonschema:"required,description=Project number"` + ItemID string `json:"item_id" jsonschema:"required,description=Item ID"` +} + +// AddProjectItemInput defines input parameters for adding a project item. +type AddProjectItemInput struct { + Owner string `json:"owner" jsonschema:"required,description=Owner of the project"` + ProjectID int `json:"project_id" jsonschema:"required,description=Project number"` + ContentID string `json:"content_id" jsonschema:"required,description=ID of the issue or PR to add"` +} + +// UpdateProjectItemInput defines input parameters for updating a project item. +type UpdateProjectItemInput struct { + Owner string `json:"owner" jsonschema:"required,description=Owner of the project"` + ProjectID int `json:"project_id" jsonschema:"required,description=Project number"` + ItemID string `json:"item_id" jsonschema:"required,description=Item ID to update"` + FieldID string `json:"field_id" jsonschema:"required,description=Field ID to update"` + Value any `json:"value" jsonschema:"required,description=New value for the field"` +} + +// DeleteProjectItemInput defines input parameters for deleting a project item. +type DeleteProjectItemInput struct { + Owner string `json:"owner" jsonschema:"required,description=Owner of the project"` + ProjectID int `json:"project_id" jsonschema:"required,description=Project number"` + ItemID string `json:"item_id" jsonschema:"required,description=Item ID to delete"` +} + +// ListPullRequestsInput defines input parameters for listing pull requests. +type ListPullRequestsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + State string `json:"state" jsonschema:"description=Filter by state,enum=open|closed|all"` + Head string `json:"head" jsonschema:"description=Filter by head user/org and branch"` + Base string `json:"base" jsonschema:"description=Filter by base branch"` + Sort string `json:"sort" jsonschema:"description=Sort by,enum=created|updated|popularity|long-running"` + Direction string `json:"direction" jsonschema:"description=Sort direction,enum=asc|desc"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// PullRequestReadInput defines input parameters for reading pull request info. +type PullRequestReadInput struct { + Method string `json:"method" jsonschema:"required,description=Read operation to perform,enum=get|get_diff|get_status|get_files|get_review_comments|get_reviews|get_comments"` + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + PullNumber int `json:"pullNumber" jsonschema:"required,description=Pull request number"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// UpdatePullRequestInput defines input parameters for updating a pull request. +type UpdatePullRequestInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + PullNumber int `json:"pull_number" jsonschema:"required,description=Pull request number"` + Title string `json:"title" jsonschema:"description=New title"` + Body string `json:"body" jsonschema:"description=New body"` + State string `json:"state" jsonschema:"description=New state,enum=open|closed"` + Base string `json:"base" jsonschema:"description=New base branch"` + MaintainerCanModify bool `json:"maintainer_can_modify" jsonschema:"description=Allow maintainer modifications"` +} + +// MergePullRequestInput defines input parameters for merging a pull request. +type MergePullRequestInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + PullNumber int `json:"pull_number" jsonschema:"required,description=Pull request number"` + CommitTitle string `json:"commit_title" jsonschema:"description=Title for the merge commit"` + CommitMessage string `json:"commit_message" jsonschema:"description=Message for the merge commit"` + MergeMethod string `json:"merge_method" jsonschema:"description=Merge method,enum=merge|squash|rebase"` +} + +// UpdatePullRequestBranchInput defines input parameters for updating a pull request branch. +type UpdatePullRequestBranchInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + PullNumber int `json:"pull_number" jsonschema:"required,description=Pull request number"` + ExpectedHeadSHA string `json:"expected_head_sha" jsonschema:"description=Expected SHA of the head ref"` +} + +// RequestCopilotReviewInput defines input parameters for requesting Copilot review. +type RequestCopilotReviewInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + PullNumber int `json:"pull_number" jsonschema:"required,description=Pull request number"` +} + +// IssueReadInput defines input parameters for reading issue info. +type IssueReadInput struct { + Method string `json:"method" jsonschema:"required,description=Read operation to perform,enum=get|get_comments|get_sub_issues|get_labels"` + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + IssueNumber int `json:"issue_number" jsonschema:"required,description=Issue number"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// IssueWriteInput defines input parameters for writing issue info. +type IssueWriteInput struct { + Method string `json:"method" jsonschema:"required,description=Write operation to perform,enum=create|update"` + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + IssueNumber int `json:"issue_number" jsonschema:"description=Issue number (for update)"` + Title string `json:"title" jsonschema:"description=Issue title"` + Body string `json:"body" jsonschema:"description=Issue body"` + Assignees []string `json:"assignees" jsonschema:"description=Usernames to assign"` + Labels []string `json:"labels" jsonschema:"description=Labels to add"` + Milestone int `json:"milestone" jsonschema:"description=Milestone number"` + State string `json:"state" jsonschema:"description=Issue state,enum=open|closed"` + StateReason string `json:"state_reason" jsonschema:"description=Reason for closing,enum=completed|not_planned|duplicate"` +} + +// ListIssuesInput defines input parameters for listing issues. +type ListIssuesInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + State string `json:"state" jsonschema:"description=Filter by state,enum=OPEN|CLOSED"` + Labels []string `json:"labels" jsonschema:"description=Filter by labels"` + OrderBy string `json:"orderBy" jsonschema:"description=Order by field,enum=CREATED_AT|UPDATED_AT|COMMENTS"` + Direction string `json:"direction" jsonschema:"description=Order direction,enum=ASC|DESC"` + Since string `json:"since" jsonschema:"description=Filter by date (ISO 8601 timestamp)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` + After string `json:"after" jsonschema:"description=Cursor for pagination"` +} + +// ListIssueTypesInput defines input parameters for listing issue types. +type ListIssueTypesInput struct { + Owner string `json:"owner" jsonschema:"required,description=Organization owner"` +} + +// AddIssueCommentInput defines input parameters for adding an issue comment. +type AddIssueCommentInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + IssueNumber int `json:"issue_number" jsonschema:"required,description=Issue number"` + Body string `json:"body" jsonschema:"required,description=Comment body"` +} + +// StarRepositoryInput defines input parameters for starring a repository. +type StarRepositoryInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` +} + +// UnstarRepositoryInput defines input parameters for unstarring a repository. +type UnstarRepositoryInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` +} + +// ListStarredRepositoriesInput defines input parameters for listing starred repositories. +type ListStarredRepositoriesInput struct { + Username string `json:"username" jsonschema:"description=GitHub username (defaults to authenticated user)"` + Sort string `json:"sort" jsonschema:"description=Sort by,enum=created|updated"` + Order string `json:"order" jsonschema:"description=Sort direction,enum=asc|desc"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// ListCodeScanningAlertsInput defines input parameters for listing code scanning alerts. +type ListCodeScanningAlertsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Ref string `json:"ref" jsonschema:"description=Git ref to filter results"` + State string `json:"state" jsonschema:"description=Filter by state,enum=open|closed|dismissed|fixed"` + Severity string `json:"severity" jsonschema:"description=Filter by severity,enum=critical|high|medium|low|warning|note|error"` + ToolName string `json:"tool_name" jsonschema:"description=Filter by tool name"` +} + +// GetCodeScanningAlertInput defines input parameters for getting a code scanning alert. +type GetCodeScanningAlertInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + AlertNumber int `json:"alertNumber" jsonschema:"required,description=Alert number"` +} + +// ListSecretScanningAlertsInput defines input parameters for listing secret scanning alerts. +type ListSecretScanningAlertsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + State string `json:"state" jsonschema:"description=Filter by state,enum=open|resolved"` + SecretType string `json:"secret_type" jsonschema:"description=Filter by secret type"` + Resolution string `json:"resolution" jsonschema:"description=Filter by resolution,enum=false_positive|wont_fix|revoked|pattern_edited|pattern_deleted|used_in_tests"` +} + +// GetSecretScanningAlertInput defines input parameters for getting a secret scanning alert. +type GetSecretScanningAlertInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + AlertNumber int `json:"alertNumber" jsonschema:"required,description=Alert number"` +} + +// ListDependabotAlertsInput defines input parameters for listing Dependabot alerts. +type ListDependabotAlertsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + State string `json:"state" jsonschema:"description=Filter by state,enum=auto_dismissed|dismissed|fixed|open"` + Severity string `json:"severity" jsonschema:"description=Filter by severity,enum=low|medium|high|critical"` + Page int `json:"page" jsonschema:"description=Page number for pagination"` + PerPage int `json:"perPage" jsonschema:"description=Results per page"` +} + +// GetDependabotAlertInput defines input parameters for getting a Dependabot alert. +type GetDependabotAlertInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + AlertNumber int `json:"alert_number" jsonschema:"required,description=Alert number"` +} + +// GetLatestReleaseInput defines input parameters for getting the latest release. +type GetLatestReleaseInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` +} + +// GetTagInput defines input parameters for getting a tag. +type GetTagInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Tag string `json:"tag" jsonschema:"required,description=Tag name"` +} + +// ListWorkflowJobsInput defines input parameters for listing workflow jobs. +type ListWorkflowJobsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + RunID int `json:"run_id" jsonschema:"required,description=Workflow run ID"` + Filter string `json:"filter" jsonschema:"description=Filter jobs,enum=latest|all"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// GetJobLogsInput defines input parameters for getting job logs. +type GetJobLogsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + JobID int `json:"job_id" jsonschema:"description=Job ID for single job logs"` + RunID int `json:"run_id" jsonschema:"description=Run ID for failed jobs logs"` + FailedOnly bool `json:"failed_only" jsonschema:"description=Get logs for failed jobs only"` + ReturnContent bool `json:"return_content" jsonschema:"description=Return actual log content instead of URLs"` + TailLines int `json:"tail_lines" jsonschema:"description=Number of lines from end of log"` +} + +// GetWorkflowRunLogsInput defines input parameters for getting workflow run logs. +type GetWorkflowRunLogsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + RunID int `json:"run_id" jsonschema:"required,description=Workflow run ID"` +} + +// GetWorkflowRunUsageInput defines input parameters for getting workflow run usage. +type GetWorkflowRunUsageInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + RunID int `json:"run_id" jsonschema:"required,description=Workflow run ID"` +} + +// ListWorkflowRunArtifactsInput defines input parameters for listing workflow run artifacts. +type ListWorkflowRunArtifactsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + RunID int `json:"run_id" jsonschema:"required,description=Workflow run ID"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// DownloadWorkflowRunArtifactInput defines input parameters for downloading an artifact. +type DownloadWorkflowRunArtifactInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + ArtifactID int `json:"artifact_id" jsonschema:"required,description=Artifact ID"` +} + +// CancelWorkflowRunInput defines input parameters for canceling a workflow run. +type CancelWorkflowRunInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + RunID int `json:"run_id" jsonschema:"required,description=Workflow run ID"` +} + +// RerunWorkflowRunInput defines input parameters for rerunning a workflow run. +type RerunWorkflowRunInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + RunID int `json:"run_id" jsonschema:"required,description=Workflow run ID"` +} + +// RerunFailedJobsInput defines input parameters for rerunning failed jobs. +type RerunFailedJobsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + RunID int `json:"run_id" jsonschema:"required,description=Workflow run ID"` +} + +// DeleteWorkflowRunLogsInput defines input parameters for deleting workflow run logs. +type DeleteWorkflowRunLogsInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + RunID int `json:"run_id" jsonschema:"required,description=Workflow run ID"` +} + +// RunWorkflowInput defines input parameters for running a workflow. +type RunWorkflowInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + WorkflowID string `json:"workflow_id" jsonschema:"required,description=Workflow ID or filename"` + Ref string `json:"ref" jsonschema:"required,description=Git ref to run workflow from"` + Inputs map[string]any `json:"inputs" jsonschema:"description=Workflow inputs"` +} + +// GetNotificationDetailsInput defines input parameters for getting notification details. +type GetNotificationDetailsInput struct { + NotificationID string `json:"notification_id" jsonschema:"required,description=Notification thread ID"` +} + +// ManageNotificationSubscriptionInput defines input parameters for managing notification subscription. +type ManageNotificationSubscriptionInput struct { + NotificationID string `json:"notification_id" jsonschema:"required,description=Notification thread ID"` + Action string `json:"action" jsonschema:"required,description=Action to perform,enum=get|set|delete"` + Ignored bool `json:"ignored" jsonschema:"description=Whether to ignore notifications"` +} + +// ManageRepositoryNotificationSubscriptionInput defines input parameters for managing repo notification subscription. +type ManageRepositoryNotificationSubscriptionInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Action string `json:"action" jsonschema:"required,description=Action to perform,enum=get|set|delete"` + Ignored bool `json:"ignored" jsonschema:"description=Whether to ignore notifications"` +} + +// MarkAllNotificationsReadInput defines input parameters for marking all notifications read. +type MarkAllNotificationsReadInput struct { + LastReadAt string `json:"last_read_at" jsonschema:"description=Timestamp of last read notification (ISO 8601)"` + Read bool `json:"read" jsonschema:"description=Whether to mark as read"` + Owner string `json:"owner" jsonschema:"description=Repository owner (for repo-specific marking)"` + Repo string `json:"repo" jsonschema:"description=Repository name (for repo-specific marking)"` +} + +// DismissNotificationInput defines input parameters for dismissing a notification. +type DismissNotificationInput struct { + ThreadID string `json:"thread_id" jsonschema:"required,description=Notification thread ID"` +} + +// GetTeamsInput defines input parameters for getting teams. +type GetTeamsInput struct { + Org string `json:"org" jsonschema:"required,description=Organization name"` + Page int `json:"page" jsonschema:"description=Page number for pagination"` + PerPage int `json:"perPage" jsonschema:"description=Results per page"` +} + +// GetTeamMembersInput defines input parameters for getting team members. +type GetTeamMembersInput struct { + Org string `json:"org" jsonschema:"required,description=Organization name"` + TeamSlug string `json:"team_slug" jsonschema:"required,description=Team slug"` + Role string `json:"role" jsonschema:"description=Filter by role,enum=member|maintainer|all"` + Page int `json:"page" jsonschema:"description=Page number for pagination"` + PerPage int `json:"perPage" jsonschema:"description=Results per page"` +} + +// DeleteFileInput defines input parameters for deleting a file. +type DeleteFileInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Path string `json:"path" jsonschema:"required,description=Path to the file to delete"` + Message string `json:"message" jsonschema:"required,description=Commit message"` + Branch string `json:"branch" jsonschema:"required,description=Branch containing the file"` + SHA string `json:"sha" jsonschema:"required,description=SHA of the file being deleted"` +} + +// SearchOrgsInput defines input parameters for the search_orgs tool. +type SearchOrgsInput struct { + Query string `json:"query" jsonschema:"required,description=Organization search query using GitHub search syntax"` + Sort string `json:"sort" jsonschema:"description=Sort field,enum=followers|repositories|joined"` + Order string `json:"order" jsonschema:"description=Sort order,enum=asc|desc"` + Page int `json:"page" jsonschema:"description=Page number for pagination (min 1)"` + PerPage int `json:"perPage" jsonschema:"description=Results per page for pagination (min 1 and max 100)"` +} + +// SubIssueWriteInput defines input parameters for the sub_issue_write tool. +type SubIssueWriteInput struct { + Method string `json:"method" jsonschema:"required,description=Action to perform (add/remove/reprioritize)"` + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + IssueNumber int `json:"issue_number" jsonschema:"required,description=The number of the parent issue"` + SubIssueID int `json:"sub_issue_id" jsonschema:"required,description=The ID of the sub-issue (not the issue number)"` + ReplaceParent bool `json:"replace_parent" jsonschema:"description=Replace the sub-issue's current parent (add method only)"` + AfterID int `json:"after_id" jsonschema:"description=Sub-issue ID to prioritize after"` + BeforeID int `json:"before_id" jsonschema:"description=Sub-issue ID to prioritize before"` +} + +// LabelWriteInput defines input parameters for the label_write tool. +type LabelWriteInput struct { + Method string `json:"method" jsonschema:"required,description=Operation to perform,enum=create|update|delete"` + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Name string `json:"name" jsonschema:"required,description=Label name"` + NewName string `json:"new_name" jsonschema:"description=New name for the label (update only)"` + Color string `json:"color" jsonschema:"description=Label color as 6-character hex code without # prefix"` + Description string `json:"description" jsonschema:"description=Label description"` +} + +// PullRequestReviewWriteInput defines input parameters for the pull_request_review_write tool. +type PullRequestReviewWriteInput struct { + Method string `json:"method" jsonschema:"required,description=Write operation to perform,enum=create|submit_pending|delete_pending"` + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + PullNumber int `json:"pullNumber" jsonschema:"required,description=Pull request number"` + Body string `json:"body" jsonschema:"description=Review comment text"` + Event string `json:"event" jsonschema:"description=Review action to perform,enum=APPROVE|REQUEST_CHANGES|COMMENT"` + CommitID string `json:"commitID" jsonschema:"description=SHA of commit to review"` +} + +// AddCommentToPendingReviewInput defines input parameters for the add_comment_to_pending_review tool. +type AddCommentToPendingReviewInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + PullNumber int `json:"pullNumber" jsonschema:"required,description=Pull request number"` + Path string `json:"path" jsonschema:"required,description=Relative path to the file that necessitates a comment"` + Body string `json:"body" jsonschema:"required,description=The text of the review comment"` + SubjectType string `json:"subjectType" jsonschema:"required,description=The level at which the comment is targeted,enum=FILE|LINE"` + Line int `json:"line" jsonschema:"description=Line of the blob in the PR diff (for multi-line - last line of range)"` + Side string `json:"side" jsonschema:"description=Side of the diff to comment on,enum=LEFT|RIGHT"` + StartLine int `json:"startLine" jsonschema:"description=For multi-line comments - first line of range"` + StartSide string `json:"startSide" jsonschema:"description=For multi-line comments - starting side,enum=LEFT|RIGHT"` +} + +// AssignCopilotToIssueInput defines input parameters for the assign_copilot_to_issue tool. +type AssignCopilotToIssueInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + IssueNumber int `json:"issueNumber" jsonschema:"required,description=Issue number"` +} + +// ListProjectFieldsInput defines input parameters for the list_project_fields tool. +type ListProjectFieldsInput struct { + OwnerType string `json:"owner_type" jsonschema:"required,description=Owner type,enum=user|org"` + Owner string `json:"owner" jsonschema:"required,description=Owner name"` + ProjectNumber int `json:"project_number" jsonschema:"required,description=Project number"` + PerPage int `json:"per_page" jsonschema:"description=Results per page"` + After string `json:"after" jsonschema:"description=Forward pagination cursor"` + Before string `json:"before" jsonschema:"description=Backward pagination cursor"` +} + +// GetProjectFieldInput defines input parameters for the get_project_field tool. +type GetProjectFieldInput struct { + OwnerType string `json:"owner_type" jsonschema:"required,description=Owner type,enum=user|org"` + Owner string `json:"owner" jsonschema:"required,description=Owner name"` + ProjectNumber int `json:"project_number" jsonschema:"required,description=Project number"` + FieldID int `json:"field_id" jsonschema:"required,description=Field ID"` +} + +// ListGlobalSecurityAdvisoriesInput defines input parameters for the list_global_security_advisories tool. +type ListGlobalSecurityAdvisoriesInput struct { + GhsaID string `json:"ghsaId" jsonschema:"description=Filter by GitHub Security Advisory ID"` + Type string `json:"type" jsonschema:"description=Advisory type,enum=reviewed|malware|unreviewed"` + CveID string `json:"cveId" jsonschema:"description=Filter by CVE ID"` + Ecosystem string `json:"ecosystem" jsonschema:"description=Filter by package ecosystem,enum=actions|composer|erlang|go|maven|npm|nuget|other|pip|pub|rubygems|rust"` + Severity string `json:"severity" jsonschema:"description=Filter by severity,enum=unknown|low|medium|high|critical"` + Cwes []string `json:"cwes" jsonschema:"description=Filter by Common Weakness Enumeration IDs"` + IsWithdrawn bool `json:"isWithdrawn" jsonschema:"description=Whether to only return withdrawn advisories"` + Affects string `json:"affects" jsonschema:"description=Filter by affected package or version"` + Published string `json:"published" jsonschema:"description=Filter by publish date (ISO 8601)"` + Updated string `json:"updated" jsonschema:"description=Filter by update date (ISO 8601)"` + Modified string `json:"modified" jsonschema:"description=Filter by publish or update date (ISO 8601)"` + Page int `json:"page" jsonschema:"description=Page number for pagination"` + PerPage int `json:"perPage" jsonschema:"description=Results per page"` +} + +// GetGlobalSecurityAdvisoryInput defines input parameters for the get_global_security_advisory tool. +type GetGlobalSecurityAdvisoryInput struct { + GhsaID string `json:"ghsaId" jsonschema:"required,description=GitHub Security Advisory ID (GHSA-xxxx-xxxx-xxxx)"` +} + +// ListOrgRepositorySecurityAdvisoriesInput defines input parameters for the list_org_repository_security_advisories tool. +type ListOrgRepositorySecurityAdvisoriesInput struct { + Org string `json:"org" jsonschema:"required,description=Organization name"` + Direction string `json:"direction" jsonschema:"description=Sort direction,enum=asc|desc"` + Sort string `json:"sort" jsonschema:"description=Sort field,enum=created|updated|published"` + State string `json:"state" jsonschema:"description=Filter by advisory state,enum=triage|draft|published|closed"` +} + +// ListRepositorySecurityAdvisoriesInput defines input parameters for the list_repository_security_advisories tool. +type ListRepositorySecurityAdvisoriesInput struct { + Owner string `json:"owner" jsonschema:"required,description=Repository owner"` + Repo string `json:"repo" jsonschema:"required,description=Repository name"` + Direction string `json:"direction" jsonschema:"description=Sort direction,enum=asc|desc"` + Sort string `json:"sort" jsonschema:"description=Sort field,enum=created|updated|published"` + State string `json:"state" jsonschema:"description=Filter by advisory state,enum=triage|draft|published|closed"` +} diff --git a/third-party-licenses.darwin.md b/third-party-licenses.darwin.md index 32cdb5b6d..023e0ee7d 100644 --- a/third-party-licenses.darwin.md +++ b/third-party-licenses.darwin.md @@ -24,7 +24,7 @@ Some packages may only be included on certain architectures or operating systems - [github.com/mailru/easyjson](https://pkg.go.dev/github.com/mailru/easyjson) ([MIT](https://github.com/mailru/easyjson/blob/v0.7.7/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/migueleliasweb/go-github-mock/src/mock](https://pkg.go.dev/github.com/migueleliasweb/go-github-mock/src/mock) ([MIT](https://github.com/migueleliasweb/go-github-mock/blob/v1.3.0/LICENSE)) - - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.1.0/LICENSE)) + - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/SamMorrowDrums/go-sdk/blob/d56ca1559a02/LICENSE)) - [github.com/muesli/cache2go](https://pkg.go.dev/github.com/muesli/cache2go) ([BSD-3-Clause](https://github.com/muesli/cache2go/blob/518229cd8021/LICENSE.txt)) - [github.com/pelletier/go-toml/v2](https://pkg.go.dev/github.com/pelletier/go-toml/v2) ([MIT](https://github.com/pelletier/go-toml/blob/v2.2.4/LICENSE)) - [github.com/sagikazarmark/locafero](https://pkg.go.dev/github.com/sagikazarmark/locafero) ([MIT](https://github.com/sagikazarmark/locafero/blob/v0.11.0/LICENSE)) @@ -39,12 +39,12 @@ Some packages may only be included on certain architectures or operating systems - [github.com/subosito/gotenv](https://pkg.go.dev/github.com/subosito/gotenv) ([MIT](https://github.com/subosito/gotenv/blob/v1.6.0/LICENSE)) - [github.com/yosida95/uritemplate/v3](https://pkg.go.dev/github.com/yosida95/uritemplate/v3) ([BSD-3-Clause](https://github.com/yosida95/uritemplate/blob/v3.0.2/LICENSE)) - [github.com/yudai/golcs](https://pkg.go.dev/github.com/yudai/golcs) ([MIT](https://github.com/yudai/golcs/blob/ecda9a501e82/LICENSE)) - - [go.yaml.in/yaml/v3](https://pkg.go.dev/go.yaml.in/yaml/v3) ([MIT](https://github.com/yaml/go-yaml/blob/v3.0.4/LICENSE)) + - [go.yaml.in/yaml/v3](https://pkg.go.dev/go.yaml.in/yaml/v3) ([MIT](Unknown)) - [golang.org/x/exp](https://pkg.go.dev/golang.org/x/exp) ([BSD-3-Clause](https://cs.opensource.google/go/x/exp/+/8a7402ab:LICENSE)) - [golang.org/x/net/html](https://pkg.go.dev/golang.org/x/net/html) ([BSD-3-Clause](https://cs.opensource.google/go/x/net/+/v0.38.0:LICENSE)) - [golang.org/x/sys/unix](https://pkg.go.dev/golang.org/x/sys/unix) ([BSD-3-Clause](https://cs.opensource.google/go/x/sys/+/v0.31.0:LICENSE)) - [golang.org/x/text](https://pkg.go.dev/golang.org/x/text) ([BSD-3-Clause](https://cs.opensource.google/go/x/text/+/v0.28.0:LICENSE)) - [golang.org/x/time/rate](https://pkg.go.dev/golang.org/x/time/rate) ([BSD-3-Clause](https://cs.opensource.google/go/x/time/+/v0.5.0:LICENSE)) - - [gopkg.in/yaml.v2](https://pkg.go.dev/gopkg.in/yaml.v2) ([Apache-2.0](https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE)) + - [gopkg.in/yaml.v2](https://pkg.go.dev/gopkg.in/yaml.v2) ([Apache-2.0](Unknown)) [github/github-mcp-server]: https://github.com/github/github-mcp-server diff --git a/third-party-licenses.linux.md b/third-party-licenses.linux.md index 32cdb5b6d..023e0ee7d 100644 --- a/third-party-licenses.linux.md +++ b/third-party-licenses.linux.md @@ -24,7 +24,7 @@ Some packages may only be included on certain architectures or operating systems - [github.com/mailru/easyjson](https://pkg.go.dev/github.com/mailru/easyjson) ([MIT](https://github.com/mailru/easyjson/blob/v0.7.7/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/migueleliasweb/go-github-mock/src/mock](https://pkg.go.dev/github.com/migueleliasweb/go-github-mock/src/mock) ([MIT](https://github.com/migueleliasweb/go-github-mock/blob/v1.3.0/LICENSE)) - - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.1.0/LICENSE)) + - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/SamMorrowDrums/go-sdk/blob/d56ca1559a02/LICENSE)) - [github.com/muesli/cache2go](https://pkg.go.dev/github.com/muesli/cache2go) ([BSD-3-Clause](https://github.com/muesli/cache2go/blob/518229cd8021/LICENSE.txt)) - [github.com/pelletier/go-toml/v2](https://pkg.go.dev/github.com/pelletier/go-toml/v2) ([MIT](https://github.com/pelletier/go-toml/blob/v2.2.4/LICENSE)) - [github.com/sagikazarmark/locafero](https://pkg.go.dev/github.com/sagikazarmark/locafero) ([MIT](https://github.com/sagikazarmark/locafero/blob/v0.11.0/LICENSE)) @@ -39,12 +39,12 @@ Some packages may only be included on certain architectures or operating systems - [github.com/subosito/gotenv](https://pkg.go.dev/github.com/subosito/gotenv) ([MIT](https://github.com/subosito/gotenv/blob/v1.6.0/LICENSE)) - [github.com/yosida95/uritemplate/v3](https://pkg.go.dev/github.com/yosida95/uritemplate/v3) ([BSD-3-Clause](https://github.com/yosida95/uritemplate/blob/v3.0.2/LICENSE)) - [github.com/yudai/golcs](https://pkg.go.dev/github.com/yudai/golcs) ([MIT](https://github.com/yudai/golcs/blob/ecda9a501e82/LICENSE)) - - [go.yaml.in/yaml/v3](https://pkg.go.dev/go.yaml.in/yaml/v3) ([MIT](https://github.com/yaml/go-yaml/blob/v3.0.4/LICENSE)) + - [go.yaml.in/yaml/v3](https://pkg.go.dev/go.yaml.in/yaml/v3) ([MIT](Unknown)) - [golang.org/x/exp](https://pkg.go.dev/golang.org/x/exp) ([BSD-3-Clause](https://cs.opensource.google/go/x/exp/+/8a7402ab:LICENSE)) - [golang.org/x/net/html](https://pkg.go.dev/golang.org/x/net/html) ([BSD-3-Clause](https://cs.opensource.google/go/x/net/+/v0.38.0:LICENSE)) - [golang.org/x/sys/unix](https://pkg.go.dev/golang.org/x/sys/unix) ([BSD-3-Clause](https://cs.opensource.google/go/x/sys/+/v0.31.0:LICENSE)) - [golang.org/x/text](https://pkg.go.dev/golang.org/x/text) ([BSD-3-Clause](https://cs.opensource.google/go/x/text/+/v0.28.0:LICENSE)) - [golang.org/x/time/rate](https://pkg.go.dev/golang.org/x/time/rate) ([BSD-3-Clause](https://cs.opensource.google/go/x/time/+/v0.5.0:LICENSE)) - - [gopkg.in/yaml.v2](https://pkg.go.dev/gopkg.in/yaml.v2) ([Apache-2.0](https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE)) + - [gopkg.in/yaml.v2](https://pkg.go.dev/gopkg.in/yaml.v2) ([Apache-2.0](Unknown)) [github/github-mcp-server]: https://github.com/github/github-mcp-server diff --git a/third-party-licenses.windows.md b/third-party-licenses.windows.md index c7e00fb13..05bcfc9b4 100644 --- a/third-party-licenses.windows.md +++ b/third-party-licenses.windows.md @@ -25,7 +25,7 @@ Some packages may only be included on certain architectures or operating systems - [github.com/mailru/easyjson](https://pkg.go.dev/github.com/mailru/easyjson) ([MIT](https://github.com/mailru/easyjson/blob/v0.7.7/LICENSE)) - [github.com/microcosm-cc/bluemonday](https://pkg.go.dev/github.com/microcosm-cc/bluemonday) ([BSD-3-Clause](https://github.com/microcosm-cc/bluemonday/blob/v1.0.27/LICENSE.md)) - [github.com/migueleliasweb/go-github-mock/src/mock](https://pkg.go.dev/github.com/migueleliasweb/go-github-mock/src/mock) ([MIT](https://github.com/migueleliasweb/go-github-mock/blob/v1.3.0/LICENSE)) - - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/modelcontextprotocol/go-sdk/blob/v1.1.0/LICENSE)) + - [github.com/modelcontextprotocol/go-sdk](https://pkg.go.dev/github.com/modelcontextprotocol/go-sdk) ([MIT](https://github.com/SamMorrowDrums/go-sdk/blob/d56ca1559a02/LICENSE)) - [github.com/muesli/cache2go](https://pkg.go.dev/github.com/muesli/cache2go) ([BSD-3-Clause](https://github.com/muesli/cache2go/blob/518229cd8021/LICENSE.txt)) - [github.com/pelletier/go-toml/v2](https://pkg.go.dev/github.com/pelletier/go-toml/v2) ([MIT](https://github.com/pelletier/go-toml/blob/v2.2.4/LICENSE)) - [github.com/sagikazarmark/locafero](https://pkg.go.dev/github.com/sagikazarmark/locafero) ([MIT](https://github.com/sagikazarmark/locafero/blob/v0.11.0/LICENSE)) @@ -40,12 +40,12 @@ Some packages may only be included on certain architectures or operating systems - [github.com/subosito/gotenv](https://pkg.go.dev/github.com/subosito/gotenv) ([MIT](https://github.com/subosito/gotenv/blob/v1.6.0/LICENSE)) - [github.com/yosida95/uritemplate/v3](https://pkg.go.dev/github.com/yosida95/uritemplate/v3) ([BSD-3-Clause](https://github.com/yosida95/uritemplate/blob/v3.0.2/LICENSE)) - [github.com/yudai/golcs](https://pkg.go.dev/github.com/yudai/golcs) ([MIT](https://github.com/yudai/golcs/blob/ecda9a501e82/LICENSE)) - - [go.yaml.in/yaml/v3](https://pkg.go.dev/go.yaml.in/yaml/v3) ([MIT](https://github.com/yaml/go-yaml/blob/v3.0.4/LICENSE)) + - [go.yaml.in/yaml/v3](https://pkg.go.dev/go.yaml.in/yaml/v3) ([MIT](Unknown)) - [golang.org/x/exp](https://pkg.go.dev/golang.org/x/exp) ([BSD-3-Clause](https://cs.opensource.google/go/x/exp/+/8a7402ab:LICENSE)) - [golang.org/x/net/html](https://pkg.go.dev/golang.org/x/net/html) ([BSD-3-Clause](https://cs.opensource.google/go/x/net/+/v0.38.0:LICENSE)) - [golang.org/x/sys/windows](https://pkg.go.dev/golang.org/x/sys/windows) ([BSD-3-Clause](https://cs.opensource.google/go/x/sys/+/v0.31.0:LICENSE)) - [golang.org/x/text](https://pkg.go.dev/golang.org/x/text) ([BSD-3-Clause](https://cs.opensource.google/go/x/text/+/v0.28.0:LICENSE)) - [golang.org/x/time/rate](https://pkg.go.dev/golang.org/x/time/rate) ([BSD-3-Clause](https://cs.opensource.google/go/x/time/+/v0.5.0:LICENSE)) - - [gopkg.in/yaml.v2](https://pkg.go.dev/gopkg.in/yaml.v2) ([Apache-2.0](https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE)) + - [gopkg.in/yaml.v2](https://pkg.go.dev/gopkg.in/yaml.v2) ([Apache-2.0](Unknown)) [github/github-mcp-server]: https://github.com/github/github-mcp-server