# ol.llx.ai.impl.utils.tool-validation

_platforms: clj, cljs_

## validate-tool-call

### clj

_platforms: clj_

```clojure
(validate-tool-call tools tool-call)
```

Validates tool-call arguments against the matching tool `:input-schema`.

Returns validated arguments on success.

Throws `ExceptionInfo` with structured `ex-data`:
- `{:type :ol.llx/tool-not-found ...}` when `tool-call` name is unknown.
- `{:type :ol.llx/validation-error ...}` when arguments do not satisfy the schema.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/impl/utils/tool_validation.cljc#L11-L30)

### cljs

_platforms: cljs_

```clojure
(validate-tool-call tools tool-call)
```

Validates tool-call arguments against the matching tool `:input-schema`.

Returns validated arguments on success.

Throws `ExceptionInfo` with structured `ex-data`:
- `{:type :ol.llx/tool-not-found ...}` when `tool-call` name is unknown.
- `{:type :ol.llx/validation-error ...}` when arguments do not satisfy the schema.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/impl/utils/tool_validation.cljc#L11-L30)
