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)

Dictionary

complete_prompt(ref: Dictionary, argument: Dictionary)

Dictionary

get_prompt(name: String, args: Dictionary)

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.