Source code for chariot.mcp.config

from pydantic import BaseModel, Field, model_validator
from typing import List, Literal, Optional, Self, Callable

from chariot.mcp.enum import ChariotMCPPackage


[docs] class SDKConfig(BaseModel): include_packages: Optional[List[ChariotMCPPackage]] = None exclude_packages: Optional[List[ChariotMCPPackage]] = None disable_mutating_tools: bool = False disable_file_based_tools: bool = False
[docs] @model_validator(mode="after") def validate(self) -> Self: if self.include_packages is not None and self.exclude_packages is not None: raise ValueError("Cannot specify both `include_packages` and `exclude_packages`") return self
[docs] class ChariotMCPConfig(BaseModel): transport: Optional[Literal["streamable-http", "stdio", "sse"]] = "streamable-http" name: Optional[str] = "Chariot" sdk: Optional[SDKConfig] = Field(default_factory=SDKConfig)