# Fix: Referenced JSON Schemas resolve as application/schema+json

> Web-audit fix skill for the `json-schemas` check (MCP & API, MAY).

## Goal

Serve the JSON Schemas your API references so agents can validate payloads pre-flight.

## Fix

Serve the input and output JSON Schemas your API references (for example
`/api/schema/input.json`) as `application/schema+json`. Agents validate payloads against them
before calling, which turns a class of runtime failures into pre-flight validation.

## Resources

- [JSON Schema](https://json-schema.org/specification)

## Copy-paste prompt

Paste this into your coding agent, replacing the Issue line with the Result line from [your audit](https://anc.dev/web-audit):

```text
Goal: Serve the JSON Schemas your API references so agents can validate payloads pre-flight
Issue: <the audit's finding for this check>
Fix: Serve the input and output JSON Schemas your API references (for example `/api/schema/input.json`) as `application/schema+json`. Agents validate payloads against them before calling, which turns a class of runtime failures into pre-flight validation.
Skill: https://anc.dev/web-audit/skill/json-schemas
Docs: https://json-schema.org/specification
```

## Verify

Re-run the audit at [https://anc.dev/web-audit](https://anc.dev/web-audit) or call the `audit_website` MCP tool; the `json-schemas` check should report `pass`.
