pub struct McpToolMetadata { /* private fields */ }Expand description
Optional application-facing metadata for a generated MCP tool.
Implementations§
Source§impl McpToolMetadata
impl McpToolMetadata
Sourcepub const fn with_title(self, title: &'static str) -> Self
pub const fn with_title(self, title: &'static str) -> Self
Set the human-readable tool title.
Sourcepub const fn with_description(self, description: &'static str) -> Self
pub const fn with_description(self, description: &'static str) -> Self
Set the human-readable tool description.
Sourcepub const fn with_read_only_hint(self, read_only: bool) -> Self
pub const fn with_read_only_hint(self, read_only: bool) -> Self
Set the MCP read-only hint.
Sourcepub const fn with_destructive_hint(self, destructive: bool) -> Self
pub const fn with_destructive_hint(self, destructive: bool) -> Self
Set the MCP destructive hint.
Sourcepub const fn with_idempotent_hint(self, idempotent: bool) -> Self
pub const fn with_idempotent_hint(self, idempotent: bool) -> Self
Set the MCP idempotent hint.
Sourcepub const fn with_open_world_hint(self, open_world: bool) -> Self
pub const fn with_open_world_hint(self, open_world: bool) -> Self
Set the MCP open-world hint.
Sourcepub const fn with_icons(self, icons: &'static [McpToolIcon]) -> Self
pub const fn with_icons(self, icons: &'static [McpToolIcon]) -> Self
Set static icon metadata for the generated tool definition.
Sourcepub const fn description(self) -> Option<&'static str>
pub const fn description(self) -> Option<&'static str>
Returns the human-readable tool description.
Sourcepub const fn read_only_hint(self) -> Option<bool>
pub const fn read_only_hint(self) -> Option<bool>
Returns the MCP read-only hint.
Sourcepub const fn destructive_hint(self) -> Option<bool>
pub const fn destructive_hint(self) -> Option<bool>
Returns the MCP destructive hint.
Sourcepub const fn idempotent_hint(self) -> Option<bool>
pub const fn idempotent_hint(self) -> Option<bool>
Returns the MCP idempotent hint.
Sourcepub const fn open_world_hint(self) -> Option<bool>
pub const fn open_world_hint(self) -> Option<bool>
Returns the MCP open-world hint.
Sourcepub const fn icons(self) -> &'static [McpToolIcon]
pub const fn icons(self) -> &'static [McpToolIcon]
Returns static icon metadata.
Sourcepub fn tool_annotations(self) -> Option<McpToolAnnotations>
pub fn tool_annotations(self) -> Option<McpToolAnnotations>
Converts metadata hints into MCP tool annotations.
Sourcepub fn tool_icons(self) -> Option<Vec<McpIcon>>
pub fn tool_icons(self) -> Option<Vec<McpIcon>>
Converts static icon metadata into MCP icon definitions.
Sourcepub fn validate(self) -> Result<(), McpToolError>
pub fn validate(self) -> Result<(), McpToolError>
Validate generated tool metadata.
§Errors
Returns McpToolError when hints conflict or text/icon metadata is
invalid.
Trait Implementations§
Source§impl Clone for McpToolMetadata
impl Clone for McpToolMetadata
impl Copy for McpToolMetadata
Source§impl Debug for McpToolMetadata
impl Debug for McpToolMetadata
Source§impl Default for McpToolMetadata
impl Default for McpToolMetadata
impl Eq for McpToolMetadata
Source§impl PartialEq for McpToolMetadata
impl PartialEq for McpToolMetadata
impl StructuralPartialEq for McpToolMetadata
Auto Trait Implementations§
impl Freeze for McpToolMetadata
impl RefUnwindSafe for McpToolMetadata
impl Send for McpToolMetadata
impl Sync for McpToolMetadata
impl Unpin for McpToolMetadata
impl UnsafeUnpin for McpToolMetadata
impl UnwindSafe for McpToolMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.