SchemaHelper class

Helper class for generating JSON schemas from Dart Maps. Simplifies tool parameter definition by automatically wrapping properties in the standard JSON schema object structure.

Constructors

SchemaHelper()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

emptySchema Map<String, dynamic>
Represents an empty JSON schema for tools without parameters.
no setter

Static Methods

arrayProperty({String? description, Map<String, dynamic>? items}) Map<String, dynamic>
Helper method to create an array property schema.
booleanProperty({String? description}) Map<String, dynamic>
Helper method to create a boolean property schema.
generateSchema(Map<String, dynamic> properties, {List<String>? required}) Map<String, dynamic>
Generates a complete JSON schema from a map of property definitions.
integerProperty({String? description}) Map<String, dynamic>
Helper method to create an integer property schema.
numberProperty({String? description}) Map<String, dynamic>
Helper method to create a number property schema.
stringProperty({String? description, List<String>? enumValues}) Map<String, dynamic>
Helper method to create a string property schema.