addPrompt

fun addPrompt(prompt: KFunction<*>): Boolean

Dynamically adds a new prompt to the server at runtime.

Return

true if the prompt was added, false if it was already present.

Parameters

prompt

The @McpPrompt-annotated function reference.