pub struct ToolInvocation {
pub invocation_id: String,
pub session_id: String,
pub server_id: String,
pub tool_name: String,
pub args: Value,
pub descriptor_hash: String,
pub requested_at: i64,
}Expand description
一次工具调用请求。
生命周期:client → MCP Hub → ToolInvocation → Firewall → DecisionRecord → Execute。
Fields§
§invocation_id: String唯一 id(UUIDv4 文本)。
session_id: String归属 session。
server_id: String目标 server。
tool_name: Stringupstream 工具名。
args: Value原始参数(来自 MCP tools/call 的 arguments 字段)。
descriptor_hash: String调用时 pin 的 descriptor hash;若漂移则本次调用需重新审批。
requested_at: i64请求到达时间(Unix epoch 秒)。
Trait Implementations§
Source§impl Clone for ToolInvocation
impl Clone for ToolInvocation
Source§fn clone(&self) -> ToolInvocation
fn clone(&self) -> ToolInvocation
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 ToolInvocation
impl Debug for ToolInvocation
Source§impl<'de> Deserialize<'de> for ToolInvocation
impl<'de> Deserialize<'de> for ToolInvocation
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 ToolInvocation
Source§impl PartialEq for ToolInvocation
impl PartialEq for ToolInvocation
Source§fn eq(&self, other: &ToolInvocation) -> bool
fn eq(&self, other: &ToolInvocation) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ToolInvocation
impl Serialize for ToolInvocation
impl StructuralPartialEq for ToolInvocation
Auto Trait Implementations§
impl Freeze for ToolInvocation
impl RefUnwindSafe for ToolInvocation
impl Send for ToolInvocation
impl Sync for ToolInvocation
impl Unpin for ToolInvocation
impl UnsafeUnpin for ToolInvocation
impl UnwindSafe for ToolInvocation
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