struct
ActionController::MCPServer::UIMeta
- ActionController::MCPServer::UIMeta
- Struct
- Value
- Object
Overview
How hosts render a card, the _meta.ui of an MCP Apps resource.
Set a default with MCPServer.ui_meta, or override it for a card with a
<card>.meta.json file next to it, i.e. bookings/card.meta.json
Included Modules
- JSON::Serializable
Extended Modules
- JSON::Schema
Defined in:
action-controller/mcp/ui.crConstructors
- .new(pull : JSON::PullParser)
- .new(csp : ActionController::MCPServer::UICSP | Nil = nil, permissions : Nil | Hash(String, JSON::Any) = nil, domain : Nil | String = nil, prefers_border : Bool | Nil = nil)
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
Instance Method Summary
-
#csp : UICSP | Nil
domains the card needs, by default it can't load external resources
-
#domain : String | Nil
a dedicated sandbox origin, host specific
-
#permissions : Hash(String, JSON::Any) | Nil
browser permissions requested, i.e.
-
#prefers_border : Bool | Nil
whether the host should draw a border around the card
Constructor Detail
def self.new(csp : ActionController::MCPServer::UICSP | Nil = nil, permissions : Nil | Hash(String, JSON::Any) = nil, domain : Nil | String = nil, prefers_border : Bool | Nil = nil)
#
Instance Method Detail
domains the card needs, by default it can't load external resources
def permissions : Hash(String, JSON::Any) | Nil
#
browser permissions requested, i.e. {"camera": {}, "clipboardWrite": {}}