McpSchema class abstract final

Minimal JSON-Schema (draft-07 subset) builder for MCP tool inputs.

The same declaration the params decoder consumes: keep the schema and the fromJson factory in sync — the schema is what the MCP client sees, the decoder is what actually runs.

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

array({required Map<String, dynamic> items, String? description}) → Map<String, dynamic>
An array schema over items.
boolean({String? description}) → Map<String, dynamic>
A boolean schema.
integer({String? description}) → Map<String, dynamic>
An integer schema.
number({String? description}) → Map<String, dynamic>
A number schema.
object({Map<String, dynamic> properties = const {}, List<String> required = const [], String? description}) → Map<String, dynamic>
An object schema with properties and required keys.
string({String? description, List<String> enumValues = const []}) → Map<String, dynamic>
A string schema, optionally constrained to enumValues.