toolregistry.parameter_models module

exception toolregistry.parameter_models.InvalidSignature[source]

Bases: Exception

Exception raised when a function signature cannot be processed for FastMCP.

message

Explanation of the error.

Type:

str

class toolregistry.parameter_models.ArgModelBase[source]

Bases: BaseModel

Base model for function argument validation with Pydantic.

Features:
  • Supports arbitrary types in fields

  • Provides method to dump fields one level deep

  • Configures Pydantic model behavior

model_dump_one_level() Dict[str, Any][source]

Dump model fields one level deep, keeping sub-models as-is.

Returns:

Dictionary of field names to values.

Return type:

Dict[str, Any]

model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}

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