Prompts
Prompts let you save useful AI instructions in Directus so you can reuse them instead of typing the same thing over and over.
Setting Up Prompts
Create or Configure the Collection
- Go to Settings → AI → Model Context Protocol
- Find AI Prompts Collection
- You have two options:
Option 1: Generate New Collection
- Click "Generate AI Prompts collection..."
- This creates a new collection with all the right fields automatically
Option 2: Use Existing Collection
- Select an existing collection from the dropdown
- Directus will automatically create any missing fields needed for prompts
- Useful if you already have an AI prompts collection or want to use a different collection name
Set Permissions
Make sure your MCP user can read (and optionally create/update) prompts in their role permissions.
Creating Prompts
Simple Example
Create a new item in your prompts collection:
Name: blog-post
Description: Write a blog post on any topic
System Prompt:
You're a blogger writing for a tech-savvy audience. Keep it conversational but informative.
Messages:
[
{
"role": "user",
"content": "Write a blog post about {{topic}}. Make it about {{length}} words."
}
]
Using Variables
The {{topic}}
and {{length}}
are placeholders. When you use the prompt, you'll fill those in:
"Use the blog-post prompt. Topic is 'AI in small business' and length is 800 words."
More Complex Example
For something more structured:
Name: product-description
Messages:
[
{
"role": "user",
"content": "Write a product description for {{product_name}}. It's a {{category}} that {{main_benefit}}. Price is {{price}}. Target audience: {{audience}}."
}
]
Usage:
"Use product-description prompt. Product name is 'Smart Garden Sensor', category is 'IoT device', main benefit is 'monitors soil moisture automatically', price is '$49', audience is 'home gardeners'."
Using Prompts
See What's Available
"What prompts do I have?"
The AI will list all your saved prompts.
Run a Prompt
"Use the prompt-name prompt with your variables"
The AI finds the prompt, plugs in your variables, and runs it.
Let AI Create Prompts
"Create a prompt for writing product reviews that asks for the product name, pros, cons, and rating"
The AI will create the prompt and save it to your collection.
Get once-a-month release notes & real‑world code tips...no fluff. 🐰