Class McpServerToolService

java.lang.Object
io.meeds.mcp.server.service.McpServerToolService

@Service public class McpServerToolService extends Object
  • Field Details

    • SCOPE_PATTERN

      public static final String SCOPE_PATTERN
      See Also:
    • READ_SCOPE_AUTHORITY

      public static final String READ_SCOPE_AUTHORITY
    • WRITE_SCOPE_AUTHORITY

      public static final String WRITE_SCOPE_AUTHORITY
    • WRITE_APPROVE_SCOPE_AUTHORITY

      public static final String WRITE_APPROVE_SCOPE_AUTHORITY
  • Constructor Details

    • McpServerToolService

      public McpServerToolService()
  • Method Details

    • getToolDefinitionByMethodName

      public SimpleToolDefinition getToolDefinitionByMethodName(String methodName)
    • getToolDefinition

      public SimpleToolDefinition getToolDefinition(String toolName)
    • isRequireApproval

      public boolean isRequireApproval(String methodName, org.springframework.security.core.Authentication authentication)
    • isAllowedTool

      public boolean isAllowedTool(String toolOrMethodName, org.springframework.security.core.Authentication authentication)
    • isAllowedTool

      public boolean isAllowedTool(SimpleToolDefinition toolDefinition, org.springframework.security.core.Authentication authentication)
    • getToolDefinitions

      public Map<String,SimpleToolDefinition> getToolDefinitions()
    • updateToolDefinition

      public org.springframework.ai.tool.definition.ToolDefinition updateToolDefinition(String toolName, String title, String description, String inputSchema, boolean requireApproval, boolean disabled)
    • addToolUpdateListener

      public void addToolUpdateListener(ToolListener listener)
    • isMcpServerEnabled

      public boolean isMcpServerEnabled()
    • enableMcpServer

      public void enableMcpServer()
    • disableMcpServer

      public void disableMcpServer()