Function tool_call_end

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

pub fn tool_call_end(params: ToolCallEndParams<'_>) -> Result<()>

Finish a manual tool lifecycle span.

This emits a tool-end event for a handle previously returned by tool_call.

Parameters

  • handle: Tool handle to close.
  • result: Raw tool result associated with the end event.
  • data: Optional application payload retained for compatibility. The emitted end event data is the sanitized result unless it sanitizes to JSON null, in which case this payload is used.
  • metadata: Optional JSON metadata recorded on the end event.
  • timestamp: Optional timestamp recorded on the emitted end event. When None, the runtime uses the current UTC time, or one microsecond after the handle start time if the current time is not later.

Returns

A Result that is Ok(()) when the end event has been emitted.

Errors

Returns an error when the runtime owner check fails or when internal state cannot be read safely.

Notes

Sanitize-response guardrails affect only the emitted end-event payload, not the caller-owned result value.