@servicenow/sdk - v4.7.0
    Preparing search index...

    Type Alias ToolHandle<TName, TOutputs>

    ToolHandle: { "[___toolName]": TName; "[___toolOutputs]": TOutputs } & {
        readonly [K in TOutputs[number]]: ToolOutputRef
    }

    Represents a handle to a tool with typed outputs.

    Output fields are placed at the TOP LEVEL of the handle, matching the platform's template syntax where outputs are accessed directly:

    • Single-output tools: tool.output → {{toolName.output}}
    • Multi-output tools: tool.fieldName → {{toolName.fieldName}}
    • Dynamic-output tools: tool.anyField → {{toolName.anyField}}

    All tool types use the same mapped type — no conditional branching:

    • readonly ['output'] → { output: ToolOutputRef }
    • readonly ['provider', 'response', ...] → { provider: ToolOutputRef, response: ToolOutputRef, ... }
    • readonly string[] (dynamic) → { [key: string]: ToolOutputRef }

    Type Parameters

    • TName extends string
    • TOutputs extends readonly string[]

    Type Declaration

    • Readonly Internal[___toolName]: TName

      Tool name — hidden from IntelliSense

    • Readonly Internal[___toolOutputs]: TOutputs

      Output field names — used by PromptBuilder for type inference