Skip to main content

objectiveai_sdk/mcp/tool/
image.rs

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