pub struct McpResource {
pub meta: Option<HashMap<String, Value>>,
pub additional_properties: Option<HashMap<String, Value>>,
pub annotations: Option<McpResourceAnnotations>,
pub description: Option<String>,
pub icons: Option<Vec<McpResourceIcon>>,
pub mime_type: Option<String>,
pub name: String,
pub size: Option<i64>,
pub title: Option<String>,
pub uri: String,
}Expand description
An MCP resource descriptor (spec Resource): URI, name, and optional title, description, MIME type, size, icons, annotations, and metadata. Server-provided fields outside the standard descriptor shape are exposed under additionalProperties.
Experimental. This type is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases.
Fields§
§meta: Option<HashMap<String, Value>>Resource-level metadata
additional_properties: Option<HashMap<String, Value>>Server-provided non-standard descriptor fields preserved from the MCP response
annotations: Option<McpResourceAnnotations>Model/client annotations associated with this resource
description: Option<String>Optional description of what this resource represents
icons: Option<Vec<McpResourceIcon>>Icons associated with this resource
mime_type: Option<String>MIME type of the resource, if known
name: StringThe programmatic name of the resource
size: Option<i64>Resource size in bytes, when known
title: Option<String>Optional human-readable display title
uri: StringThe resource URI (e.g. ui://… or file:///…)
Trait Implementations§
Source§impl Clone for McpResource
impl Clone for McpResource
Source§fn clone(&self) -> McpResource
fn clone(&self) -> McpResource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more