---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/transformers_js/helpers/variables/hermesToolCallParser.md
description: >-
  Parse Hermes-style `<tool_call>{"name":…,"arguments":{…}}</tool_call>` tags.
  The de-facto standard, reused by Qwen2.5/Qwen3-Instruct. Anchored on the
  literal tags — zero collision with bare JSON.
---

# Variable: hermesToolCallParser

```ts
const hermesToolCallParser: ToolCallParserFn;
```

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

Parse Hermes-style `<tool_call>{"name":…,"arguments":{…}}</tool_call>` tags. The de-facto standard,
reused by Qwen2.5/Qwen3-Instruct. Anchored on the literal tags — zero collision with bare JSON.

## Remarks

The JSON object after each `<tool_call>` is located by a string-aware balanced-brace scan (not a lazy
`</tool_call>` regex), so an embedded `</tool_call>` or `{`/`}` inside a string argument value (e.g.
`{"text":"</tool_call>"}`) survives instead of truncating the call. The literal `</tool_call>` close
is still consumed for span removal when present immediately after the object.
