langchain.js
    Preparing search index...

    Interface MessageToolDefinition<TInput, TOutput>

    Represents the input and output types of a tool that can be used in messages.

    // Tool that takes a string input and returns a number
    interface StringToNumberTool extends MessageToolDefinition<string, number> {
    input: string;
    output: number;
    }
    interface MessageToolDefinition<TInput = unknown, TOutput = unknown> {
        input: TInput;
        output: TOutput;
    }

    Type Parameters

    • TInput = unknown

      The type of input the tool accepts.

    • TOutput = unknown

      The type of output the tool produces.

    Index

    Properties

    Properties

    input: TInput
    output: TOutput