Skip to content

Commit 2f92a5d

Browse files
committed
refactor: update arguments usage according to update from mark3labs/mcp-go
1 parent ff00f24 commit 2f92a5d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pkg/tools/connect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (t *Connect) Tool() mcp.Tool {
9292
func (t *Connect) Handler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
9393

9494
// Verify docs read proof
95-
proof, err := args.String(request.Params.Arguments, "docs_proof")
95+
proof, err := args.String(request.GetArguments(), "docs_proof")
9696
if err != nil {
9797
return nil, fmt.Errorf("bad request: %w", err)
9898
}

pkg/tools/docs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func (t *Docs) Handler(ctx context.Context, request mcp.CallToolRequest) (*mcp.C
7272
)
7373

7474
// Extract article IDs from request parameters if provided
75-
val, ok := request.Params.Arguments["articles"]
75+
val, ok := request.GetArguments()["articles"]
7676
if ok && val != nil {
7777
articleIDs = val.([]any)
7878
} else {

pkg/tools/query.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ func (t *Query) Tool() mcp.Tool {
8080
func (t *Query) Handler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
8181

8282
// Extract the required and optional arguments from the request
83-
requireds, err1 := args.Strings(request.Params.Arguments, "query", "account")
84-
optionals, err2 := args.MaybeStrings(request.Params.Arguments, "database", "engine")
83+
requireds, err1 := args.Strings(request.GetArguments(), "query", "account")
84+
optionals, err2 := args.MaybeStrings(request.GetArguments(), "database", "engine")
8585
if err := errors.Join(err1, err2); err != nil {
8686
return nil, fmt.Errorf("bad request: %w", err)
8787
}

0 commit comments

Comments
 (0)