Skip to content

v0.12.0

Latest

Choose a tag to compare

@7tg 7tg released this 23 Nov 21:28
· 11 commits to main since this release
945bb4c

Models and the server can now describe themselves to MCP clients, and custom field types from packages like django-markitup and django-polymorphic work end to end.

Added

  • mcp_description describes a model's business role. Set it on a ModelAdmin and the text is prepended to every tool description for that model and returned as description by describe_<model>, the models:// schema resource and find_models, so clients know what a model is for and the rules around it, not just its fields.
  • MCP_INSTRUCTIONS sets the server instructions. Its value is returned as instructions in the initialize result, which MCP clients pass to the model as guidance for using the server. The field is omitted when the setting is unset or empty. (#134, thanks @iddqd1)

Fixed

  • get_* and list_* serialize custom field values (such as django-markitup's Markup) through the field's value_to_string() instead of failing JSON serialization, and a partial update_* no longer overwrites an omitted custom-valued field with its str(). describe_* names a wrapped on_delete (django-polymorphic's PolymorphicGuard), and get_* with include_inlines finds inline rows whose foreign key points at a multi-table parent model. (#132, thanks @Iv)

Full changelog: https://7tg.github.io/django-admin-mcp/changelog/