Skip to main content

objectiveai_sdk/mcp/tool/
text.rs

1//! Text content block.
2
3use indexmap::IndexMap;
4use schemars::JsonSchema;
5use serde::{Deserialize, Serialize};
6
7/// Text content.
8#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
9#[schemars(rename = "mcp.tool.TextContent")]
10pub struct TextContent {
11    /// The text content of the message.
12    pub text: String,
13    /// Optional annotations for the client.
14    #[serde(skip_serializing_if = "Option::is_none")]
15    #[schemars(extend("omitempty" = true))]
16    pub annotations: Option<super::super::shared::Annotations>,
17    /// Extension metadata.
18    #[serde(skip_serializing_if = "Option::is_none")]
19    #[schemars(extend("omitempty" = true))]
20    pub _meta: Option<IndexMap<String, serde_json::Value>>,
21}