pub struct TrustScope {
pub name: String,
pub min_trust: f32,
pub allowed_tools: Vec<String>,
pub denied_tools: Vec<String>,
pub allow_destructive: bool,
pub allow_network: bool,
pub allow_filesystem_write: bool,
pub require_review: bool,
pub max_calls_per_minute: u32,
}Expand description
Trust scope — defines what external MCP servers are allowed to do.
Fields§
§name: StringName of this trust scope (e.g., “default”, “strict”, “external”).
min_trust: f32Minimum trust level required for tool execution.
allowed_tools: Vec<String>Allowed tool name patterns (empty = all allowed).
denied_tools: Vec<String>Denied tool name patterns (takes precedence over allowed).
allow_destructive: boolWhether destructive tools are allowed.
allow_network: boolWhether network access tools are allowed.
allow_filesystem_write: boolWhether filesystem write tools are allowed.
require_review: boolWhether human review is required for all tools in this scope.
max_calls_per_minute: u32Maximum number of tool calls per minute (0 = unlimited).
Implementations§
Source§impl TrustScope
impl TrustScope
Sourcepub fn permissive() -> Self
pub fn permissive() -> Self
Permissive scope for trusted internal servers.
Sourcepub fn is_tool_allowed(&self, manifest: &ToolManifest) -> bool
pub fn is_tool_allowed(&self, manifest: &ToolManifest) -> bool
Check if a tool is allowed under this trust scope.
Trait Implementations§
Source§impl Clone for TrustScope
impl Clone for TrustScope
Source§impl Debug for TrustScope
impl Debug for TrustScope
Source§impl Default for TrustScope
impl Default for TrustScope
Source§impl<'de> Deserialize<'de> for TrustScope
impl<'de> Deserialize<'de> for TrustScope
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 TrustScope
impl RefUnwindSafe for TrustScope
impl Send for TrustScope
impl Sync for TrustScope
impl Unpin for TrustScope
impl UnsafeUnpin for TrustScope
impl UnwindSafe for TrustScope
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