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

    Interface ToolBuilderWithInput<TName, TInput>

    Step 3: Has input - can add output or handler.

    interface ToolBuilderWithInput<TName extends string, TInput extends z.ZodType> {
        destructive(): this;
        expensive(): this;
        fileParams(params: string[]): this;
        handle<TReturn>(
            handler: (
                input: output<TInput>,
                context: ToolContext,
            ) => Promise<TReturn>,
        ): ToolBuilderComplete<
            TName,
            TInput,
            ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>,
        >;
        idempotent(): this;
        invokedMessage(message: string): this;
        invokingMessage(message: string): this;
        output<TOutput extends SchemaInput>(
            schema: TOutput,
        ): ToolBuilderWithOutput<TName, TInput, NormalizedSchema<TOutput>>;
        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

    Hierarchy (View Summary)

    Index

    Methods