Interface: RawToolCall
Defined in: src/lib/classes/tool_call.ts:52
Plain input object supplied to ToolCall at construction time.
Remarks
Validated against rawToolCallSchema before the ToolCall instance is created. Temporal fields accept any value that Luxon can parse — ISO strings, Unix timestamps, Date objects, or existing DateTime instances.
Properties
| Property | Type | Default value | Description | Defined in |
|---|---|---|---|---|
args | | string | Record<string, unknown> | undefined | Arguments the model supplied for this tool call. Remarks Accepts either a plain object or a JSON-encoded string that deserialises to an object. Always exposed as a plain object on the constructed ToolCall instance. | src/lib/classes/tool_call.ts:64 |
checksum | string | undefined | Integrity checksum over tool and args; can be used to detect tampering before execution. | src/lib/classes/tool_call.ts:66 |
completedAt | string | number | Date | DateTime<boolean> | undefined | When the tool call completed. | src/lib/classes/tool_call.ts:139 |
createdAt | string | number | Date | DateTime<boolean> | undefined | When this tool call was first created. | src/lib/classes/tool_call.ts:135 |
fromArtifactTool? | boolean | false | true when this tool call originated from an @nhtio/adk!ArtifactTool invocation. Defaults to false. Remarks Set by the ADK's result-wrapping touch sites when ArtifactTool.isArtifactTool(tool) holds. Read by SpooledArtifact.forgeTools(ctx) when building each descriptor's callId enum — calls with this flag set are excluded so the model can't artifact_grep on a previous artifact_grep result. Optional in the raw shape (defaults to false); always defined on the constructed ToolCall. | src/lib/classes/tool_call.ts:106 |
id | string | undefined | Stable unique identifier for this tool call; correlates the request with its result. | src/lib/classes/tool_call.ts:54 |
inline? | boolean | false | When false (the default), the adapter surfaces a @nhtio/adk!SpooledArtifact result as a "handle" — a directions-bearing envelope that tells the model which forged artifact-query tools to call against this tc.id to read the content incrementally, keeping the body OUT of the prompt. When true, the adapter renders the result inline — the full stringified body wrapped in the adapter's trust envelope and sent to the model as the tool role content. Remarks Handle-by-default is the secure, budget-aligned posture: the LLM batteries already spool-wrap every non-@nhtio/adk!Media, non-@nhtio/adk!ArtifactTool tool result into a SpooledArtifact, so a result that could be arbitrarily large never lands in the next prompt just because nobody touched a flag — the core ADK context-window-diet principle (see the Budgets / Artifacts docs). Inlining is the OPT-IN: a producer that knows its output is small sets inline: true so the model sees the body verbatim without a query round-trip. Policy is the producer's or middleware's call (LLM adapters obey the flag — they never size-check the result or silently switch modes). Set per call at construction, or flip mid-turn via ctx.mutateToolCall(tc.id, { inline: true }). Handles only make sense for SpooledArtifact (the only result kind the forged artifact-query tools can read). For a @nhtio/adk!Tokenizable result (e.g. an ArtifactTool answer or an error string) the flag is moot — the adapter renders it inline regardless, since there is no queryable artifact to hand back. | src/lib/classes/tool_call.ts:133 |
isComplete | boolean | undefined | true once the tool call has finished (successfully or not). | src/lib/classes/tool_call.ts:68 |
isError | boolean | undefined | true when the tool execution produced an error; inspect results for detail. | src/lib/classes/tool_call.ts:70 |
results | ToolCallResults | undefined | Result returned by the tool, or error detail when isError is true. Remarks Three silos with distinct render-time semantics — see ToolCallResults: - For a normal @nhtio/adk!Tool call whose handler returned string or Uint8Array, this is a @nhtio/adk!SpooledArtifact (or one of its subclasses) wrapping the spooled bytes. Tools that legitimately produce multiple bounded artifacts may return a SpooledArtifact[]. - For a Tool call whose handler returned a @nhtio/adk!Media or Media[], this is the same media handle(s) — the explicit-modality silo bypasses SpooledArtifact wrapping because the bytes are binary and rendered as provider-specific content blocks, not text. - For an @nhtio/adk!ArtifactTool call (a forged artifact-query tool), this is a @nhtio/adk!Tokenizable holding the raw model-visible answer — ArtifactTool explicitly opts out of wrapping to break the recursive grep-on-the-grep-result loop. The ADK sets RawToolCall.fromArtifactTool on calls produced by an ArtifactTool so subsequent forgeTools(ctx) invocations can filter them out of the callId enum. | src/lib/classes/tool_call.ts:92 |
tool | string | undefined | Name of the tool the model has requested. | src/lib/classes/tool_call.ts:56 |
updatedAt | string | number | Date | DateTime<boolean> | undefined | When this tool call was last modified. | src/lib/classes/tool_call.ts:137 |