moonbitstack/moonmcp/transforms does not have a README file

    Transform

    A rewrite of the components a server offers (← FastMCP's transforms).

    The server applies every transform it was given to the whole set, in the order they were added, each time the set is listed and before a call is looked up. A transform therefore sees its predecessor's output: the order is the meaning.

    Every method has a default that leaves the set alone, so a transform implements only the kinds it touches.

    Hidden

    pub(all) struct Hidden {
    names :
    Set
    [String]
    }

    Keep a component out of the listing, and out of reach: a call to a hidden name is answered as an unknown one.

    Hidden::hides

    fn Hidden::hides(self : Hidden, name : String) -> Bool

    Whether name is hidden.

    Hidden::new

    fn Hidden::new(names~ : Array[String]) -> Hidden

    Hide the components named here — a tool or prompt name, a resource URI or a template pattern.

    Namespace

    pub(all) struct Namespace {
    prefix : String
    }

    Put everything a server offers under prefix: a tool or prompt add becomes prefix_add, and a resource or template users://{id} becomes prefix+users://{id} (the prefix joins the scheme, so the URI keeps its shape and a template keeps its parameters).

    prefix should be spelled the way a tool name is — letters, digits, underscores and hyphens — since that is what prefixed tool names become.

    Namespace::new

    fn Namespace::new(prefix : String) -> Namespace

    A namespace under prefix.

    Namespace::rename

    fn Namespace::rename(self : Namespace, name : String) -> String

    The name name takes inside the namespace.

    Namespace::rename_uri

    fn Namespace::rename_uri(self : Namespace, uri : String) -> String

    The URI uri takes inside the namespace.

    Tagged

    pub(all) struct Tagged {
    any_of :
    Set
    [String]
    }

    Offer only the components that carry one of these tags. A component without tags is held back, since a set chosen by tag is a set of tagged things.

    Tagged::keeps

    fn Tagged::keeps(self : Tagged, tags :
    Set
    [String]) -> Bool

    Whether a component carrying tags passes.

    Tagged::new

    fn Tagged::new(any_of~ : Array[String]) -> Tagged

    Keep the components tagged with any of any_of.