tool2agent API Documentation - v0.0.0
    Preparing search index...

    Type Alias DynamicInputType<InputType, DynamicFields>

    DynamicInputType: { [FieldName in DynamicFields]?: InputType[FieldName] } & {
        [FieldName in Exclude<keyof InputType, DynamicFields>]: InputType[FieldName]
    }

    Creates a type where dynamic fields are optional and static fields remain required.

    This type is used internally by toolBuilder to represent the input type that the LLM can provide incrementally. Dynamic fields are made optional, while static fields optionality is preserved.

    Type Parameters

    • InputType extends Record<string, unknown>

      The full input type (typically inferred from a Zod schema).

    • DynamicFields extends keyof InputType

      The keys of InputType that are dynamic (can be provided incrementally).

    type Input = { name: string; age: number; email: string };
    type Dynamic = DynamicInputType<Input, 'email'>;
    // Result: { name: string; age: number; email?: string }