Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Provide feedback

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

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

perf: integrate go-sdk mcpgen code generator (Phase 3)#1535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge12 commits intomain
base:main
Choose a base branch
Loading
fromcopilot/integrate-mcpgen-code-generator

Conversation

Copy link
Contributor

CopilotAI commentedDec 4, 2025
edited
Loading

Closes: #1532

Integrates themcpgen code generator from the go-sdk fork to generate zero-reflectionSchemaProvider implementations for tool input types, and wires up tools to use typed handlers with generated schemas.

Changes

  • go.mod: Replace directive to useSamMorrowDrums/go-sdk fork with schema caching,SchemaProvider interface, and improved enum support
  • pkg/github/tool_inputs.go: Typed input structs withjson/jsonschema tags for 94 tool input types withgo:generate directive for mcpgen
  • pkg/github/github_mcp_gen.go: GeneratedMCPSchema() andMCPResolvedSchema() implementations (4435 lines)
  • pkg/github/search.go: Wired up all search tools to use typed handlers
  • pkg/github/context_tools.go: Wired upGetMe tool to use typed handler
  • pkg/github/repositories.go: Wired upForkRepository,ListBranches,ListTags,ListReleases,GetLatestRelease,GetReleaseByTag tools to use typed handlers

Tools Wired Up (11 tools)

The following tools have been migrated frommap[string]any handlers to typed handlers:

  • Search (4 tools):search_repositories,search_code,search_users,search_orgs
  • User (1 tool):get_me
  • Repositories (6 tools):fork_repository,list_branches,list_tags,list_releases,get_latest_release,get_release_by_tag

Tool Input Types Added (94 total)

  • Search: SearchRepositoriesInput, SearchCodeInput, SearchUsersInput, SearchIssuesInput, SearchPullRequestsInput, SearchOrgsInput
  • Files: GetFileContentsInput, CreateOrUpdateFileInput, PushFilesInput, DeleteFileInput
  • Issues: CreateIssueInput, IssueReadInput, IssueWriteInput, ListIssuesInput, ListIssueTypesInput, AddIssueCommentInput, SubIssueWriteInput, AssignCopilotToIssueInput
  • Pull Requests: CreatePullRequestInput, ListPullRequestsInput, PullRequestReadInput, UpdatePullRequestInput, MergePullRequestInput, UpdatePullRequestBranchInput, RequestCopilotReviewInput, PullRequestReviewWriteInput, AddCommentToPendingReviewInput
  • Commits: ListCommitsInput, GetCommitInput
  • Branches/Tags: ListBranchesInput, ListTagsInput, CreateBranchInput, GetTagInput
  • Releases: ListReleasesInput, GetReleaseByTagInput, GetLatestReleaseInput
  • Actions: ListWorkflowsInput, ListWorkflowRunsInput, GetWorkflowRunInput, ListWorkflowJobsInput, GetJobLogsInput, GetWorkflowRunLogsInput, GetWorkflowRunUsageInput, ListWorkflowRunArtifactsInput, DownloadWorkflowRunArtifactInput, CancelWorkflowRunInput, RerunWorkflowRunInput, RerunFailedJobsInput, DeleteWorkflowRunLogsInput, RunWorkflowInput
  • Notifications: ListNotificationsInput, GetNotificationDetailsInput, ManageNotificationSubscriptionInput, ManageRepositoryNotificationSubscriptionInput, MarkAllNotificationsReadInput, DismissNotificationInput
  • Gists: ListGistsInput, GetGistInput, CreateGistInput, UpdateGistInput
  • Labels: ListLabelsInput, GetLabelInput, LabelWriteInput
  • Discussions: ListDiscussionsInput, GetDiscussionInput, GetDiscussionCommentsInput, ListDiscussionCategoriesInput
  • Projects: ListProjectsInput, GetProjectInput, ListProjectItemsInput, GetProjectItemInput, AddProjectItemInput, UpdateProjectItemInput, DeleteProjectItemInput, ListProjectFieldsInput, GetProjectFieldInput
  • Stars: StarRepositoryInput, UnstarRepositoryInput, ListStarredRepositoriesInput
  • Security: ListCodeScanningAlertsInput, GetCodeScanningAlertInput, ListSecretScanningAlertsInput, GetSecretScanningAlertInput, ListDependabotAlertsInput, GetDependabotAlertInput, ListGlobalSecurityAdvisoriesInput, GetGlobalSecurityAdvisoryInput, ListOrgRepositorySecurityAdvisoriesInput, ListRepositorySecurityAdvisoriesInput
  • Teams: GetTeamsInput, GetTeamMembersInput
  • Other: GetMeInput, GetRepositoryTreeInput, ForkRepositoryInput, CreateRepositoryInput

