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:
parent
c6b229c855
commit
328a25d503
1 changed files with 6 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue