# prov.trace.assessments.guardTool

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

## Signature

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

## Parameters

- `action` (TraceActionInput)
- `fn` (() => R | Promise<R>)
- `opts` (GuardToolOptions, optional)

## Returns

`Promise<GuardToolResult<R>>`

Runs locally, with no request to the API.
