addPromptMap method
void
addPromptMap({})
Map-based variant of addPrompt — accepts the prompt arguments as
raw spec JSON ([{name, description, required?, default?}]).
Sibling for adapters that hold the server as dynamic and so
can't synthesise List<PromptArgument> at the call site.
Implementation
void addPromptMap({
required String name,
required String description,
required List<Map<String, dynamic>> arguments,
required PromptHandler handler,
String? title,
List<Map<String, dynamic>>? icons,
Map<String, dynamic>? meta,
}) {
addPrompt(
name: name,
description: description,
arguments: arguments.map(PromptArgument.fromJson).toList(),
handler: handler,
title: title,
icons: icons,
meta: meta,
);
}