SDK reference · Node SDK

prov.trace.assessments.guardTool

prov.trace.assessments.guardTool in Node SDK. Assess action, then run fn only on allow.

Signature

prov.trace.assessments.guardTool<R>(action: TraceActionInput, fn: () => R | Promise<R>, opts?: GuardToolOptions): Promise<GuardToolResult<R>>

Parameters

actionTraceActionInputRequired
fn() => R | Promise<R>Required
optsGuardToolOptions

Returns

Promise<GuardToolResult<R>>

HTTP operation

Runs locally, with no request to the API.

Was this page helpful? Send us feedback

LLM? Read llms.txt.