pub struct McpPolicyConfig {
pub enforce_for_mutations: bool,
pub require_approval_for: Vec<String>,
pub blocked_tools: Vec<String>,
pub dry_run_mutations: bool,
pub max_mutations_per_hour: u32,
pub template: Option<PolicyTemplateName>,
pub rules: Vec<PolicyRule>,
pub rate_limits: Vec<PolicyRateLimit>,
}Expand description
MCP mutation policy configuration.
Controls whether MCP mutation tools (post, reply, like, follow, etc.) are gated by policy checks before execution.
v2 fields (template, rules, rate_limits) are additive — existing
v1 configs deserialize without changes.
Fields§
§enforce_for_mutations: boolMaster switch: when false, all mutations are allowed without checks.
require_approval_for: Vec<String>Tool names that require routing through the approval queue.
blocked_tools: Vec<String>Tool names that are completely blocked from execution.
dry_run_mutations: boolWhen true, mutations return a dry-run response without executing.
max_mutations_per_hour: u32Maximum MCP mutations allowed per hour (aggregate across all tools).
template: Option<PolicyTemplateName>Optional named template to apply as the baseline rule set.
rules: Vec<PolicyRule>Explicit policy rules (user-defined). Evaluated by priority order.
rate_limits: Vec<PolicyRateLimit>Per-dimension rate limits (beyond the global max_mutations_per_hour).
Trait Implementations§
Source§impl Clone for McpPolicyConfig
impl Clone for McpPolicyConfig
Source§fn clone(&self) -> McpPolicyConfig
fn clone(&self) -> McpPolicyConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for McpPolicyConfig
impl Debug for McpPolicyConfig
Source§impl Default for McpPolicyConfig
impl Default for McpPolicyConfig
Source§impl<'de> Deserialize<'de> for McpPolicyConfig
impl<'de> Deserialize<'de> for McpPolicyConfig
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>,
Auto Trait Implementations§
impl Freeze for McpPolicyConfig
impl RefUnwindSafe for McpPolicyConfig
impl Send for McpPolicyConfig
impl Sync for McpPolicyConfig
impl Unpin for McpPolicyConfig
impl UnsafeUnpin for McpPolicyConfig
impl UnwindSafe for McpPolicyConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more