mcp: ensure meta is not skipped on blob ResourceContents (#96)

I noticed this while working on #95. Seems Meta was accidentally skipped
in the custom wire format struct.
This commit is contained in:
Martin Emde 2025-07-04 11:35:33 -07:00 • committed by GitHub
commit 328a25d503
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,6 +154,10 @@ func TestEmbeddedResource(t *testing.T) {
&mcp.ResourceContents{URI: "u", Blob: []byte{1}},
`{"uri":"u","blob":"AQ=="}`,
},
{
&mcp.ResourceContents{URI: "u", MIMEType: "m", Blob: []byte{1}, Meta: mcp.Meta{"key": "value"}},
`{"uri":"u","mimeType":"m","blob":"AQ==","_meta":{"key":"value"}}`,
},
} {
data, err := json.Marshal(tt.rc)
if err != nil {