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

platforms: clj, cljs

validate-tool-call

clj

platforms: clj

(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.

cljs

platforms: cljs

(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.