AAI SDK
    Preparing search index...

    Type Alias InferToolInput<T>

    InferToolInput: Parameters<T["execute"]>[0]

    The validated input type a tool's execute receives — inferred from the tool's inputSchema. The Vercel AI SDK's InferToolInput pattern, so a client (or another tool) can share the exact argument shape without re-declaring it.

    import { type InferToolInput, tool } from "@alexkroman1/aai";
    import { z } from "zod";

    const add = tool({
    description: "Add an item",
    inputSchema: z.object({ item: z.string() }),
    execute: ({ item }) => item,
    });
    type AddInput = InferToolInput<typeof add>; // { item: string }

    Type Parameters