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, context: Dictionary = {})

Dictionary

get_prompt(name: String, args: Dictionary)

Dictionary

list_prompts(cursor: String = "", include_unlisted: bool = false)


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, context: Dictionary = {}) ๐Ÿ”—

Looks up the prompt named by ref and returns completion values for argument. context is the optional MCP completion context from 2025-06-18 and later. 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 = "", include_unlisted: bool = false) ๐Ÿ”—

Returns a paginated MCP prompts/list dictionary with prompts and optional nextCursor. Invalid cursor values return an error dictionary with code -32602. When include_unlisted is false, prompts disabled by the Prompts section toggle or a per-prompt toggle are omitted.