From c4d0ae41c76a014b2964fb8dfd498deab988b02c Mon Sep 17 00:00:00 2001 From: OpenWaygate <27287694+OpenWaygate@users.noreply.github.com> Date: Sun, 7 Dec 2025 00:30:58 +0800 Subject: [PATCH] :bug: Disabel required fields in mcp --- cmd/activity/list.go | 8 ++++---- cmd/mcp.go | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/activity/list.go b/cmd/activity/list.go index e1fe607..55e13b0 100644 --- a/cmd/activity/list.go +++ b/cmd/activity/list.go @@ -39,10 +39,10 @@ type listIn struct { var listInSchema = &jsonschema.Schema{ Type: "object", - Required: []string{ - "channelId", "home", "maxResults", "mine", "publishedAfter", - "publishedBefore", "regionCode", "parts", "output", "jsonpath", - }, + // Required: []string{ + // "channelId", "home", "maxResults", "mine", "publishedAfter", + // "publishedBefore", "regionCode", "parts", "output", "jsonpath", + // }, Properties: map[string]*jsonschema.Schema{ "channelId": { Type: "string", Description: ciUsage, Default: json.RawMessage(`""`), diff --git a/cmd/mcp.go b/cmd/mcp.go index 20aa8c1..522fd06 100644 --- a/cmd/mcp.go +++ b/cmd/mcp.go @@ -4,7 +4,6 @@ package cmd import ( - "context" "fmt" "log/slog" "net/http" @@ -43,7 +42,7 @@ var mcpCmd = &cobra.Command{ Long: mcpLong, Run: func(cmd *cobra.Command, args []string) { var err error - ctx := context.Background() + ctx := cmd.Context() addr := fmt.Sprintf(":%d", port) slog.InfoContext( ctx, "starting MCP server",