Function tool_conditional_execution
Function tool_conditional_execution
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub fn tool_conditional_execution(name: &str, args: &Json) -> Result<()>
Run only the tool conditional-execution guardrail chain.
This evaluates whether a tool call should be allowed to proceed without invoking request intercepts or execution. Each evaluated guardrail emits an automatic guardrail scope start/end pair for observability.
Parameters
name: Tool name used when resolving the guardrail chain.args: Raw tool arguments to validate.
Returns
A Result that is Ok(()) when all guardrails allow execution.
Errors
Returns FlowError::GuardrailRejected when a guardrail blocks execution, or any error raised by the guardrail chain itself.
Notes
This helper is useful for preflight checks when the caller needs the rejection result without starting a tool span. Guardrail scopes are still emitted for the conditional checks themselves.