McpMetadataKey class
Key with full metadata for MCP Contains all the information needed for registration and events
Constructors
-
McpMetadataKey({required String id, required McpWidgetType widgetType, String? description, String? screen, List<
String> ? tags, Map<String, dynamic> ? customMetadata}) -
const
-
McpMetadataKey.fromJson(Map<
String, dynamic> json) -
Create from JSON (useful for testing/mocking)
factory
Properties
-
capabilities
→ List<
String> -
Get capabilities (available actions) based on the widget type
no setter
-
customMetadata
→ Map<
String, dynamic> ? -
Additional custom metadata
final
- description → String?
-
Human-readable widget description
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique widget identifier (used for remote actions)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screen → String?
-
Context / screen where the widget is located
final
-
Additional tags for search/filtering
final
- widgetType → McpWidgetType
-
Widget type
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert to JSON (uses MCP format by default)
-
toMcpFormat(
) → Map< String, dynamic> - Convert to the format expected by the MCP Server Compatible with example_widgets.json format
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited