mlx-bun library API
    Preparing search index...

    A chat tool a module offers the chat module.

    interface ChatToolContribution {
        description: string;
        label?: string;
        name: string;
        parameters: Readonly<Record<string, unknown>>;
        readOnly: true;
        available?(): boolean | Promise<boolean>;
        run(
            args: Readonly<Record<string, unknown>>,
            signal: AbortSignal,
        ): Promise<string>;
    }
    Index
    description: string
    label?: string

    A short title for the tool; default its name.

    name: string
    parameters: Readonly<Record<string, unknown>>

    JSON Schema of the arguments object.

    readOnly: true

    The contributor attests that the tool only reads state. Chat runs it without an approval prompt, and offers only tools that attest this (a tool that changes state would need an approval flow chat does not have yet).

    • Checked when each chat session is built: a tool that is not available is not offered to that session. Default available.

      Returns boolean | Promise<boolean>

    • Parameters

      • args: Readonly<Record<string, unknown>>
      • signal: AbortSignal

      Returns Promise<string>