In this lecture, we cover how to describe tools in MCP and ChatGPT Apps using
JSON Schema: how
inputSchema is structured, why it is part of the model’s “prompt,” how to write a good
description, when to use
enum and constraints (
minItems,
format). Then we build a “single source of truth” in TypeScript via
Zod +
zod-to-json-schema, discuss issues with
optional fields, and show the role of
_meta/annotations (for example,
readOnlyHint,
destructiveHint,
openai/outputTemplate) for UX and safety.