mcp: small changes to CallTool structs (#60)

- Use `any` for CallToolResult.StructuredContent.

- Change the non-generic structs into aliases for the generic ones.
This commit is contained in:
Jonathan Amsterdam 2025-06-30 13:47:24 -04:00 • committed by GitHub
commit beed2f0677
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,6 @@ package mcp_test
import (
"encoding/json"
"fmt"
"log"
"testing"
"github.com/google/go-cmp/cmp"
@ -94,7 +93,6 @@ func TestContent(t *testing.T) {
t.Errorf("json.Marshal(%v) mismatch (-want +got):\n%s", test.in, diff)
}
result := fmt.Sprintf(`{"content":[%s]}`, string(got))
log.Println(result)
var out mcp.CallToolResult
if err := json.Unmarshal([]byte(result), &out); err != nil {
t.Fatal(err)