-
Notifications
You must be signed in to change notification settings - Fork 462
Closed
Description
rust-sdk/crates/rmcp/src/model.rs
Lines 1265 to 1272 in 984cd87
| /// Validate that content and structured_content are mutually exclusive | |
| pub fn validate(&self) -> Result<(), &'static str> { | |
| match (&self.content, &self.structured_content) { | |
| (Some(_), Some(_)) => Err("content and structured_content are mutually exclusive"), | |
| (None, None) => Err("either content or structured_content must be provided"), | |
| _ => Ok(()), | |
| } | |
| } |
use python/fastmcp will return both content and structured_content
Result:
- CallToolResult {
content: Some(
[
Annotated {
raw: Text(
RawTextContent {
text: "2025-08-06 14:24:47",
},
),
annotations: None,
},
],
),
structured_content: Some(
Object {
"result": String("2025-08-06 14:24:47"),
},
),
is_error: Some(
false,
),
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels