Package io.meeds.appcenter.mcp
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.-
Field Summary
Fields inherited from interface io.meeds.mcp.server.plugin.McpToolPlugin
DEFAULT_LIMIT, DEFAULT_OFFSET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFavoriteApp(Long applicationId) Adds an application to the current user's favorites.createPersonalApp(String title, String url, String icon) Creates a personal URL application (a shortcut to an external URL) owned by the current user.deletePersonalApp(Long applicationId) Deletes a personal URL application owned by the current user.Lists the current user's launcher drawer: the mandatory apps plus the apps they marked as favorites.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.removeFavoriteApp(Long applicationId) Removes an application from the current user's favorites.reorderFavoriteApps(List<Long> applicationIds) Reorders the current user's favorite applications.updatePersonalApp(Long applicationId, String title, String url, String icon) Updates a personal URL application owned by the current user.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.meeds.mcp.server.plugin.McpToolPlugin
getCurrentUserAclIdentity, getCurrentUserLocale, getCurrentUserLocale, getCurrentUserName, getLocale
-
Constructor Details
-
AppCenterMcpTool
-
-
Method Details
-
listMyApps
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
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
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
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
-