Example

// Define input type with jsonschema tagstypeCreateIssueInputstruct {Ownerstring`json:"owner" jsonschema:"required,description=Repository owner"`Titlestring`json:"title" jsonschema:"required,description=Issue title"`}// mcpgen generates:func (CreateIssueInput)MCPSchema()*jsonschema.Schema {return_createissueinputSchema// pre-computed at init}func (CreateIssueInput)MCPResolvedSchema()*jsonschema.Resolved {return_createissueinputResolved// pre-resolved, ready for validation}

Wiring Pattern

Each tool is converted from:

funcTool(...) (mcp.Tool, mcp.ToolHandlerFor[map[string]any,any])

to:

funcTool(...) (mcp.Tool, mcp.ToolHandlerFor[TypedInput,any])

Changes per tool:

  1. Change return type to use typed input
  2. SetInputSchema: TypedInput{}.MCPSchema()
  3. Update handler to use struct field access instead ofRequiredParam/OptionalParam
  4. Update tests to pass typed input
  5. Update toolsnaps

Tradeoffs

  • All 94 input types are created with generated SchemaProvider implementations. 11 tools are fully wired up; remaining ~83 tools can be migrated incrementally using the established pattern.
  • Fork dependency required until schema caching/SchemaProvider lands in upstream go-sdk.

Alternatives

  • Manual SchemaProvider implementations: Rejected—error-prone and tedious for 90+ tools.
  • Wait for upstream: Rejected—performance benefits available now via fork.
Original prompt

This section details on the original issue you should resolve

<issue_title>perf: integrate go-sdk mcpgen code generator (Phase 3)</issue_title>
<issue_description>## Summary

Integrate themcpgen code generator from the go-sdk fork to generate zero-reflection schema implementations for all tool input types.

Background

Building on Phase 1 (schema caching) and Phase 2 (SchemaProvider interface), this phase uses themcpgen code generator to automatically generateSchemaProvider implementations, achieving zero runtime reflection.

Implementation

1. Update go.mod to use the fork

Add a replace directive to use the optimized fork:

replacegithub.com/modelcontextprotocol/go-sdk=>github.com/SamMorrowDrums/go-sdkv0.0.0-20251204142831-b450c9exxxxx

Or use the branch reference:

replacegithub.com/modelcontextprotocol/go-sdk=>github.com/SamMorrowDrums/go-sdkperf/phase3-mcpgen

2. Install mcpgen

go install github.com/SamMorrowDrums/go-sdk/cmd/mcpgen@perf/phase3-mcpgen

3. Add go:generate directives to tool input types

For each package with tool input structs, add generate directives:

// pkg/github/search.go//go:generate mcpgen -type=SearchRepositoriesInput,SearchCodeInput,SearchUsersInput

4. Run go generate

go generate ./...

This creates*_mcp_gen.go files withSchemaProvider implementations.

5. Verify all tests pass

gotest ./...

Example Generated Code

For a type like:

typeCreateIssueInputstruct {Titlestring`json:"title" jsonschema:"required,description=Issue title"`Bodystring`json:"body"`}

mcpgen generates:

// Code generated by mcpgen. DO NOT EDIT.var_createissueinputSchema=&jsonschema.Schema{Type:"object",Properties:map[string]*jsonschema.Schema{"title": {Type:"string",Description:"Issue title"},"body":  {Type:"string"},    },Required: []string{"title"},}var_createissueinputResolved,_=_createissueinputSchema.Resolve(nil)func (CreateIssueInput)MCPSchema()*jsonschema.Schema {return_createissueinputSchema}func (CreateIssueInput)MCPResolvedSchema()*jsonschema.Resolved {return_createissueinputResolved}

