Sign in

    moonbitstack/moonmcp/prompts does not have a README file

    Message

    A wrapper for a prompt message with a role.

    Message::equal

    fn Message::equal(Message, Message) -> Bool

    Message::not_equal

    fn Message::not_equal(x : Message, y : Message) -> Bool

    Message::of_content

    Create a message from an existing content block, user role by default.

    Message::text

    fn Message::text(text : String, role? :
    Role
    ) -> Message

    Create a message from plain text, user role by default.

    Message::to_mcp_prompt_message

    Convert to the wire prompt message.

    Message::to_repr

    Prompt

    A prompt template that can be rendered with arguments.
    impl Component for Prompt

    Prompt::convert_result

    fn Prompt::convert_result(self : Prompt, raw_value : RenderedPrompt) -> PromptResult

    Convert a rendered value to a canonical result.

    Prompt::get_meta

    fn Prompt::get_meta(self : Prompt) -> Map[String, Json]

    Prompt::identifier

    fn Prompt::identifier(self : Prompt) -> String

    Prompt::key

    fn Prompt::key(self : Prompt) -> String

    Prompt::new

    fn Prompt::new(name : String, render_fn~ : async (Map[String, Json]) -> RenderedPrompt raise
    FastMCPError
    , version? : String, title? : String, description? : String, icons? : Array[
    Icon
    ], tags? :
    Set
    [String], meta? : Map[String, Json], arguments? : Array[
    PromptArgument
    ]) -> Prompt

    Register a prompt; render_fn renders it with the given arguments.

    Prompt::render

    async fn Prompt::render(self : Prompt, arguments : Map[String, Json]) -> RenderedPrompt raise
    FastMCPError

    Render the prompt with arguments.

    Prompt::render_result

    async fn Prompt::render_result(self : Prompt, arguments : Map[String, Json]) -> PromptResult raise
    FastMCPError

    Server entry point for prompt rendering.

    Prompt::to_mcp_prompt

    Convert the prompt to its wire representation.

    PromptResult

    pub(all) struct PromptResult {
    messages : Array[Message]
    description : String?
    meta : Map[String, Json]?
    input_required :
    InputRequiredResult
    ?
    } derive(Eq,
    Debug
    )

    The canonical result of rendering a prompt.

    PromptResult::equal

    PromptResult::input_required

    Wrap a client-input ask (SEP-2322) as an ordinary prompt result.

    PromptResult::is_input_required

    fn PromptResult::is_input_required(self : PromptResult) -> Bool

    Whether this result carries a client-input ask (SEP-2322).

    PromptResult::new

    fn PromptResult::new(messages : Array[Message], description? : String, meta? : Map[String, Json]) -> PromptResult

    Create a prompt result from a list of messages.

    PromptResult::not_equal

    fn PromptResult::not_equal(x : PromptResult, y : PromptResult) -> Bool

    PromptResult::to_mcp_prompt_result

    Convert to the wire get-prompt result.

    RenderedPrompt

    pub(all) enum RenderedPrompt {
    Text(String)
    Messages(Array[Message])
    Ready(PromptResult)
    }

    What a prompt's render function may return: plain text, a message list, or an already-assembled result.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io