colmugx/mcp/protocol/prompt does not have a README file

    Prompt

    pub(open) trait Prompt {
    fn name(Self) -> String
    fn description(Self) -> String
    fn arguments(Self) -> Array[
    PromptArgument
    ]
    async fn get(Self, Json) -> Result[
    GetPromptResult
    ,
    MCPError
    ]
    }

    Core Prompt trait following MCP protocol
    • name: Prompt identifier (unique)
    • description: Human-readable description
    • arguments: Array of argument definitions (@types.PromptArgument)
    • get: Async operation that returns prompt messages based on provided arguments

    PromptMRTR

    pub(open) trait PromptMRTR {
    fn name(Self) -> String
    fn description(Self) -> String
    fn arguments(Self) -> Array[
    PromptArgument
    ]
    async fn get(Self, Json) -> Result[PromptGetOutcome,
    MCPError
    ]
    }

    MRTR-aware prompt trait. Implement this instead of Prompt when a prompts/get handler needs to suspend and ask the client for input before completing. The get method receives the full get params (after _mrtr_responses has been merged on retry).

    PromptDefinition

    pub(all) struct PromptDefinition {
    name : String
    description : String?
    arguments : Array[
    PromptArgument
    ]?
    } derive(Eq,
    Debug
    )

    Prompt metadata definition (for protocol responses) Describes a prompt in the prompts/list response Note: This is separate from the Prompt trait which is for implementation Note: PromptArgument, PromptMessage, GetPromptResult are defined in @types package

    PromptGetOutcome

    pub(all) enum PromptGetOutcome {
    Complete(
    GetPromptResult
    )
    InputRequired(input_requests~ : Map[String,
    InputRequestEntry
    ], state~ : Json)
    } derive(Eq,
    Debug
    )

    The result of a prompts/get handler. Per the 2026-07-28 MRTR pattern, a handler may either complete normally (Complete) or request additional client input (InputRequired). On retry, the client resubmits with inputResponses and the echoed requestState; the handler receives those responses via _mrtr_responses in the get params.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io