content/guides/11.ai/2.mcp/4.prompts.md
The Directus MCP Server supports stored prompts, allowing you to create reusable interactions for AI assistants. This feature is particularly useful for standardizing responses, creating guided workflows, and ensuring consistent content creation.
::callout{icon="material-symbols:info" color="info"} Client Support: Not all AI clients support prompts. Check the MCP clients compatibility matrix for your specific client. ::
Before you can create reusable prompts and use them in your AI conversations, you need to set up a collection to store them.
Go to Settings → AI → Model Context Protocol.
Find AI Prompts Collection.
You have two options:
Option 1: Generate New Collection
Option 2: Use Existing Collection
::callout{icon="material-symbols:warning" color="warning"} Don't forget to set permissions: Make sure your MCP user can read (and optionally create/update) prompts in their role permissions. See Access Control for more information. ::
When creating prompts in your collection, focus on these key elements:
Here's an example of a prompt for creating blog post content:
Name: Create Blog Post
Description: Generate a blog post with specified topic and tone
System Prompt:
You are a professional content writer creating a blog post for a technology company. Maintain a helpful, authoritative tone while making complex topics accessible.
Messages:
[
{
"role": "user",
"content": "Please write a blog post about {{topic}} with a {{tone}} tone. The post should be around {{length}} words and target {{audience}}."
}
]
Prompts support dynamic templating using double curly braces: {{variable_name}}. This allows you to create flexible templates with placeholders that can be filled at runtime.
Hello, {{name}}!The {{topic}}, {{tone}}, {{length}} and {{audience}} are placeholders. When you use the prompt, you'll fill those in:
"Use the Create Blog Post prompt. Topic is 'AI in small business', tone is 'professional', length is '800', and audience is 'small business owners'."
For product descriptions:
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}}."
}
]
Stored prompts are particularly useful for:
When working with prompts: