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

Migrate actions toolset to modelcontextprotocol/go-sdk#1446

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

Merged
omgitsads merged 6 commits intoomgitsads/go-sdkfromcopilot/migrate-actions-toolset
Nov 24, 2025

Conversation

Copy link
Contributor

CopilotAI commentedNov 20, 2025
edited by omgitsads
Loading

Closes:https://github.com/github/copilot-agent-services/issues/906
Related to#1428

Migrates theactions toolset (17 tools) frommark3labs/mcp-go tomodelcontextprotocol/go-sdk.

Changes

Tool signatures

  • Return type:(mcp.Tool, server.ToolHandlerFunc)(mcp.Tool, mcp.ToolHandlerFor[map[string]any, any])
  • Handler:func(ctx, request) (*Result, error)func(ctx, *request, args) (*Result, any, error)

Schema definitions

  • Converted DSL-based schemas tojsonschema.Schema structures
  • Example:mcp.WithString("owner", mcp.Required())Properties: map[string]*jsonschema.Schema{"owner": {Type: "string"}}, Required: []string{"owner"}

Parameter extraction

  • Updated to extract fromargs map[string]any instead ofrequest.GetArguments()
  • ChangedRequiredParam[T](request, "key")RequiredParam[T](args, "key")

Result helpers

  • Replacedmcp.NewToolResultText/Error withutils.NewToolResultText/Error

Tests

  • Updated all handler invocations to pass 3 arguments and handle 3 return values
  • Addedjsonschema import and type assertions for schema validation

All 17 tools migrated: ListWorkflows, ListWorkflowRuns, RunWorkflow, GetWorkflowRun, GetWorkflowRunLogs, ListWorkflowJobs, GetJobLogs, RerunWorkflowRun, RerunFailedJobs, CancelWorkflowRun, ListWorkflowRunArtifacts, DownloadWorkflowRunArtifact, DeleteWorkflowRunLogs, GetWorkflowRunUsage, plus 3 helper functions.

Original prompt

Migrate theactions toolset to modelcontextprotocol/go-sdk.

This will be merged into the parent PR#1428, so reference that PR in the description to track the migration

Custom agent used: go-sdk-tool-migrator
Agent specializing in migrating MCP tools from mark3labs/mcp-go to modelcontextprotocol/go-sdk


✨ Let Copilot coding agentset things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Removed //go:build ignore tags from actions.go and actions_test.go- Updated imports to use modelcontextprotocol/go-sdk instead of mark3labs/mcp-go- Updated all tool constructor signatures to return new types- Converted all tool definitions from DSL format to jsonschema.Schema format- Updated tool handler signatures to use generics- Updated parameter extraction to use args map instead of request- Replaced mcp.NewToolResultText/Error with utils package functions- Updated all tests to work with new handler signature- Updated toolsnaps for all actions toolsCo-authored-by: omgitsads <4619+omgitsads@users.noreply.github.com>
CopilotAI changed the title[WIP] Migrate actions toolset to modelcontextprotocol/go-sdkMigrate actions toolset to modelcontextprotocol/go-sdkNov 20, 2025
CopilotAI requested a review fromomgitsadsNovember 20, 2025 10:30
Copilot finished work on behalf ofomgitsadsNovember 20, 2025 10:30
@LuluBeatsonLuluBeatson self-requested a reviewNovember 20, 2025 14:07
@LuluBeatsonLuluBeatson marked this pull request as ready for reviewNovember 20, 2025 15:18
@LuluBeatsonLuluBeatson requested a review froma team as acode ownerNovember 20, 2025 15:18
CopilotAI review requested due to automatic review settingsNovember 20, 2025 15:18
Copilot finished reviewing on behalf ofLuluBeatsonNovember 20, 2025 15:20
Copy link
Contributor

CopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR migrates theactions toolset (17 tools) frommark3labs/mcp-go tomodelcontextprotocol/go-sdk, updating tool signatures, schema definitions, parameter extraction, and result helpers to match the new SDK patterns.

Key Changes:

  • Updated all 17 action tools to use new SDK signatures:(mcp.Tool, mcp.ToolHandlerFor[map[string]any, any])
  • Converted DSL-based schemas tojsonschema.Schema structures with explicit type definitions
  • Migrated fromrequest.GetArguments() to directargs map[string]any parameter extraction

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

FileDescription
pkg/github/actions.goMigrated all 17 action tools to new SDK with updated signatures, jsonschema definitions, and utils result helpers
pkg/github/actions_test.goRemoved build ignore tag, updated all test invocations to 3-arg/3-return pattern, added toolsnap validation, and updated schema type assertions
pkg/github/tools.goUncommented and registered the actions toolset in the default toolset group
pkg/github/toolsnaps/*.snapAdded 14 new snapshot files documenting the JSON schema for each action tool

@LuluBeatson
Copy link
Contributor

There were no existing toolsnaps for actions tools before this migration. I've updatedactions_test.go to generate new ones.

To ensure that tool schemas were not changed by the migration, I connected to the local (dev) server and remote servers and saved their tools/list responses in JSON files. I then compared the two files using a (copilot written) python script. The script checked for equivalence ignoring order of fields and ignoring omission of defaults (e.g.readOnlyHint FALSE is equivalent to being omitted).

To ensure the tools still worked, I reviewed the PR diffs, ran tests. I also asked copilot to test all 14 tools:

Screenshotsimageimageimageimage

@omgitsadsomgitsads merged commit7fbf80d intoomgitsads/go-sdkNov 24, 2025
13 of 14 checks passed
@omgitsadsomgitsads deleted the copilot/migrate-actions-toolset branchNovember 24, 2025 11:58
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

@LuluBeatsonLuluBeatsonLuluBeatson approved these changes

@omgitsadsomgitsadsAwaiting requested review from omgitsads

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@LuluBeatson@omgitsads

[8]ページ先頭

©2009-2025 Movatter.jp