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 discussions toolset to modelcontextprotocol/go-sdk#1448

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

Conversation

Copy link
Contributor

CopilotAI commentedNov 20, 2025
edited
Loading

Closes: Part of#1428

Description

Migrates thediscussions toolset frommark3labs/mcp-go tomodelcontextprotocol/go-sdk.

Changes

Tool Function Signatures

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

Schema Definitions

  • Converted from DSL to explicit JSON Schema structures:
// Beforemcp.NewTool("list_discussions",mcp.WithString("owner",mcp.Required(),mcp.Description("...")),mcp.WithString("repo",mcp.Description("...")),)// Aftermcp.Tool{Name:"list_discussions",InputSchema:&jsonschema.Schema{Type:"object",Properties:map[string]*jsonschema.Schema{"owner": {Type:"string",Description:"..."},"repo": {Type:"string",Description:"..."},        },Required: []string{"owner"},    },}

Parameter Extraction

  • Changed fromrequest.Params.Arguments to directargs map[string]any parameter
  • Result helpers moved toutils package:utils.NewToolResultError(),utils.NewToolResultText()

Test Updates

  • Handler calls:handler(ctx, req)handler(ctx, &req, reqParams)
  • Capture 3 return values:res, _, err := handler(...)
  • Addedtoolsnaps.Test() calls for schema validation
  • CastInputSchema to*jsonschema.Schema for property access

Migrated Tools

  • list_discussions
  • get_discussion
  • get_discussion_comments
  • list_discussion_categories

All 4 toolsnap files created and validated.

Original prompt

Migrate thediscussions 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


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

@notjoannaakl
Copy link

test

CopilotAI changed the title[WIP] Migrate discussions toolset to modelcontextprotocol/go-sdkMigrate discussions 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 15:52
@LuluBeatson
Copy link
Contributor

imageimage

@LuluBeatsonLuluBeatson marked this pull request as ready for reviewNovember 20, 2025 16:44
@LuluBeatsonLuluBeatson requested a review froma team as acode ownerNovember 20, 2025 16:44
CopilotAI review requested due to automatic review settingsNovember 20, 2025 16:44
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 successfully migrates thediscussions toolset frommark3labs/mcp-go tomodelcontextprotocol/go-sdk, as part of the broader SDK migration effort tracked in#1428.

Key Changes:

  • Updated function signatures to returnmcp.ToolHandlerFor[map[string]any, any] instead ofserver.ToolHandlerFunc
  • Converted tool definitions from DSL-based to explicit JSON Schema structures
  • Modified parameter extraction to useargs map[string]any directly instead ofrequest.Params.Arguments
  • Updated all error handling and result helpers to use theutils package

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

FileDescription
pkg/github/discussions.goMigrated 4 discussion tools (list_discussions, get_discussion, get_discussion_comments, list_discussion_categories) to new SDK with updated signatures and schema definitions
pkg/github/discussions_test.goUpdated tests to match new handler signatures, added toolsnap validation, and updated schema assertions to use*jsonschema.Schema type casting
pkg/github/tools.goUncommented and re-enabled the discussions toolset registration in the default toolset group
pkg/github/__toolsnaps__/*.snapAdded 4 new toolsnap files documenting the JSON schemas for all discussion tools

@omgitsadsomgitsads merged commit4042338 intoomgitsads/go-sdkNov 24, 2025
13 of 14 checks passed
@omgitsadsomgitsads deleted the copilot/migrate-discussions-toolset branchNovember 24, 2025 10:40
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.

4 participants

@notjoannaakl@LuluBeatson@omgitsads

[8]ページ先頭

©2009-2025 Movatter.jp