AI Models API Package¶
nautobot_ai_models.api
¶
REST API module for nautobot_ai_models app.
serializers
¶
API serializers for nautobot_ai_models.
This is how a consumer outside Nautobot reads the registries, so the MCP tool serializer carries the whole advertised definition - both schemas included - rather than a summary.
AIModelSerializer
¶
Bases: NautobotModelSerializer
AI Model Serializer.
Source code in nautobot_ai_models/api/serializers.py
AIProviderSerializer
¶
Bases: NautobotModelSerializer
AI Provider Serializer.
Source code in nautobot_ai_models/api/serializers.py
MCPServerSerializer
¶
Bases: NautobotModelSerializer, TaggedModelSerializerMixin
MCPServer Serializer.
Source code in nautobot_ai_models/api/serializers.py
Meta
¶
Meta attributes.
Source code in nautobot_ai_models/api/serializers.py
get_tool_count(obj)
¶
How many tools this server offers.
Read off the viewset's annotation when there is one, and counted otherwise. A serializer also renders objects that never came from that queryset - the one just created by a POST, for instance - and reading a missing annotation would fail there.
Source code in nautobot_ai_models/api/serializers.py
MCPToolSerializer
¶
Bases: NautobotModelSerializer
MCPTool Serializer.
Source code in nautobot_ai_models/api/serializers.py
Meta
¶
Meta attributes.
Source code in nautobot_ai_models/api/serializers.py
urls
¶
Django API urlpatterns declaration for nautobot_ai_models app.
views
¶
API views for nautobot_ai_models.
AIModelViewSet
¶
Bases: NautobotModelViewSet
AI Model viewset.
Source code in nautobot_ai_models/api/views.py
AIProviderViewSet
¶
Bases: NautobotModelViewSet
AI Provider viewset.
Source code in nautobot_ai_models/api/views.py
MCPServerViewSet
¶
Bases: NautobotModelViewSet
MCPServer viewset.
Source code in nautobot_ai_models/api/views.py
MCPToolViewSet
¶
Bases: NautobotModelViewSet
MCPTool viewset.