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

    Type Alias ToolFieldConfig<InputType, FieldName, Requires, StaticFields>

    ToolFieldConfig is a type that describes a field in a tool specification. It is used to describe the dependencies of a field, as well as the validation function for the field.

    type ToolFieldConfig<
        InputType extends Record<string, unknown>,
        FieldName extends keyof InputType,
        Requires extends
            readonly Exclude<keyof InputType, FieldName>[] = readonly Exclude<
            keyof InputType,
            FieldName,
        >[],
        StaticFields extends keyof InputType = never,
    > = {
        description?: string;
        requires: Requires;
        validate: (
            value: InputType[FieldName] | undefined,
            context: ContextFor<InputType, FieldName, Requires, StaticFields>,
        ) => Promise<ParameterValidationResult<InputType, FieldName>>;
    }

    Type Parameters

    Index

    Properties

    description?: string
    requires: Requires
    validate: (
        value: InputType[FieldName] | undefined,
        context: ContextFor<InputType, FieldName, Requires, StaticFields>,
    ) => Promise<ParameterValidationResult<InputType, FieldName>>