---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/transformers_js/helpers/variables/mistralToolCallParser.md
description: >-
  Parse Mistral tool calls — the `[TOOL_CALLS]` token followed by a JSON array
  of `{ name, arguments }`. Anchored on the literal `[TOOL_CALLS]` token.
---

# Variable: mistralToolCallParser

```ts
const mistralToolCallParser: ToolCallParserFn;
```

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

Parse Mistral tool calls — the `[TOOL_CALLS]` token followed by a JSON array of
`{ name, arguments }`. Anchored on the literal `[TOOL_CALLS]` token.

## Remarks

The array is located by a string-aware balanced-bracket scan from the first `[` after the token (same
approach as [phiToolCallParser](phiToolCallParser.md)), so a `]` inside a string argument value (e.g.
`{"text":"a]b"}`) does not truncate the array the way the old greedy `\[[\s\S]*\]` regex did.