Expected Impact

  • Zero runtime reflection for schema generation
  • Pre-resolved schemas skip resolution step
  • Compile-time validation of schema correctness

Fork Branch

Dependencies

This builds on:

Comments on the Issue (you are@copilot in this section)

  • Fixes github/github-mcp-server#1532

💬 We'd love your input! Share your thoughts on Copilot coding agent in our2 minute survey.

CopilotAIand others added2 commitsDecember 4, 2025 13:53
- Add replace directive in go.mod to use fork with schema caching- Create tool input types with jsonschema tags (tool_inputs.go)- Add go:generate directive for mcpgen code generator- Generate SchemaProvider implementations (github_mcp_gen.go)This enables zero-reflection schema generation for tool input types,with pre-computed and pre-resolved schemas for improved performance.Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
CopilotAI changed the title[WIP] Integrate mcpgen code generator for zero-reflection schemasperf: integrate go-sdk mcpgen code generator (Phase 3)Dec 4, 2025
@SamMorrowDrums
Copy link
Collaborator

@copilot OK can you do evn more tools

Add 18 additional tool input types with SchemaProvider implementations:- SearchIssuesInput, SearchPullRequestsInput- ListCommitsInput, GetCommitInput- ListBranchesInput, ListTagsInput- ListReleasesInput, GetReleaseByTagInput- ListWorkflowsInput, ListWorkflowRunsInput, GetWorkflowRunInput- ListNotificationsInput, GetRepositoryTreeInput- CreateBranchInput, CreateOrUpdateFileInput, PushFilesInput- ForkRepositoryInput, CreateRepositoryInputGenerated file now has 1186 lines with zero-reflection schemas for 24 tool input types.Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Copy link
ContributorAuthor

CopilotAI commentedDec 4, 2025

@copilot OK can you do evn more tools

Added 18 more tool input types (24 total now) with SchemaProvider implementations indb4a16f:

  • Search tools: SearchIssuesInput, SearchPullRequestsInput
  • Commit tools: ListCommitsInput, GetCommitInput
  • Branch/tag tools: ListBranchesInput, ListTagsInput, CreateBranchInput
  • Release tools: ListReleasesInput, GetReleaseByTagInput
  • Workflow tools: ListWorkflowsInput, ListWorkflowRunsInput, GetWorkflowRunInput
  • File tools: CreateOrUpdateFileInput, PushFilesInput
  • Repo tools: GetRepositoryTreeInput, ForkRepositoryInput, CreateRepositoryInput
  • ListNotificationsInput

Generated file is now 1186 lines with zero-reflection schemas.

@SamMorrowDrums
Copy link
Collaborator

@copilot OK great enum support is better and is now documented and working and tested so again update mcpgen to latesy

Updated fork reference to d56ca15 which includes:- Better enum support documentation- Improved enum handling in mcpgenCo-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Copy link
ContributorAuthor

CopilotAI commentedDec 4, 2025

@copilot OK great enum support is better and is now documented and working and tested so again update mcpgen to latesy

Updated to latest mcpgen (d56ca15) with improved enum support inaf75bf4. The generated schemas properly include enum values for fields like sort order and filter options.

@SamMorrowDrums
Copy link
Collaborator

@copilot OK can you do even more tool conversion... maybe even them all. It seems to work well, and you have patterns to copy now.

Wen you are done also run the licenses script.

