OptionalannotationsBehavioral hints for the AI model. Help hosts optimize UX and models understand tool behavior.
Human-readable description for the LLM
OptionalfileInput parameters that accept file references (ChatGPT only).
List parameter names that should accept uploaded file IDs. ChatGPT will allow users to attach files to these parameters.
Async handler function with typed input and context
Validated input matching the Zod schema
Client-provided metadata (locale, location, etc.)
Promise resolving to the output matching the output schema
Zod schema for input validation
OptionalinvokedMessage shown after tool completes (ChatGPT only)
OptionalinvokingMessage shown while tool is executing (ChatGPT only)
OptionaloutputZod schema for output validation (optional for type inference)
OptionaltitleOptional display title (defaults to tool name)
OptionaluiUI resource to render results.
Can be:
ui config (legacy)OptionalvisibilityWho can call this tool
OptionalwidgetWhether the widget/app can invoke this tool (ChatGPT only)
Single tool definition with Zod schemas