Function tool_call
Function tool_call
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.
pub fn tool_call(params: ToolCallParams<'_>) -> Result<ToolHandle>
Start a manual tool lifecycle span.
This submits a tool-start event for queued sanitize-request guardrails and publication without waiting for that work.
Parameters
name: Tool name recorded on the emitted lifecycle event.args: Raw tool arguments associated with the span.parent: Optional explicit parent scope.attributes: Tool attribute bitflags applied to the span.data: Optional application payload stored on the returned handle. The emitted start event data is the sanitizedargspayload.metadata: Optional JSON metadata recorded on the start event.tool_call_id: Optional provider-specific correlation identifier.timestamp: Optional timestamp recorded as the handle start time and on the emitted start event. WhenNone, the current UTC time is used.
Returns
A Result containing the created ToolHandle after its start-event snapshot has been submitted for queued publication.
Errors
Returns an error when the runtime owner check fails or when internal state cannot be read safely. Dispatcher submission failures are logged because observability publication is best effort.
Notes
Sanitize-request guardrails affect only the emitted start-event payload, not the caller-owned args value. If a sanitizer errors or panics, Relay omits that observability payload and does not run remaining sanitizers.