Class PollMcpTool

java.lang.Object
io.meeds.poll.mcp.PollMcpTool
All Implemented Interfaces:
io.meeds.mcp.server.plugin.McpToolPlugin

@Service @Profile("mcp-server") public class PollMcpTool extends Object implements io.meeds.mcp.server.plugin.McpToolPlugin
MCP tools exposing the Poll add-on to the AI agent (EVA). Every method acts as the current user, so space membership and redactor permissions are enforced by PollService.
  • Field Summary

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

    DEFAULT_LIMIT, DEFAULT_OFFSET
  • Constructor Summary

    Constructors
    Constructor
    Description
    PollMcpTool(io.meeds.poll.service.PollService pollService, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.manager.ActivityManager activityManager)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    createPoll(Long spaceId, String question, List<String> options, String duration, String message)
    Creates a poll (with its options) and posts it to a space activity stream.
    Returns a poll's question, options and current vote tallies.
    listSpacePolls(Long spaceId, Integer limit)
    Lists the polls posted in a space (most recent first) with their ids and current results, so a poll can be found without knowing its id.
    voteInPoll(Long pollOptionId)
    Casts the current user's vote for a poll option and returns the updated results.

    Methods inherited from class java.lang.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

    • PollMcpTool

      public PollMcpTool(io.meeds.poll.service.PollService pollService, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.manager.ActivityManager activityManager)
  • Method Details