feat(rmcp): add optional _meta to CallToolResult, EmbeddedResource, and ResourceContents (#386)

* feat(rmcp): support optional _meta on EmbeddedResource and ResourceContents

- Add optional _meta to RawEmbeddedResource and ResourceContents (text/blob)
- Update constructors/usages to set meta: None by default
- Add tests to lock behavior (embedded text/blob + CallToolResult)
- Update JSON Schemas to include optional _meta fields

* style(rmcp): rustfmt after _meta changes and tests
This commit is contained in:
Andrew Harvard 2025-09-02 13:47:09 -04:00 • committed by GitHub
commit 7d46b39b49
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -149,12 +149,14 @@ impl PromptMessage {
uri,
mime_type: Some(mime_type),
text: text.unwrap_or_default(),
meta: None,
};
Self {
role,
content: PromptMessageContent::Resource {
resource: RawEmbeddedResource {
meta: None,
resource: resource_contents,
}
.optional_annotate(annotations),