Class AppCenterMcpTool

java.lang.Object
io.meeds.appcenter.mcp.AppCenterMcpTool
All Implemented Interfaces:
io.meeds.mcp.server.plugin.McpToolPlugin

@Service @Profile("mcp-server") public class AppCenterMcpTool extends Object implements io.meeds.mcp.server.plugin.McpToolPlugin
MCP tools exposing the App-Center add-on to the AI agent (EVA). Every method acts as the current user (resolved via McpToolPlugin.getCurrentUserName()) and passes that username to ApplicationCenterService, so access rights, favorite ownership and personal-app ownership are all enforced by the service. Admin-only catalog management is intentionally not exposed here.
  • Constructor Details

  • Method Details

    • listMyApps

      public List<AppModel> listMyApps(String keyword, Integer offset, Integer limit)
      Lists the applications the current user is authorized to use (active apps they may access), optionally filtered by a keyword on title/url, with each app flagged as favorite or not.
    • listMyAppDrawer

      public List<AppModel> listMyAppDrawer()
      Lists the current user's launcher drawer: the mandatory apps plus the apps they marked as favorites.
    • addFavoriteApp

      public String addFavoriteApp(Long applicationId) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Adds an application to the current user's favorites.
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
    • removeFavoriteApp

      public String removeFavoriteApp(Long applicationId)
      Removes an application from the current user's favorites.
    • reorderFavoriteApps

      public String reorderFavoriteApps(List<Long> applicationIds) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Reorders the current user's favorite applications. Pass the favorite application ids in the desired display order (first id shown first). Any id that is not yet a favorite gets added while being ordered.
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
    • createPersonalApp

      public AppModel createPersonalApp(String title, String url, String icon)
      Creates a personal URL application (a shortcut to an external URL) owned by the current user. Requires the personal-apps feature to be enabled on the instance.
    • updatePersonalApp

      public AppModel updatePersonalApp(Long applicationId, String title, String url, String icon) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Updates a personal URL application owned by the current user. Only the supplied fields are changed (title, url and/or icon).
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
    • deletePersonalApp

      public String deletePersonalApp(Long applicationId) throws org.exoplatform.commons.exception.ObjectNotFoundException
      Deletes a personal URL application owned by the current user.
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException