nat.data_models.openai_mcp#

Classes#

MCPApprovalRequiredEnum

Enum to specify if approval is required for tool usage in the OpenAI MCP schema.

OpenAIMCPSchemaTool

Represents a tool in the OpenAI MCP schema.

Module Contents#

class MCPApprovalRequiredEnum#

Bases: str, enum.Enum

Enum to specify if approval is required for tool usage in the OpenAI MCP schema.

Initialize self. See help(type(self)) for accurate signature.

NEVER = 'never'#
ALWAYS = 'always'#
AUTO = 'auto'#
class OpenAIMCPSchemaTool(/, **data: Any)#

Bases: pydantic.BaseModel

Represents a tool in the OpenAI MCP schema.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

type: str = 'mcp'#
server_label: str = None#
server_url: str = None#
allowed_tools: list[str] | None = None#
require_approval: MCPApprovalRequiredEnum = None#
headers: dict[str, str] | None = None#
model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].