Class BrandingMcpTool

java.lang.Object
io.meeds.layout.mcp.BrandingMcpTool
All Implemented Interfaces:
io.meeds.mcp.server.plugin.McpToolPlugin

@Service @Profile("mcp-server") public class BrandingMcpTool extends Object implements io.meeds.mcp.server.plugin.McpToolPlugin
The write tools of the Branding and Theme administration and of the navigation settings: every public method is an MCP tool described in ai-tool-definitions.json, applied as the current user to every user at once, after the platform's own approval step for a caller whose token carries it. A tool maps its arguments and calls the Services, whose refusals carry the fixed texts the agent reads: does not exist: <object>, not allowed: administrators only, value is not accepted for <option>, could not be saved: theme, could not be saved: navigation display.
  • Field Summary

    Fields inherited from interface io.meeds.mcp.server.plugin.McpToolPlugin

    DEFAULT_LIMIT, DEFAULT_OFFSET
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Updates what the topbar shows and how the sidebar may be displayed: a field omitted keeps its value, the applications listed are merged by identifier or by the name shown in the user's language, the allowed modes replace the list.
    updateTheme(String part, Map<String,String> options, List<String> reset)
    Updates one part of the theme, colors, font, topbar, sidebars, drawers or page_and_apps, with the options its drawer offers: the named options are set, the reset ones return to their default, every other keeps its value.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.meeds.mcp.server.plugin.McpToolPlugin

    getCurrentUserAclIdentity, getCurrentUserLocale, getCurrentUserLocale, getCurrentUserName, getLocale
  • Constructor Details

    • BrandingMcpTool

      public BrandingMcpTool()
  • Method Details

    • updateTheme

      public ThemeDescription updateTheme(String part, Map<String,String> options, List<String> reset) throws IllegalAccessException
      Updates one part of the theme, colors, font, topbar, sidebars, drawers or page_and_apps, with the options its drawer offers: the named options are set, the reset ones return to their default, every other keeps its value. Applies at once to every user, as the Apply button does; not a draft. A page field is refused outside the Page drawer's vocabulary, a theme variable by the branding service. Returns the part as stored.
      Throws:
      IllegalAccessException
    • updateNavigationDisplay

      public NavigationDisplayDescription updateNavigationDisplay(TopbarDisplayOptions topbar, SidebarDisplayOptions sidebar) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException
      Updates what the topbar shows and how the sidebar may be displayed: a field omitted keeps its value, the applications listed are merged by identifier or by the name shown in the user's language, the allowed modes replace the list. Applies at once to every user; not a draft. Returns both parts as stored, each application named in the user's language.
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException