# `ZebbraCredo.Check.AshAiToolGuard`
[🔗](https://github.com/zebbra/zebbra_credo/blob/v1.0.0/lib/zebbra_credo/check/ash_ai_tool_guard.ex#L1)

## Basics

> #### This check is disabled by default. {: .neutral}
>
> [Learn how to enable it](`e:credo:config_file.html#checks`) via `.credo.exs`.

This check has a base priority of `high` and works with any version of Elixir.

## Explanation

Every tool call passes the Tool Guard. The loop takes `tools: false`, and
domain tools come from `build_tools_and_registry/1` with their names,
wrapped and passed as `extra_tools`. The `loop:` module sets these
options itself; a `ForbiddenCalls` rule keeps `AshAi.ToolLoop` in it.

## Check-Specific Parameters

Use the following parameters to configure this check:

### `:loop`

  The module that runs `AshAi.ToolLoop` (required); named in the messages.

*This parameter defaults to* `nil`.

### `:rules_doc`

  Path of the document that states these rules; named in the messages when set.

*This parameter defaults to* `nil`.

## General Parameters

Like with all checks, [general params](`e:credo:check_params.html`) can be applied.

Parameters can be configured via the [`.credo.exs` config file](`e:credo:config_file.html`).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
