-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
The MCP protocol supports Prompts as a primitive for providing templated messages/instructions to AI agents. This package currently only implements Tools.
MCP Prompts Overview
Prompts are reusable templates that help agents understand how to interact with the system. They can include:
- Pre-defined instructions for common operations
- Contextual guidance based on model metadata
- Best practices for CRUD operations
Proposed Prompts
Discovery & Understanding
explore_models- Guide agent through discovering available models and their relationshipsunderstand_model- Detailed walkthrough of a specific model's fields, constraints, and admin config
CRUD Operations
create_guide- Step-by-step guidance for creating objects with validation hintsupdate_guide- Best practices for updating objects, handling inlinesbulk_operations_guide- How to efficiently perform bulk create/update/delete
Relationships
navigate_relationships- How to traverse and understand model relationshipsmanage_inlines- Working with inline objects effectively
Admin Actions
execute_action- Guide for discovering and executing admin actions safely
Implementation
- Add
promptstoServerCapabilities - Implement
prompts/listhandler - Implement
prompts/gethandler with dynamic argument substitution - Create prompt templates (possibly as Django templates or Python strings)
MCP Protocol Reference
# prompts/list response
{
"prompts": [
{
"name": "explore_models",
"description": "Guide for discovering Django admin models",
"arguments": []
},
{
"name": "understand_model",
"description": "Deep dive into a specific model",
"arguments": [{"name": "model_name", "required": true}]
}
]
}
# prompts/get request
{"method": "prompts/get", "params": {"name": "understand_model", "arguments": {"model_name": "user"}}}Benefits
- Reduces agent trial-and-error
- Provides consistent guidance across different AI models
- Self-documenting API usage patterns
- Can be dynamically generated based on actual model configuration
Labels
enhancement, feature
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels