pub struct CanonicalToolMeta {
pub kind: ToolKind,
pub namespace: ToolNamespace,
pub label: Option<String>,
pub side_effects: Option<String>,
pub token_bucket: Option<TokenBucket>,
}Expand description
Canonical metadata envelope attached to a tool registration.
The _meta wrapper keeps the envelope distinct from the tool’s functional
schema so downstream consumers can strip or override it without affecting
parameter validation.
Fields§
§kind: ToolKindSemantic category of the tool.
namespace: ToolNamespaceLogical owner of the tool.
label: Option<String>Human-readable label for UI grouping.
side_effects: Option<String>Short description of the tool’s side-effects (mutating, read-only, etc.).
token_bucket: Option<TokenBucket>Estimated token cost bucket (small < 500, medium < 2000, large >= 2000).
Implementations§
Source§impl CanonicalToolMeta
impl CanonicalToolMeta
Sourcepub fn new(kind: ToolKind, namespace: ToolNamespace) -> Self
pub fn new(kind: ToolKind, namespace: ToolNamespace) -> Self
Create a minimal metadata entry with kind and namespace.
Trait Implementations§
Source§impl Clone for CanonicalToolMeta
impl Clone for CanonicalToolMeta
Source§fn clone(&self) -> CanonicalToolMeta
fn clone(&self) -> CanonicalToolMeta
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 CanonicalToolMeta
impl Debug for CanonicalToolMeta
Source§impl<'de> Deserialize<'de> for CanonicalToolMeta
impl<'de> Deserialize<'de> for CanonicalToolMeta
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
Auto Trait Implementations§
impl Freeze for CanonicalToolMeta
impl RefUnwindSafe for CanonicalToolMeta
impl Send for CanonicalToolMeta
impl Sync for CanonicalToolMeta
impl Unpin for CanonicalToolMeta
impl UnsafeUnpin for CanonicalToolMeta
impl UnwindSafe for CanonicalToolMeta
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