feat!: align metadata models with draft schema (#993)
This commit is contained in:
parent
92581bee53
commit
839922d8fd
1 changed files with 2539 additions and 1059 deletions
|
|
@ -1,10 +1,10 @@
|
|||
use rmcp::model::{CallToolResult, ContentBlock, Meta};
|
||||
use rmcp::model::{CallToolResult, ContentBlock, MetaObject};
|
||||
use serde_json::{Value, json};
|
||||
|
||||
#[test]
|
||||
fn serialize_tool_result_with_meta() {
|
||||
let content = vec![ContentBlock::text("ok")];
|
||||
let mut meta = Meta::new();
|
||||
let mut meta = MetaObject::new();
|
||||
meta.insert("foo".to_string(), json!("bar"));
|
||||
let result = CallToolResult::success(content).with_meta(Some(meta));
|
||||
let v = serde_json::to_value(&result).unwrap();
|
||||
|
|
|
|||
Loading…
Reference in a new issue