# What is a JSON Schema?

> A JSON Schema describes the shape JSON data must have: its fields, their types and which are required. Used to keep AI output and tool inputs predictable.

Source: https://learn.ynteractive.com/content/glossary/json-schema · Updated 2026-10-20 · Free from Stepthrough (https://learn.ynteractive.com)

[n8n and automation](https://learn.ynteractive.com/content/glossary#topic-n8n-and-automation) · [AI glossary](https://learn.ynteractive.com/content/glossary)

Quick answer

A JSON Schema is a standard way to describe what a piece of JSON must look like: which fields it has, what type each one is (text, number, list), and which are required. Tools use it to check data, and AI features use it to force a model's answer into an exact shape.

Last updated October 20, 2026

[Take the free module →](https://learn.ynteractive.com/courses/n8n-beginner/4)Module 4 of the free [n8n for Beginners: Your First Automations](https://learn.ynteractive.com/courses/n8n-beginner) course, about 9 minutes. No account needed.

Updated October 20, 2026 · By [Robert Breen](https://learn.ynteractive.com/content/about)

## Why it matters for a small business

Automations break on surprises: a missing field, a number sent as text, a list that is sometimes a single value. A schema writes the rules down so a tool can check them. When you ask an AI model for [structured output](https://learn.ynteractive.com/content/glossary/structured-output), a schema is how you tell it exactly which fields to return.

Schemas also sit behind AI agents. Each tool an agent can call, including tools shared through the [Model Context Protocol](https://learn.ynteractive.com/content/glossary/model-context-protocol), has an input schema that tells the model what to send. That is why a well-described tool gets called with the right fields far more often.

Where you'll use it: in n8n's [Structured Output Parser](https://learn.ynteractive.com/content/glossary/structured-output-parser), you can give a JSON example or define a JSON Schema by hand. OpenAI and other model APIs accept schemas for structured outputs, and app APIs document their request bodies with them.

## In a real lesson: n8n: Items, JSON and Expressions, Explained by Doing

The free [n8n Items, JSON and Expressions lesson](https://learn.ynteractive.com/content/n8n-items-json-expressions-tutorial) has Clearview Bookkeeping's five fake invoices and shows them three ways: **Schema**, **Table** and **JSON**. n8n's Schema view lists the fields of one item, such as client and amount, which is the plain-English version of what a JSON Schema writes formally.

A formal JSON Schema for those invoices would say: an object with a client field of type string and an amount field of type number, both required. Give that to an AI step and every answer comes back with the same two fields, ready for the late fee expression.

[Try this lesson free](https://learn.ynteractive.com/modules/n8n-data-and-expressions) or [read the step-by-step guide](https://learn.ynteractive.com/content/n8n-items-json-expressions-tutorial).

## Common confusions

### JSON Schema vs n8n Schema view

n8n's Schema view shows the fields it found in your data. A JSON Schema is a written rule set you define for data you expect.

### JSON Schema vs database schema

A database schema defines tables and columns. A JSON Schema defines the shape of one JSON document.

## Tips

- Start from a real example and let the tool generate a schema, then tighten it.
- Mark only truly required fields as required.
- Add a short description to each field; AI models read them.

## Related terms

[JSON](https://learn.ynteractive.com/content/glossary/json) · [Structured output](https://learn.ynteractive.com/content/glossary/structured-output) · [Structured Output Parser (n8n)](https://learn.ynteractive.com/content/glossary/structured-output-parser) · [Tool calling](https://learn.ynteractive.com/content/glossary/tool-calling) · [Request body (payload)](https://learn.ynteractive.com/content/glossary/request-body)

## More n8n and automation terms

[Loop Over Items node](https://learn.ynteractive.com/content/glossary/loop-over-items) · [Manual trigger](https://learn.ynteractive.com/content/glossary/manual-trigger) · [Merge node](https://learn.ynteractive.com/content/glossary/merge-node) · [Module (Make)](https://learn.ynteractive.com/content/glossary/make-module)

## Where you use it: free lessons

- [n8n: Items, JSON and Expressions, Explained by Doing](https://learn.ynteractive.com/content/n8n-items-json-expressions-tutorial) (n8n, 9 min)
- [n8n: Turn Meeting Notes into Action Items in a Google Sheet](https://learn.ynteractive.com/content/meeting-notes-to-action-items-google-sheets-ai-n8n) (n8n, 15 min)
- [An AI Resume Screener, with a Fairness Step (Recruiting & HR)](https://learn.ynteractive.com/content/ai-resume-screener-n8n-fairness) (n8n, 14 min)

## Frequently asked questions

**Do I need to learn JSON Schema to use n8n?**

No. Most of the time a JSON example is enough, and n8n builds the schema from it.

**What does required mean in a schema?**

The field must be present. Data missing it fails the check, which lets the workflow catch the problem early.

[All AI glossary terms, A to Z](https://learn.ynteractive.com/content/glossary) · [Free prompt templates](https://learn.ynteractive.com/content/prompts)
