FunctionTool

Unpublished development API. This package is under development and is not available as a published release.

Authored TypeScript arguments/results, with no inference from JSON metadata, validation, conversion, or transforms. Normal interfaces need no index key. Handlers receive an isolated mutable copy of their finalized arguments.

import type { FunctionTool } from '@threadplane/core/tools';

Declaration

export type FunctionTool<A, R> = IsPortable<A> extends true ? IsPortable<R> extends true ? {
    readonly description: string;
    readonly parameters?: PlainValue;
    readonly followUp?: boolean;
    readonly idempotent?: boolean;
    readonly handler: (args: A, context: ExecutionContext) => R | Promise<R>;
} : never : never;

Type parameters

A
R