# `LlmCore.Agent.Components.ParseToolCalls`
[🔗](https://github.com/fosferon/llm_core/blob/v0.3.0/lib/llm_core/agent/components/parse_tool_calls.ex#L1)

Extracts tool calls from the LLM response.

If the response contains no tool calls (or an empty list), sets
`decision` to `{:done, response}` — the LLM has produced a final text
response and no further iteration is needed.

If tool calls are present, populates `ctx.tool_calls` for downstream
stages.

Analogous to a context merge stage: takes
raw input and normalizes it into the pipeline's working format.

# `call`

```elixir
@spec call(
  LlmCore.Agent.Context.t(),
  keyword()
) :: LlmCore.Agent.Context.t()
```

Extracts tool calls from `ctx.response.tool_calls`.

Short-circuits when `ctx.status` is `:error`.

## Parameters

  * `ctx` — `%Context{}` with the LLM response
  * `opts` — ALF stage options (unused)

## Returns

  Updated `%Context{}` with either:
  * `tool_calls` populated and pipeline continues, or
  * `decision: {:done, response}` when no tool calls are present

---

*Consult [api-reference.md](api-reference.md) for complete listing*
