register_verb_handler
register_verb_handler
Register a custom verb handler for specialized validation and configuration of a
SWML verb. When a verb with a registered handler is added via
add_verb(), the handler’s
validate_config() method is used instead of generic schema validation.
The SDK ships with a built-in AIVerbHandler for the ai verb. Register your own
handlers for custom verbs or to override default validation behavior.
Custom verb handlers are useful when a verb has complex validation rules that go beyond JSON Schema checks — for example, mutually exclusive parameters or conditional requirements.
Parameters
handler
An instance of a class that extends SWMLVerbHandler. Must implement three methods:
get_verb_name()— returns the verb name string this handler managesvalidate_config(config)— returns a(bool, list[str])tuple of(is_valid, errors)build_config(**kwargs)— returns a configuration dictionary for the verb
Returns
None