---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/transformers_js/helpers/functions/resolveToolCallParser.md
---

# Function: resolveToolCallParser()

```ts
function resolveToolCallParser(
  option: ToolCallParserName | ToolCallParserFn | undefined,
  parsers?: Partial<
    Record<Exclude<ToolCallParserName, "auto" | "none">, ToolCallParserFn>
  >,
): ToolCallParserFn;
```

Defined in: [src/batteries/llm/chat\_common/tool\_parsers.ts:1121](https://github.com/NHTIO/ADK/blob/v1.20260713.1/src/src/batteries/llm/chat_common/tool_parsers.ts#L1121)

Resolve a `toolCallParser` option (a name, `'auto'`, `'none'`, or a custom fn) to a concrete
[ToolCallParserFn](../type-aliases/ToolCallParserFn.md).

## Parameters

| Parameter | Type                                                                                                                                                                                                                                                                                                                                                                                                                                                | Default value               | Description                                                       |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ----------------------------------------------------------------- |
| `option`  | | [`ToolCallParserName`](../type-aliases/ToolCallParserName.md) | [`ToolCallParserFn`](../type-aliases/ToolCallParserFn.md) | `undefined`                                                                                                                                                                                                                                                                                                        | `undefined`                 | The option value. Defaults to `'auto'` when undefined.            |
| `parsers` | [`Partial`](https://www.typescriptlang.org/docs/handbook/utility-types.html#partialtype)<[`Record`](https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type)<[`Exclude`](https://www.typescriptlang.org/docs/handbook/utility-types.html#excludetype-excludedunion)<[`ToolCallParserName`](../type-aliases/ToolCallParserName.md), `"auto"` | `"none"`>, [`ToolCallParserFn`](../type-aliases/ToolCallParserFn.md)>> | `BUNDLED_TOOL_CALL_PARSERS` | Override the bundled family parsers (e.g. swap the Gemma parser). |

## Returns

[`ToolCallParserFn`](../type-aliases/ToolCallParserFn.md)
