chariot.mcp package
Submodules
chariot.mcp.build module
- chariot.mcp.build.build(sdk_config: SDKConfig) List[Callable] [source]
Build SDK tools with the given configuration
- chariot.mcp.build.sanitize_function(function: Callable, origin: Callable = None) Callable [source]
Remove spicy kwargs from a function signature/annotations (like ones that start with ‘_’). Also removes untyped ‘**kwargs’ from the signature.
- chariot.mcp.build.wrap_tool(func: Callable, package: ChariotMCPPackage = None, obj_path: str = None, name_override: str = None, is_mutating: bool = False)[source]
Wrap a tool with extra data: 1. Add a prefix to the tool name based on the originating parent chariot package 2. Add the Object path to the docstring 3. Sanitize the signature to remove bad kwargs
chariot.mcp.config module
- class chariot.mcp.config.ChariotMCPConfig(*, transport: ~typing.Literal['streamable-http', 'stdio', 'sse'] | None = 'streamable-http', name: str | None = 'Chariot', sdk: ~chariot.mcp.config.SDKConfig | None = <factory>)[source]
Bases:
BaseModel
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str | None
- transport: Literal['streamable-http', 'stdio', 'sse'] | None
- class chariot.mcp.config.SDKConfig(*, include_packages: List[ChariotMCPPackage] | None = None, exclude_packages: List[ChariotMCPPackage] | None = None, disable_mutating_tools: bool = False, disable_file_based_tools: bool = False)[source]
Bases:
BaseModel
- disable_file_based_tools: bool
- disable_mutating_tools: bool
- exclude_packages: List[ChariotMCPPackage] | None
- include_packages: List[ChariotMCPPackage] | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
chariot.mcp.enum module
- class chariot.mcp.enum.ChariotMCPPackage(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
Enum
SDK packages supported in MCP
- BulkInference = 'bulk_inference'
- Datasets = 'datasets'
- InferenceStore = 'inference_store'
- Models = 'models'
- Projects = 'projects'
- SystemResources = 'system_resources'
- Training = 'training_v2'
chariot.mcp.run module
- chariot.mcp.run.run(config: ChariotMCPConfig | None = None, bearer_token: str | None = None, dry: bool = False)[source]
chariot.mcp.utils module
- chariot.mcp.utils.get_package_prefix(package: ChariotMCPPackage | None) str [source]