fix(rmcp): return serialized json with structured content (#368)
This commit is contained in:
parent
209dbac50f
commit
3d8e950a52
1 changed files with 46 additions and 8 deletions
|
|
@ -1229,7 +1229,7 @@ impl CallToolResult {
|
|||
/// ```
|
||||
pub fn structured(value: Value) -> Self {
|
||||
CallToolResult {
|
||||
content: None,
|
||||
content: Some(vec![Content::text(value.to_string())]),
|
||||
structured_content: Some(value),
|
||||
is_error: Some(false),
|
||||
}
|
||||
|
|
@ -1254,7 +1254,7 @@ impl CallToolResult {
|
|||
/// ```
|
||||
pub fn structured_error(value: Value) -> Self {
|
||||
CallToolResult {
|
||||
content: None,
|
||||
content: Some(vec![Content::text(value.to_string())]),
|
||||
structured_content: Some(value),
|
||||
is_error: Some(true),
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue