SchemaBuilder class
Builds Schema.* source code expressions from MCP parameter metadata.
SchemaBuilder translates between three representations:
- Raw Dart type strings (e.g.
'int','List<String>') → fromType - JSON-Schema-like maps produced by introspection → fromSchemaMap
- Ordered parameter lists with metadata → buildObjectSchema
All methods are static; the class is used purely as a namespace.
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 Methods
-
buildObjectSchema(
List< Map< params) → StringString, dynamic> > - Builds a Schema.object() expression from a list of parameter maps. Each param map has: 'name', 'type', 'schemaMap', 'isOptional', 'parameterMetadata'
-
fromSchemaMap(
Map< String, dynamic> schema) → String - Converts a schema map (from _introspectType) to a Schema.* expression.
-
fromType(
String rawType) → String -
Converts a Dart type string to a
Schema.*expression.