JustAMCPPromptExecutor๏
Inherits: Object
Lists, resolves, and completes prompts for MCP clients.
Description๏
JustAMCPPromptExecutor owns the registered JustAMCPPrompt instances. It returns MCP-compatible prompt schemas, renders a named prompt with caller-provided arguments, and delegates completion requests to the matching prompt.
var prompt_exec = JustAMCPPromptExecutor.new()
var available = prompt_exec.list_prompts()
var rendered = prompt_exec.get_prompt("blazium_context", {})
print(available)
print(rendered)
Methods๏
void |
add_prompt(prompt: JustAMCPPrompt) |
complete_prompt(ref: Dictionary, argument: Dictionary) |
|
get_prompt(name: String, args: Dictionary) |
|
list_prompts(cursor: String = "") |
Method Descriptions๏
void add_prompt(prompt: JustAMCPPrompt) ๐
Registers a JustAMCPPrompt instance so it appears in list_prompts() and can be resolved by get_prompt(). Invalid prompt references are ignored.
Dictionary complete_prompt(ref: Dictionary, argument: Dictionary) ๐
Looks up the prompt named by ref and returns completion values for argument. Unknown prompts return an empty completion result.
Dictionary get_prompt(name: String, args: Dictionary) ๐
Renders the prompt named by name with args. Returns an error dictionary when no registered prompt has that name.
Dictionary list_prompts(cursor: String = "") ๐
Returns a paginated MCP prompts/list dictionary with prompts and optional nextCursor. Invalid cursor values return an error dictionary with code -32602.