pub struct ParameterMetadata {
pub name: String,
pub typescript_type: String,
pub required: bool,
pub description: Option<String>,
}Expand description
Structured metadata for a single tool parameter.
§Examples
use mcp_execution_core::metadata::ParameterMetadata;
let param = ParameterMetadata {
name: "title".to_string(),
typescript_type: "string".to_string(),
required: true,
description: Some("Issue title".to_string()),
};
assert!(param.required);Fields§
§name: StringParameter name.
typescript_type: StringTypeScript type (e.g. string, number, boolean).
required: boolWhether the parameter is required.
description: Option<String>Parameter description, sourced from the tool’s input JSON Schema.
Trait Implementations§
Source§impl Clone for ParameterMetadata
impl Clone for ParameterMetadata
Source§fn clone(&self) -> ParameterMetadata
fn clone(&self) -> ParameterMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParameterMetadata
impl Debug for ParameterMetadata
Source§impl<'de> Deserialize<'de> for ParameterMetadata
impl<'de> Deserialize<'de> for ParameterMetadata
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ParameterMetadata
Source§impl PartialEq for ParameterMetadata
impl PartialEq for ParameterMetadata
Source§fn eq(&self, other: &ParameterMetadata) -> bool
fn eq(&self, other: &ParameterMetadata) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ParameterMetadata
impl Serialize for ParameterMetadata
impl StructuralPartialEq for ParameterMetadata
Auto Trait Implementations§
impl Freeze for ParameterMetadata
impl RefUnwindSafe for ParameterMetadata
impl Send for ParameterMetadata
impl Sync for ParameterMetadata
impl Unpin for ParameterMetadata
impl UnsafeUnpin for ParameterMetadata
impl UnwindSafe for ParameterMetadata
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