> This page is for NeMo Relay, version Latest (v0.11.2) (default).
> For other versions, use one of these documentation indexes:
> - Latest (v0.11.2) (default): https://docs.nvidia.com/nemo/relay/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/relay/dev/llms.txt
> - v0.11.2: https://docs.nvidia.com/nemo/relay/v0.11.2/llms.txt
> - v0.10.4: https://docs.nvidia.com/nemo/relay/v0.10.4/llms.txt
> - v0.9.4: https://docs.nvidia.com/nemo/relay/v0.9.4/llms.txt
> - v0.8.4: https://docs.nvidia.com/nemo/relay/v0.8.4/llms.txt
> - v0.7.3: https://docs.nvidia.com/nemo/relay/v0.7.3/llms.txt

> For clean Markdown of any page, append .md to the page URL. For a task-oriented documentation index, fetch https://docs.nvidia.com/nemo/relay/llms.txt. Use the documentation version matching the installed NeMo Relay package: latest follows the latest stable release, vX.Y.Z identifies a retained release snapshot, and dev documents development changes. Preserve the selected version when following links; do not mix examples or API contracts from different versions. Fetch the relevant section's /llms.txt before individual pages instead of loading a complete version index.

# Function nemo_relay_register_tool_request_intercept

> Register a tool request intercept. The callback can transform tool arguments before execution. Runs after request guardrails in the middleware pipeline.

Generated from `cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker`.

<pre />

Register a tool request intercept. The callback can transform tool arguments before execution. Runs after request guardrails in the middleware pipeline.

## Parameters

* `name`: Unique intercept name.
* `priority`: Execution priority (lower runs first).
* `break_chain`: If true, stop processing further intercepts after this one.
* `cb`: Transform callback that receives tool name and args JSON, returns modified args JSON.
* `user_data`: Opaque pointer passed to `cb`.
* `free_fn`: Optional destructor for `user_data`.

The callback is fallible. To signal failure, call [`crate::error::nemo_relay_set_last_error_message`](/reference/api/rust-library-reference/nemo-relay-ffi/error/fn-nemo-relay-set-last-error-message) from C and return null.

## Safety

`name` must be a valid C string. `cb` must be a valid function pointer.