feat!: relax tool result structuredContent type (SEP-2106) (#933)
Re-applies #919 (reverted by #932): ToolResultContent.structured_content becomes Option<Value> so non-object structured content is accepted, matching CallToolResult and SEP-2106. BREAKING CHANGE: ToolResultContent.structured_content changes from Option<JsonObject> to Option<Value>.
This commit is contained in:
parent
f4ff56b81d
commit
ba00b15097
1 changed files with 40 additions and 30 deletions
|
|
@ -10,7 +10,7 @@
|
|||
// ToolUseContent/ToolResultContent are SEP-2577-deprecated; internal references are expected.
|
||||
#![expect(deprecated)]
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::json;
|
||||
use serde_json::{Value, json};
|
||||
|
||||
use super::{Annotations, Meta, resource::ResourceContents};
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ pub struct ToolResultContent {
|
|||
pub tool_use_id: String,
|
||||
pub content: Vec<ContentBlock>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub structured_content: Option<super::JsonObject>,
|
||||
pub structured_content: Option<Value>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub is_error: Option<bool>,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue