Skip to content

annotation ActionController::Icon #

an icon for an MCP tool or prompt, repeatable for different sizes and themes. On a controller it's the default for its tools and prompts, the toolbox's icon and, for @[AC::MCP(endpoint: true)] controllers, the endpoint server's icon.

src is used as is when it's an https: or data: URL, otherwise a file in MCPServer.ui_base is sent as a data: URL, falling back to a path on the current host. Every other argument is passed through as is (sizes, theme, mimeType)

@[AC::Icon(src: "icons/book.svg", sizes: ["any"])]
@[AC::Icon(src: "icons/book-dark.svg", sizes: ["any"], theme: "dark")]
@[AC::Route::POST("/")]
def create(booking : Booking) : Booking