Automatically generate content
Sanity Studio is the ultimate workspace to create and edit individual pieces of content. However, if we want to get a good feel for how our studio looks with content in it, and we want to have something to query in our front end later, we're going to need a lot more than a few blog posts.
This is why we installed the Sanity MCP server. It is able to not only query content and interact with the project, it can write data in huge volume with an understanding of your Sanity Studio schema.
You've already set up and confirmed the installation of the MCP server, but just to be sure, you can write a quick prompt now to confirm the LLM has access to the tools.
Do you have access to the Sanity MCP server? What can you tell me about the project currently?Hopefully you now have confirmation that the Sanity MCP server is operational and your LLM understands the project.
Please just create one document first, one that represents the Sun in our solar system.Find the document that was created and verify that you're happy with the results.
This is a good opportunity to double-check that the schema types that were created in the previous lesson are actually suitable for the content being created in this lesson.
For example, my content schema does not contain a type of "star," so it has described the sun as a "planet."
It has also decided to store mass in kilograms, which is going to require numbers larger than it makes sense to store.
With all the context that we have given our LLM, it should be smart enough to be able to make changes to the schema, redeploy the schema, and update the document using the MCP server.
The following prompt is specific to the schema type in my project, you may need to adjust it to suit your results:
1. Update the schema for this document type to include "star" as an option. 2. You attempted to write "mass" as a string, but the schema type was setup for kilograms. Modify the schema for this document type to use a more suitable measure than kilograms.
Update the schema types, deploy the schema, and update the document that you have just created.Once you've modified your schema and content into a shape you're happier with, it's time to prompt for the rest.
Perfect, can we please create documents for the planets and moons of the solar systemYour Studio should now have many documents filled with rich information. This is perfect for creating a front-end.