Package io.meeds.mcp.server.service
Class McpServerToolService
java.lang.Object
io.meeds.mcp.server.service.McpServerToolService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToolUpdateListener(ToolListener listener) voidvoidgetToolDefinition(String toolName) getToolDefinitionByMethodName(String methodName) booleanisAllowedTool(SimpleToolDefinition toolDefinition, org.springframework.security.core.Authentication authentication) booleanisAllowedTool(String toolOrMethodName, org.springframework.security.core.Authentication authentication) booleanbooleanisRequireApproval(String methodName, org.springframework.security.core.Authentication authentication) org.springframework.ai.tool.definition.ToolDefinitionupdateToolDefinition(String toolName, String title, String description, String inputSchema, boolean requireApproval, boolean disabled)
-
Field Details
-
SCOPE_PATTERN
- See Also:
-
READ_SCOPE_AUTHORITY
-
WRITE_SCOPE_AUTHORITY
-
WRITE_APPROVE_SCOPE_AUTHORITY
-
-
Constructor Details
-
McpServerToolService
public McpServerToolService()
-
-
Method Details
-
getToolDefinitionByMethodName
-
getToolDefinition
-
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
-
updateToolDefinition
-
addToolUpdateListener
-
isMcpServerEnabled
public boolean isMcpServerEnabled() -
enableMcpServer
public void enableMcpServer() -
disableMcpServer
public void disableMcpServer()
-