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

    Interface PromptBuilder<TInputs, TTools>

    Prompt builder interface for type-safe inline prompts Provides access to input fields and optionally tool outputs with autocomplete

    interface PromptBuilder<
        TInputs extends readonly InputAttribute[],
        TTools extends
            Record<string, BaseToolHandle> = Record<string, BaseToolHandle>,
    > {
        input: { readonly [K in string]: string };
        tool: {
            readonly [K in string | number | symbol]: TTools[K] extends {
                "[___toolOutputs]": TOutputs;
            }
                ? { readonly [F in string]: string }
                : never
        };
    }

    Type Parameters

    Index

    Properties

    Properties

    input: { readonly [K in string]: string }

    Access input fields - returns template string like "{{input.fieldName}}"

    p.input.userQuestion  // Returns "{{input.userQuestion}}"
    
    tool: {
        readonly [K in string | number | symbol]: TTools[K] extends {
            "[___toolOutputs]": TOutputs;
        }
            ? { readonly [F in string]: string }
            : never
    }

    Access tool outputs - returns template string like "{{toolName.fieldName}}" Only available when tools callback returns tool handles

    p.tool.ScriptTool.output       // Single-output → "{{ScriptTool.output}}"
    p.tool.WebSearch.response // Multi-output → "{{WebSearch.response}}"