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.
execute
inputSchema
InferToolInput
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 } Copy
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 }
The validated input type a tool's
executereceives — inferred from the tool'sinputSchema. The Vercel AI SDK'sInferToolInputpattern, so a client (or another tool) can share the exact argument shape without re-declaring it.