LLMClientMCPClients Model

class smarter.apps.llmclient.models.LLMClientMCPClients(*args, **kwargs)[source]

Bases: TimestampedModel

The MCPClients whose MCP servers’ tools a LLMClient offers the LLM.

Each record links an LLMClient to an MCPClient, as listed in the LLMClient manifest’s spec.mcpClients. On each prompt, the tools of the linked, active MCPClients are offered to the LLM, in order of their priority.

Usage Example

LLMClientMCPClients.objects.create(llmclient=my_llmclient, mcpclient=my_mcpclient)
mcpclients = LLMClientMCPClients.mcpclients_for(my_llmclient)
Parameters:
  • id (Unknown) – Primary key: ID

  • created_at (Unknown) – Created at

  • updated_at (Unknown) – Updated at

Relationship fields:

Parameters:
  • llmclient (Unknown) – Llmclient (related name: llmclientmcpclients)

  • mcpclient (Unknown) – Mcpclient. The MCPClient. (related name: llmclient_mcpclients)

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

created_at

DateTimeField

Created at

Timestamp indicating when the model instance was created.

This field is automatically set to the current date and time when the instance is first created. It is indexed in the database for efficient querying.

Type:

Type

id

BigAutoField

Primary key: ID

Type:

Type

llmclient

ForeignKey to LLMClient

Llmclient (related name: llmclientmcpclients)

Type:

Type

llmclient_id

Internal field, use llmclient instead.

mcpclient

ForeignKey to MCPClient

Mcpclient. The MCPClient. (related name: llmclient_mcpclients)

Type:

Type

mcpclient_id

Internal field, use mcpclient instead.

classmethod mcpclients_for(llmclient)[source]

Return the active MCPClients of a LLMClient, in order of priority and then name.

Parameters:

llmclient (LLMClient) – The LLMClient.

Returns:

The LLMClient’s active MCPClients.

Return type:

list[MCPClient]

objects = <django.db.models.Manager object>
updated_at

DateTimeField

Updated at

Timestamp indicating when the model instance was last updated.

This field is automatically updated to the current date and time whenever the instance is saved. It is indexed in the database for efficient querying.

Type:

Type