create_document
Create a new document in Sanity using AI to generate content from your instructions. Supports schemas and versioned releases.
Instructions
Create a new document in Sanity with AI-generated content based on instructions
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"_type": "<_type>",
"instruction": "<instruction>",
"schemaId": "<schemaId>"
},
"name": "create_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _type | Yes | The document type | |
| async | No | Set to true for background processing when creating multiple documents for better performance. | |
| schemaId | Yes | Schema ID to follow | |
| releaseId | No | Optional release ID for creating versioned documents. If provided, the document will be created under the specified release version instead of as a draft | |
| instruction | Yes | Optional instruction for AI to create the document content |