Example Conversations¶
This page shows real-world example conversations between users and agents using Django Admin MCP.
Model Discovery¶
Exploring Available Models¶
User: What models are available in Django admin?
Agent: [calls find_models]
I found the following models available through Django Admin MCP:
**Fully Exposed (tools_exposed: true, with CRUD tools):**
- article - 12 tools available
- category - 12 tools available
- comment - 12 tools available
**Discoverable Only (tools_exposed: false):**
- author - registered with MCPAdminMixin but mcp_expose is not enabled,
so it is visible in find_models without direct tools
Would you like me to describe any of these models in detail?
Note
find_models only lists models whose admin uses MCPAdminMixin. Models
registered with a plain ModelAdmin — such as Django's stock UserAdmin
for user — do not appear in the results at all. Models registered with
the mixin but without mcp_expose = True appear with
tools_exposed: false.
Understanding Model Structure¶
User: What fields does article have?
Agent: [calls describe_article]
The Article model has the following fields:
| Field | Type | Required | Notes |
|-------|------|----------|-------|
| id | AutoField | No | Primary key (read-only) |
| title | CharField | Yes | Max 200 characters |
| slug | SlugField | Yes | URL-friendly identifier |
| content | TextField | No | Article body |
| author | ForeignKey | Yes | Links to Author model |
| categories | ManyToMany | No | Links to Category model |
| published | Boolean | No | Default: false |
| created_at | DateTime | No | Auto-set on creation |
| updated_at | DateTime | No | Auto-set on update |
The admin is configured with:
- Search fields: title, content
- Ordering: -created_at (newest first)
- Read-only fields: created_at, updated_at
CRUD Operations¶
Listing Records¶
User: Show me the latest 10 articles
Agent: [calls list_article with limit=10]
Here are the 10 most recent articles:
| ID | Title | Author | Published | Created |
|----|-------|--------|-----------|---------|
| 42 | Getting Started with Django | Jane Doe | Yes | Jan 15 |
| 41 | Python Best Practices | John Smith | Yes | Jan 14 |
| 40 | REST API Design | Jane Doe | No | Jan 13 |
| 39 | Database Optimization | Admin | Yes | Jan 12 |
| ... | ... | ... | ... | ... |
Showing 10 of 42 total articles.
Filtering and Searching¶
User: Find all published articles about Django
Agent: [calls list_article with search="Django", filters={"published": true}]
Found 5 published articles matching "Django":
1. **Getting Started with Django** (ID: 42)
Author: Jane Doe | Created: Jan 15, 2024
2. **Django REST Framework Tutorial** (ID: 35)
Author: John Smith | Created: Jan 8, 2024
3. **Django Testing Best Practices** (ID: 28)
Author: Jane Doe | Created: Dec 20, 2023
...
Creating Records¶
User: Create a new article titled "Introduction to Python"
Agent: I'll create that article. Who should be the author?
User: Jane Doe
Agent: [calls autocomplete_author with term="Jane Doe"]
[calls create_article with data={"title": "Introduction to Python", "author_id": 5}]
Created article #43: "Introduction to Python"
- Author: Jane Doe
- Published: No (draft)
- Created: Just now
Would you like me to add content or publish it?
Updating Records¶
User: Update article 43 with this content: "Python is a versatile programming
language..." and mark it as published
Agent: [calls update_article with id=43, data={"content": "Python is a versatile
programming language...", "published": true}]
Updated article #43:
- Content added (126 characters)
- Status changed to Published
The article is now live!
Deleting Records¶
User: Delete article 43
Agent: Are you sure you want to delete article #43 "Introduction to Python"?
This action cannot be undone.
User: Yes, delete it
Agent: [calls delete_article with id=43]
Deleted article #43 "Introduction to Python".
Admin Actions¶
Listing Available Actions¶
User: What actions can I perform on articles?
Agent: [calls actions_article]
Available actions for articles:
1. **delete_selected** - Delete selected articles
2. **mark_as_published** - Mark selected articles as published
3. **mark_as_draft** - Mark selected articles as draft
4. **export_to_csv** - Export selected articles to CSV
Which action would you like to perform?
Executing Actions¶
User: Mark articles 1, 2, and 3 as published
Agent: [calls action_article with action="mark_as_published", ids=[1, 2, 3]]
The action succeeded. The tool returned:
{"success": true, "action": "mark_as_published", "affected_count": 3,
"message": "Executed mark_as_published on 3 objects", "result": null}
All three articles are now live.
Bulk Operations¶
Bulk Update¶
User: Set status to "archived" for articles 10 through 15
Agent: [calls bulk_article with operation="update", items=[
{"id": 10, "data": {"status": "archived"}},
{"id": 11, "data": {"status": "archived"}},
{"id": 12, "data": {"status": "archived"}},
{"id": 13, "data": {"status": "archived"}},
{"id": 14, "data": {"status": "archived"}},
{"id": 15, "data": {"status": "archived"}}
]]
Updated 6 articles:
- Articles 10-15 now have status "archived"
All changes have been saved.
Bulk Delete¶
User: Delete all draft articles from 2023
Agent: [calls list_article with filters={"published": false,
"created_at__gte": "2023-01-01", "created_at__lt": "2024-01-01"}]
Found 12 draft articles from 2023. Here they are:
- #15: "Untitled Draft" (Jan 2023)
- #18: "Old Tutorial" (Mar 2023)
...
Do you want me to delete all 12 articles?
User: Yes, delete them all
Agent: [calls bulk_article with operation="delete", items=[15, 18, ...]]
Deleted 12 draft articles from 2023.
Note
Date parts like created_at__year are not in the whitelist of supported
filter lookups (exact, contains, icontains, gt, gte, lt,
lte, in, isnull) and are silently dropped, which would match every
draft. Use range bounds (created_at__gte / created_at__lt) instead.
Exploring Relationships¶
Getting Related Objects¶
User: Show me all comments on article 42
Agent: [calls related_article with id=42, relation="comments"]
Article #42 "Getting Started with Django" has 8 comments:
1. **Great article!** - user123 (Jan 15, 10:30 AM)
2. **Very helpful tutorial** - django_fan (Jan 15, 11:00 AM)
3. **Could you add more examples?** - newbie (Jan 15, 2:00 PM)
...
Showing 8 comments total.
Viewing Change History¶
User: What changes were made to article 42?
Agent: [calls history_article with id=42]
Change history for article #42:
| Date | User | Action | Changes |
|------|------|--------|---------|
| Jan 15, 2:30 PM | admin | Changed | Changed title and content |
| Jan 15, 10:00 AM | admin | Created | Created via MCP |
The article was created on Jan 15 and modified once.
Complex Workflows¶
Finding and Updating Multiple Related Records¶
User: Find all articles by Jane Doe and add the "featured" category to them
Agent: [calls autocomplete_author with term="Jane"]
[calls list_article with filters={"author": 5}]
[calls autocomplete_category with term="featured"]
Found the author Jane Doe (ID: 5), 15 articles by her, and the "featured"
category (ID: 7).
I'll update each article to add this category...
[calls update_article for each article]
Added "featured" category to 15 articles by Jane Doe:
- Article #42: "Getting Started with Django"
- Article #35: "REST API Design"
- Article #28: "Testing Best Practices"
...
All articles are now featured!
Note
Relation-traversal filters such as author__name are blocked and
silently skipped by list_* tools. Resolve the related object's ID
first (for example with autocomplete_author), then filter on the
foreign key field itself: filters={"author": 5}.
Audit and Cleanup¶
User: Show me articles that haven't been updated in the last 30 days
Agent: [calls list_article with filters={"updated_at__lt": "2023-12-15"}]
Found 23 articles not updated in the last 30 days:
**Oldest (over 6 months):**
- #5: "Legacy Tutorial" - Last updated: Jun 2023
- #8: "Old Documentation" - Last updated: Jul 2023
**1-6 months old:**
- #12: "Archived Content" - Last updated: Sep 2023
...
Would you like me to archive these or take another action?
Error Handling Examples¶
Permission Denied¶
User: Delete all articles
Agent: [calls bulk_article with operation="delete", items=[...]]
I can't delete articles - this API token doesn't have delete permission.
To fix this:
1. Go to Django admin
2. Open the MCP token under Django Admin MCP > MCP Tokens
3. Grant it the "blog.delete_article" permission (directly or via a group);
the token's linked user must hold the permission as well
Or use a token that has delete access.