Skip to main content
Glama

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
_typeYesThe document type
asyncNoSet to true for background processing when creating multiple documents for better performance.
schemaIdYesSchema ID to follow
releaseIdNoOptional release ID for creating versioned documents. If provided, the document will be created under the specified release version instead of as a draft
instructionYesOptional instruction for AI to create the document content
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so description carries full burden. It only states basic creation with AI, but omits side effects (e.g., draft creation, permission needs, behavior when instruction is omitted or async is true).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, 13 words, no filler, directly communicates core purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters, 3 required, no output schema, the description is too sparse. It does not cover return values, error handling, or the process of AI generation, leaving the agent underinformed for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline 3 applies. Description adds minimal extra meaning beyond schema; e.g., the qualifier 'AI-generated content' loosely ties to the instruction parameter but does not address default behavior or interaction with other parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states a specific verb 'Create', resource 'a new document in Sanity', and distinguishing qualifier 'with AI-generated content based on instructions', clearly differentiating it from siblings like patch or update.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use, when-not-to-use, or alternatives provided. The description implies AI generation but does not clarify when this tool is preferred over create_release or create_version.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sanity-io/sanity-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server