Skip to main content

objectiveai_sdk/mcp/tool/
embedded_resource.rs

1//! Embedded resource content block.
2
3use indexmap::IndexMap;
4use schemars::JsonSchema;
5use serde::{Deserialize, Serialize};
6
7/// The contents of a resource, embedded into a prompt or tool call result.
8#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
9#[schemars(rename = "mcp.tool.EmbeddedResource")]
10pub struct EmbeddedResource {
11    /// The embedded resource contents.
12    pub resource: super::super::shared::ResourceContentsUnion,
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}