---
url: >-
  https://adk.nht.io/api/batteries/orchestration/reason/functions/validateReasonerOutput.md
---

# Function: validateReasonerOutput()

```ts
function validateReasonerOutput(
  schema: Schema,
  args: Record<string, EncodableValue>,
): string | true;
```

Defined in: [src/batteries/orchestration/reason.ts:101](https://github.com/NHTIO/ADK/blob/v1.20260906.0/src/src/batteries/orchestration/reason.ts#L101)

Validate captured tool arguments against the decoded schema, returning a discriminated
result rather than throwing.

## Parameters

| Parameter | Type                                                                                                                                                                                                             | Description                             |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| `schema`  | `Schema`                                                                                                                                                                                                         | The decoded output schema               |
| `args`    | [`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<`string`, [`EncodableValue`](../../../../@nhtio/adk/batteries/orchestration/types/type-aliases/EncodableValue.md)> | The captured tool arguments to validate |

## Returns

`string` | `true`

`true` if validation succeeds, or the validation error message if it fails
