Skip to main content

register_tool_request_intercept

Function register_tool_request_intercept 

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

Register a global tool request intercept. Request intercepts can rewrite tool arguments before execution.

§Parameters

  • name: Unique middleware name in the global registry.
  • 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::AlreadyExists when the name is already in use or an internal error if the runtime state cannot be updated.