pub struct ToolExecutionGrant {
pub manifest: ToolManifest,
pub contract: Box<ToolContract>,
pub source_id: Option<String>,
pub execution_binding: Value,
}Expand description
Explicit authority to execute a tool outside Tool Catalog membership.
Normal tool calls are authorized by catalog membership. A grant is a separate, caller-provided capability used by deferred resolution flows: it carries the manifest/contract to validate the call plus an opaque host execution binding that providers can inspect from the prepare and execute contexts.
Fields§
§manifest: ToolManifestTool identity and model-facing metadata authorized by the grant.
contract: Box<ToolContract>Contract used to validate granted call arguments without consulting the current Tool Catalog.
source_id: Option<String>Explicit registry source route for registry-backed execution. Direct
non-registry providers may ignore this; [ToolRegistry] requires it.
execution_binding: ValueOpaque host routing payload passed to prepare and execute contexts.
Implementations§
Source§impl ToolExecutionGrant
impl ToolExecutionGrant
pub fn new(manifest: ToolManifest, contract: ToolContract) -> ToolExecutionGrant
pub fn from_definition(definition: ToolDefinition) -> ToolExecutionGrant
pub fn with_source_id(self, source_id: impl Into<String>) -> ToolExecutionGrant
pub fn with_execution_binding( self, execution_binding: Value, ) -> ToolExecutionGrant
Trait Implementations§
Source§impl Clone for ToolExecutionGrant
impl Clone for ToolExecutionGrant
Source§fn clone(&self) -> ToolExecutionGrant
fn clone(&self) -> ToolExecutionGrant
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 ToolExecutionGrant
impl Debug for ToolExecutionGrant
Source§impl<'de> Deserialize<'de> for ToolExecutionGrant
impl<'de> Deserialize<'de> for ToolExecutionGrant
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolExecutionGrant, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolExecutionGrant, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for ToolExecutionGrant
impl Serialize for ToolExecutionGrant
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for ToolExecutionGrant
impl RefUnwindSafe for ToolExecutionGrant
impl Send for ToolExecutionGrant
impl Sync for ToolExecutionGrant
impl Unpin for ToolExecutionGrant
impl UnsafeUnpin for ToolExecutionGrant
impl UnwindSafe for ToolExecutionGrant
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