Interface: RawArtifactTool
Plain input object supplied to ArtifactTool at construction time.
Remarks
Mirrors the base RawTool except artifactConstructor is forbidden — an ArtifactTool emits a @nhtio/adk!Tokenizable directly into ToolCall.results and explicitly opts out of SpooledArtifact wrapping. The forbidden field is enforced by ArtifactTool.schema at construction time.
Properties
| Property | Type | Default value | Description |
|---|---|---|---|
description | string | undefined | Human-readable description passed to the model to explain what the tool does. |
ephemeral? | boolean | false | When true, marks this tool as owned by a specific @nhtio/adk!DispatchContext. Remarks ArtifactTool instances produced by SpooledArtifact.forgeTools(ctx) set this to true so that ToolRegistry.pruneEphemeral() drops them at ctx-completion. |
handler | ArtifactToolHandler | undefined | Execution function. Returns a string or @nhtio/adk!Tokenizable; the ADK wraps a bare string into a Tokenizable at the result-wrapping site. |
inputSchema | Schema | undefined | @nhtio/validation schema for the tool's input arguments. |
meta? | Record<string, unknown> | undefined | Optional arbitrary metadata for this tool. Defaults to {}. |
name | string | undefined | Unique identifier used in LLM tool definitions. Recommend lowercase snake_case. |
onCollision? | "keep" | "replace" | "throw" | 'throw' | Self-declared merge collision policy honoured by ToolRegistry.merge. Remarks Forged artifact-query tools set this to 'replace' so that merging multiple Subclass.forgeTools(ctx) outputs (whose base-method tools overlap by name) resolves silently — the descriptors, snapshot, and handler behaviour are interchangeable across subclasses, so replacement is a behavioural no-op. |
trusted? | boolean | false | When true, declares that this tool's output should be treated as trusted developer/user intent rather than as untrusted third-party text when surfaced to the model. Remarks Forged artifact-query tools default to false because their results are derived from spooled artifact bodies — which may themselves be untrusted upstream tool output. The trust signal does not promote handle-query results above the trust tier of the underlying artifact. |