Skip to main content

scope_register_tool_request_intercept

Function scope_register_tool_request_intercept 

Source
pub fn scope_register_tool_request_intercept(
    scope_uuid: &Uuid,
    name: &str,
    priority: i32,
    break_chain: bool,
    callable: ToolInterceptFn,
) -> Result<()>
Expand description

Register a scope-local tool request intercept. Request intercepts can rewrite tool arguments inside the owning scope.

§Parameters

  • scope_uuid: UUID of the active scope that owns the middleware.
  • name: Unique middleware name within that scope.
  • priority: Lower values run earlier in the chain.
  • break_chain: Whether the intercept should stop later request intercepts after it returns.
  • callable: Intercept callback stored under name.

§Returns

A Result that is Ok(()) when the intercept was registered.

§Errors

Returns FlowError::NotFound when the scope is not active, FlowError::AlreadyExists when the name is already in use on that scope, or an internal error if the runtime owner check fails.