add Prompt
fun addPrompt(prompt: Prompt, promptProvider: suspend (GetPromptRequest) -> GetPromptResult)(source)
Registers a single prompt. The prompt can then be retrieved by the client.
Parameters
prompt
A Prompt object describing the prompt.
prompt Provider
A suspend function that returns the prompt content when requested by the client.
Throws
If the server does not support prompts.
fun addPrompt(name: String, description: String? = null, arguments: List<PromptArgument>? = null, promptProvider: suspend (GetPromptRequest) -> GetPromptResult)(source)
Registers a single prompt by constructing a Prompt from given parameters.
Parameters
name
The name of the prompt.
description
An optional human-readable description of the prompt.
arguments
An optional list of PromptArgument that the prompt accepts.
prompt Provider
A suspend function that returns the prompt content when requested.
Throws
If the server does not support prompts.