McpSchema class

Common JSON Schema helpers for tool input schemas

Constructors

McpSchema()

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({String? description, required Map<String, dynamic> items, bool required = false}) Map<String, dynamic>
Create an array property schema
boolean({String? description, bool required = false, bool? defaultValue}) Map<String, dynamic>
Create a boolean property schema
enumProperty({required List<String> values, String? description, bool required = false, String? defaultValue}) Map<String, dynamic>
Create an enum property schema
inputSchema({required String type, Map<String, dynamic>? properties, List<String>? required, String? description}) Map<String, dynamic>
Create a complete input schema for a tool
integer({String? description, bool required = false, int? defaultValue}) Map<String, dynamic>
Create an integer property schema
number({String? description, bool required = false, num? defaultValue}) Map<String, dynamic>
Create a number property schema
object({String? description, Map<String, dynamic>? properties, List<String>? required, bool additionalProperties = false}) Map<String, dynamic>
Create an object property schema
string({String? description, bool required = false, String? defaultValue}) Map<String, dynamic>
Create a string property schema