Added 58 more tool input types with SchemaProvider implementations:- User: GetMeInput- Gists: ListGistsInput, GetGistInput, CreateGistInput, UpdateGistInput- Labels: ListLabelsInput, GetLabelInput- Discussions: ListDiscussionsInput, GetDiscussionInput, GetDiscussionCommentsInput, ListDiscussionCategoriesInput- Projects: ListProjectsInput, GetProjectInput, ListProjectItemsInput, GetProjectItemInput, AddProjectItemInput, UpdateProjectItemInput, DeleteProjectItemInput- Pull Requests: ListPullRequestsInput, PullRequestReadInput, UpdatePullRequestInput, MergePullRequestInput, UpdatePullRequestBranchInput, RequestCopilotReviewInput- Issues: IssueReadInput, IssueWriteInput, ListIssuesInput, ListIssueTypesInput, AddIssueCommentInput- Stars: StarRepositoryInput, UnstarRepositoryInput, ListStarredRepositoriesInput- Security: ListCodeScanningAlertsInput, GetCodeScanningAlertInput, ListSecretScanningAlertsInput, GetSecretScanningAlertInput, ListDependabotAlertsInput, GetDependabotAlertInput- Releases: GetLatestReleaseInput, GetTagInput- Actions: ListWorkflowJobsInput, GetJobLogsInput, GetWorkflowRunLogsInput, GetWorkflowRunUsageInput, ListWorkflowRunArtifactsInput, DownloadWorkflowRunArtifactInput, CancelWorkflowRunInput, RerunWorkflowRunInput, RerunFailedJobsInput, DeleteWorkflowRunLogsInput, RunWorkflowInput- Notifications: GetNotificationDetailsInput, ManageNotificationSubscriptionInput, ManageRepositoryNotificationSubscriptionInput, MarkAllNotificationsReadInput, DismissNotificationInput- Teams: GetTeamsInput, GetTeamMembersInput- Files: DeleteFileInputGenerated file now has 3791 lines with zero-reflection schemas for 82 tool input types.Also ran script/licenses to update third-party license files.Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Copy link
ContributorAuthor

CopilotAI commentedDec 4, 2025
edited
Loading

@copilot OK can you do even more tool conversion... maybe even them all. It seems to work well, and you have patterns to copy now.

Wen you are done also run the licenses script.

Added 58 more tool input types (82 total now) with SchemaProvider implementations inc6e13cb. The generated file is now 3791 lines covering:

  • User, Gists, Labels, Discussions
  • Projects (list, get, add, update, delete items)
  • Pull Requests (list, read, update, merge, branch updates, Copilot review)
  • Issues (read, write, list, types, comments)
  • Stars (star, unstar, list starred)
  • Security (code scanning, secret scanning, Dependabot alerts)
  • Actions (jobs, logs, artifacts, run/rerun workflows)
  • Notifications (details, subscriptions, dismiss)
  • Teams (get teams, members)
  • Files (delete)

