Skip to content

email

Wire-format contract for the email add-on: the email a model drafts and the result of dispatching it. Pure (zod + inferred types, no Node-only imports) so the server-side sender, the Mastra tool, and the React approval UI all validate / type against one definition.

Array fields intentionally avoid .min() / .nonempty(): those emit minItems in the JSON schema, which some Model Serving endpoints reject (“array types do not support minItems”) when the schema is forwarded as a tool definition.