MCP Apps Kit - v0.5.0
    Preparing search index...

    Interface ToolBuilderWithOutput<TName, TInput, TOutput>

    Step 4: Has output - can configure more or add handler.

    interface ToolBuilderWithOutput<
        TName extends string,
        TInput extends z.ZodType,
        TOutput extends z.ZodType,
    > {
        destructive(): this;
        expensive(): this;
        fileParams(params: string[]): this;
        handle<TActual extends ToolOutputMeta = output<TOutput> & ToolOutputMeta>(
            handler: (
                input: output<TInput>,
                context: ToolContext,
            ) => Promise<StrictToolOutput<output<TOutput>, TActual>>,
        ): ToolBuilderComplete<TName, TInput, TOutput>;
        idempotent(): this;
        invokedMessage(message: string): this;
        invokingMessage(message: string): this;
        readOnly(): this;
        ui(path: string, options?: UIOptions): this;
        ui(definition: UIDef): this;
        uiRef(key: string): this;
        visibility(value: ToolVisibilityInput): this;
        widgetAccessible(value: boolean): this;
    }

    Type Parameters

    • TName extends string
    • TInput extends z.ZodType
    • TOutput extends z.ZodType

    Hierarchy (View Summary)

    Index

    Methods