CoursesAI-powered Sanity developmentGive your AI the full picture
AI-powered Sanity development

Give your AI the full picture

LLMs know a lot, but not everything. Here are several ways to make sure your AI assistant always has accurate, up-to-date Sanity context.
Log in to mark your progress for each Lesson and Task

AI tools are trained on public data up to a cutoff date. That means they may have outdated knowledge of Sanity APIs, miss recent features, or fill gaps with plausible-but-wrong code. Here are the best ways to keep your AI well-informed.

The Sanity MCP server includes built-in search_docs and read_docs tools. When connected, your AI can look up accurate, current documentation on demand—without you having to paste anything in. This is the most reliable approach.

The Sanity docs are available in the LLM-friendly llms.txt format. You can point your AI to either of these URLs:

  • /docs/llms.txt — an abbreviated index of all content with links
  • /docs/llms-full.txt — the complete documentation corpus as markdown

All Sanity Learn course and lesson content is also available at /learn/llms.txt and /learn/llms-full.txt.

In Cursor, you can index the Sanity documentation directly by typing @Docs in the agent chat and adding sanity.io/docs as a source. This gives Cursor persistent, searchable access to the docs without needing to paste content into every prompt.

Every article on sanity.io/docs has a Copy article button that puts the markdown version on your clipboard. You can also append .md to any docs URL to get the raw markdown. Useful when you need to give your AI a specific reference for a focused task.

Both sanity.io/docs and sanity.io/learn now support content negotiation. Any page can return its content as markdown by sending an Accept: text/markdown header in the request. This means you can fetch any docs article or Learn lesson as clean, LLM-ready markdown without scraping HTML.

curl -H "Accept: text/markdown" https://www.sanity.io/docs/ai/mcp-server

This is especially useful when you want to give your AI a specific article as context, or when building tools that programmatically fetch Sanity documentation.

Mark lesson as complete
You have 1 uncompleted task in this lesson
0 of 1