The tool call a ToolFunction handler is running, when its caller knows it: read as SafeParameterExtractor.call. An agent supplies it for every call it runs; plain ToolRegistry tool calling, outside an agent, has no call to describe and leaves it None.
A tool with an external side effect passes idempotencyKey to the system it calls (an Idempotency-Key header, a client token, a unique column), because an agent may run the same call more than once - a retrying middleware, recover after a failure or crash, an approval - and it is the same in every run of one call. The runtime runs a tool at least once, never exactly once; the key de-duplicates only where the external system honours it.
Growth-prone: build it with ToolCallInfo(...) and change it with the with* setters.
Value parameters
- idempotencyKey
-
the same in every run of this call, and different for every other call
- toolCallId
-
the id the model gave the call
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any