Also ranscript/licenses to update the third-party license files.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • go.yaml.in
    • Triggering command:/home/REDACTED/go/bin/go-licenses go-licenses report ./... --template .github/licenses.tmpl -c=4 -nolocalimports -importcfg /tmp/go-build2194475700/b277/importcfg -pack /home/REDACTED/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/config/branch.go /home/REDACTED/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/config/config.go -I yV1a/QGKVzzvXF8W. -I (dns block)
    • Triggering command:/home/REDACTED/go/bin/go-licenses go-licenses report ./... --template .github/licenses.tmpl -c=4 -nolocalimports -importcfg /tmp/go-build2194475700/b305/importcfg -pack /home/REDACTED/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/plumbing/format/diff/patch.go /home/REDACTED/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/plumbing/format/diff/unified_encoder.go -I /opt/hostedtoolc. -I ux_amd64/vet --gdwarf-5 1615715/b009/ -o ux_amd64/vet (dns block)
    • Triggering command:/home/REDACTED/go/bin/go-licenses go-licenses report ./... --template .github/licenses.tmpl -c=4 -nolocalimports -importcfg /tmp/go-build2194475700/b309/importcfg -pack /home/REDACTED/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/utils/merkletrie/internal/frame/frame.go (dns block)
  • gopkg.in
    • Triggering command:/home/REDACTED/go/bin/go-licenses go-licenses report ./... --template .github/licenses.tmpl -c=4 -nolocalimports -importcfg /tmp/go-build2194475700/b277/importcfg -pack /home/REDACTED/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/config/branch.go /home/REDACTED/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/config/config.go -I yV1a/QGKVzzvXF8W. -I (dns block)
    • Triggering command:/home/REDACTED/go/bin/go-licenses go-licenses report ./... --template .github/licenses.tmpl -c=4 -nolocalimports -importcfg /tmp/go-build2194475700/b305/importcfg -pack /home/REDACTED/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/plumbing/format/diff/patch.go /home/REDACTED/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/plumbing/format/diff/unified_encoder.go -I /opt/hostedtoolc. -I ux_amd64/vet --gdwarf-5 1615715/b009/ -o ux_amd64/vet (dns block)
    • Triggering command:/home/REDACTED/go/bin/go-licenses go-licenses report ./... --template .github/licenses.tmpl -c=4 -nolocalimports -importcfg /tmp/go-build2194475700/b309/importcfg -pack /home/REDACTED/go/pkg/mod/gopkg.in/src-d/go-git.v4@v4.13.1/utils/merkletrie/internal/frame/frame.go (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@SamMorrowDrums
Copy link
Collaborator

@copilot Are there any more tools to convert? Yo can now get to 100%

Copy link
ContributorAuthor

CopilotAI commentedDec 4, 2025

@copilot Are there any more tools to convert? Yo can now get to 100%

You're right to ask - the generated schemas arenot actually being used by the tools yet. The current tools use inlinejsonschema.Schema definitions withmap[string]any handlers.

To actually use the generated schemas, each tool would need to be refactored from:

mcp.ToolHandlerFor[map[string]any,any]

to:

mcp.ToolHandlerFor[SearchRepositoriesInput,any]

This is a larger migration. The current PR sets up the foundation (input types + generatedSchemaProvider implementations), but the tools haven't been migrated to consume them yet.

Remaining tools that don't have input types yet:

  • search_orgs
  • sub_issue_write
  • label_write
  • pull_request_review_write
  • add_comment_to_pending_review
  • assign_copilot_to_issue
  • list_project_fields,get_project_field
  • list_global_security_advisories,get_global_security_advisory
  • list_org_repository_security_advisories,list_repository_security_advisories
  • enable_toolset,list_available_toolsets,get_toolset_tools

Should I:

  1. Add the remaining input types for completeness, OR
  2. Focus on actually wiring up the generated schemas to be used by tools?

@SamMorrowDrums
Copy link
Collaborator

@copilot Make a long todo list for converstion of each remaining tool input types first, and then make a wiring ip todo item for every single tool, noce all converted

Copy link
ContributorAuthor

CopilotAI commentedDec 4, 2025

@copilot Make a long todo list for converstion of each remaining tool input types first, and then make a wiring ip todo item for every single tool, noce all converted

TODO: Complete mcpgen Integration

Phase 1: Remaining Input Types to Create (12 types)

  • SearchOrgsInput forsearch_orgs
  • SubIssueWriteInput forsub_issue_write
  • LabelWriteInput forlabel_write
  • PullRequestReviewWriteInput forpull_request_review_write
  • AddCommentToPendingReviewInput foradd_comment_to_pending_review
  • AssignCopilotToIssueInput forassign_copilot_to_issue
  • ListProjectFieldsInput forlist_project_fields
  • GetProjectFieldInput forget_project_field
  • ListGlobalSecurityAdvisoriesInput forlist_global_security_advisories
  • GetGlobalSecurityAdvisoryInput forget_global_security_advisory
  • ListOrgRepositorySecurityAdvisoriesInput forlist_org_repository_security_advisories
  • ListRepositorySecurityAdvisoriesInput forlist_repository_security_advisories

Note: Toolset management tools (enable_toolset,list_available_toolsets,get_toolset_tools) are meta-tools that don't need typed inputs.

Phase 2: Wire Up Generated Schemas (94 tools)

Search (6 tools)

  • search_repositoriesSearchRepositoriesInput
  • search_codeSearchCodeInput
  • search_usersSearchUsersInput
  • search_issuesSearchIssuesInput
  • search_pull_requestsSearchPullRequestsInput
  • search_orgsSearchOrgsInput

Files (4 tools)

  • get_file_contentsGetFileContentsInput
  • create_or_update_fileCreateOrUpdateFileInput
  • push_filesPushFilesInput
  • delete_fileDeleteFileInput

Repositories (4 tools)

  • get_repository_treeGetRepositoryTreeInput
  • fork_repositoryForkRepositoryInput
  • create_repositoryCreateRepositoryInput
  • create_branchCreateBranchInput

Commits/Branches/Tags (5 tools)

  • list_commitsListCommitsInput
  • get_commitGetCommitInput
  • list_branchesListBranchesInput
  • list_tagsListTagsInput
  • get_tagGetTagInput

Releases (3 tools)

  • list_releasesListReleasesInput
  • get_release_by_tagGetReleaseByTagInput
  • get_latest_releaseGetLatestReleaseInput

Issues (8 tools)

  • issue_readIssueReadInput
  • issue_writeIssueWriteInput
  • list_issuesListIssuesInput
  • list_issue_typesListIssueTypesInput
  • add_issue_commentAddIssueCommentInput
  • sub_issue_writeSubIssueWriteInput
  • assign_copilot_to_issueAssignCopilotToIssueInput
  • issue_to_fix_workflow (internal - skip)

Pull Requests (8 tools)

  • create_pull_requestCreatePullRequestInput
  • list_pull_requestsListPullRequestsInput
  • pull_request_readPullRequestReadInput
  • update_pull_requestUpdatePullRequestInput
  • merge_pull_requestMergePullRequestInput
  • update_pull_request_branchUpdatePullRequestBranchInput
  • request_copilot_reviewRequestCopilotReviewInput
  • pull_request_review_writePullRequestReviewWriteInput
  • add_comment_to_pending_reviewAddCommentToPendingReviewInput

Labels (3 tools)

  • list_labelListLabelsInput
  • get_labelGetLabelInput
  • label_writeLabelWriteInput

Discussions (4 tools)

  • list_discussionsListDiscussionsInput
  • get_discussionGetDiscussionInput
  • get_discussion_commentsGetDiscussionCommentsInput
  • list_discussion_categoriesListDiscussionCategoriesInput

Projects (8 tools)

  • list_projectsListProjectsInput
  • get_projectGetProjectInput
  • list_project_itemsListProjectItemsInput
  • get_project_itemGetProjectItemInput
  • add_project_itemAddProjectItemInput
  • update_project_itemUpdateProjectItemInput
  • delete_project_itemDeleteProjectItemInput
  • list_project_fieldsListProjectFieldsInput
  • get_project_fieldGetProjectFieldInput

Gists (4 tools)

  • list_gistsListGistsInput
  • get_gistGetGistInput
  • create_gistCreateGistInput
  • update_gistUpdateGistInput

Stars (3 tools)

  • star_repositoryStarRepositoryInput
  • unstar_repositoryUnstarRepositoryInput
  • list_starred_repositoriesListStarredRepositoriesInput

Notifications (5 tools)

  • list_notificationsListNotificationsInput
  • get_notification_detailsGetNotificationDetailsInput
  • manage_notification_subscriptionManageNotificationSubscriptionInput
  • manage_repository_notification_subscriptionManageRepositoryNotificationSubscriptionInput
  • mark_all_notifications_readMarkAllNotificationsReadInput
  • dismiss_notificationDismissNotificationInput

Actions/Workflows (14 tools)

  • list_workflowsListWorkflowsInput
  • list_workflow_runsListWorkflowRunsInput
  • get_workflow_runGetWorkflowRunInput
  • list_workflow_jobsListWorkflowJobsInput
  • get_job_logsGetJobLogsInput
  • get_workflow_run_logsGetWorkflowRunLogsInput
  • get_workflow_run_usageGetWorkflowRunUsageInput
  • list_workflow_run_artifactsListWorkflowRunArtifactsInput
  • download_workflow_run_artifactDownloadWorkflowRunArtifactInput
  • cancel_workflow_runCancelWorkflowRunInput
  • rerun_workflow_runRerunWorkflowRunInput
  • rerun_failed_jobsRerunFailedJobsInput
  • delete_workflow_run_logsDeleteWorkflowRunLogsInput
  • run_workflowRunWorkflowInput

Security (10 tools)

  • list_code_scanning_alertsListCodeScanningAlertsInput
  • get_code_scanning_alertGetCodeScanningAlertInput
  • list_secret_scanning_alertsListSecretScanningAlertsInput
  • get_secret_scanning_alertGetSecretScanningAlertInput
  • list_dependabot_alertsListDependabotAlertsInput
  • get_dependabot_alertGetDependabotAlertInput
  • list_global_security_advisoriesListGlobalSecurityAdvisoriesInput
  • get_global_security_advisoryGetGlobalSecurityAdvisoryInput
  • list_org_repository_security_advisoriesListOrgRepositorySecurityAdvisoriesInput
  • list_repository_security_advisoriesListRepositorySecurityAdvisoriesInput

Teams (2 tools)

  • get_teamsGetTeamsInput
  • get_team_membersGetTeamMembersInput

User (1 tool)

  • get_meGetMeInput

Summary: 12 input types to create, then ~94 tools to wire up.

@SamMorrowDrums
Copy link
Collaborator

@copilot Now do it!

CopilotAIand others added2 commitsDecember 4, 2025 15:17
Added input types for:- SearchOrgsInput- SubIssueWriteInput- LabelWriteInput- PullRequestReviewWriteInput- AddCommentToPendingReviewInput- AssignCopilotToIssueInput- ListProjectFieldsInput, GetProjectFieldInput- ListGlobalSecurityAdvisoriesInput, GetGlobalSecurityAdvisoryInput- ListOrgRepositorySecurityAdvisoriesInput, ListRepositorySecurityAdvisoriesInputGenerated file now has 4435 lines with zero-reflection schemas for 94 tool input types.Phase 1 of TODO complete: All input types created.Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
- Change SearchRepositories to use mcp.ToolHandlerFor[SearchRepositoriesInput, any]- Use SearchRepositoriesInput.MCPSchema() for InputSchema- Handler receives typed struct instead of map[string]any- Update tests to use typed input- Update toolsnaps to reflect the new schemaThis demonstrates the pattern for wiring up tools to use generated schemas.Pattern established for remaining 90+ tools.Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Copy link
ContributorAuthor

CopilotAI commentedDec 4, 2025

@copilot Now do it!

Started wiring up tools in5e3c7a2. CompletedSearchRepositories as the first example.

Scope: This is a large refactoring - each of 90+ tools requires:

  1. Changing function signature toToolHandlerFor[TypedInput, any]
  2. SettingInputSchema: TypedInput{}.MCPSchema()
  3. Updating handler to use struct fields instead ofRequiredParam/OptionalParam
  4. Updating tests to pass typed input
  5. Updating toolsnaps

Complexities found:

  • Shared handlers likeuserOrOrgHandler (used by SearchUsers & SearchOrgs) need refactoring
  • Some tools have complex nested schemas that may need adjustment

I can continue wiring up more tools - shall I proceed with batches, or would you prefer a different approach for this scale of change?

@SamMorrowDrums
Copy link
Collaborator

@copilot COntinue wiring up more tools now a pattern is establised with SearchRepositories as the first example.

- SearchRepositories: SearchRepositoriesInput (already done)- SearchCode: SearchCodeInput- SearchUsers: SearchUsersInput (with generic userOrOrgHandlerTyped)- SearchOrgs: SearchOrgsInput (with generic userOrOrgHandlerTyped)Created userOrOrgSearchInput interface with generic handler for shareduser/org search functionality. Updated all search tests to use typed inputs.Updated toolsnaps for all search tools.Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Copy link
ContributorAuthor

CopilotAI commentedDec 4, 2025

@copilot COntinue wiring up more tools now a pattern is establised with SearchRepositories as the first example.

Completed all 4 search tools inad64c47:

  • SearchRepositoriesSearchRepositoriesInput
  • SearchCodeSearchCodeInput
  • SearchUsersSearchUsersInput
  • SearchOrgsSearchOrgsInput

Created a genericuserOrOrgHandlerTyped[T] to share handler logic between users/orgs search. Continuing with more tools now.

CopilotAIand others added3 commitsDecember 4, 2025 16:33
- GetMe: GetMeInput (empty struct for tool with no parameters)- ForkRepository: ForkRepositoryInputUpdated tests and toolsnaps for both tools.Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
- ListBranches: ListBranchesInput- ListTags: ListTagsInputUpdated tests and toolsnaps for both tools.Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
- ListReleases: ListReleasesInput- GetLatestRelease: GetLatestReleaseInput- GetReleaseByTag: GetReleaseByTagInputUpdated tests and toolsnaps for all release tools.Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@SamMorrowDrumsSamMorrowDrumsAwaiting requested review from SamMorrowDrums

At least 1 approving review is required to merge this pull request.

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp