Class IndustrialProfile
java.lang.Object
neqsim.mcp.runners.IndustrialProfile
Industrial deployment profiles for the NeqSim MCP server.
Provides opinionated deployment modes that control which tools are exposed, whether human-approval gates are required for execution tools, and which validation level is enforced. Each profile is designed for a specific industry use case:
- DESKTOP_ENGINEER — Full access for a single engineer working on studies.
- STUDY_TEAM — Collaborative mode with session isolation and audit logging.
- DIGITAL_TWIN — Read-heavy advisory mode for plant operations support.
- ENTERPRISE — Restricted mode with approval gates, rate limiting, and minimal execution tools.
- Version:
- 1.0
- Author:
- Even Solbraa
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDeployment mode for the MCP server.static enumTool classification by risk level.static enumExplicit trust tier for each tool. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static IndustrialProfile.DeploymentModeActive deployment mode.private static booleanWhether human approval is required for execution tools.private static booleanWhether auto-validation is enforced on all calculation/execution tools.Tier 2 — Engineering advanced.Tier 3 — Experimental/research.private static final com.google.gson.GsonTier 1 — Trusted core.private static final Map<String, IndustrialProfile.ToolCategory> Tool-to-category classification for all MCP tools. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Map<String, IndustrialProfile.ToolCategory> Builds the tool-to-category mapping.private static intCounts the number of tools allowed in a given mode.static StringReturns a JSON description of all deployment modes and their tool access.static StringenforceAccess(String toolName) Enforces tool access for the current deployment mode.Gets the current deployment mode.Returns the set of Tier 2 (engineering advanced) tools.Returns the set of Tier 3 (experimental) tools.Returns the set of tools in the industrial core.private static StringReturns a human-readable description of a deployment mode.getToolCategory(String toolName) Gets the category for a specific tool.static IndustrialProfile.ToolTiergetToolTier(String toolName) Returns the tier classification for a tool.static booleanReturns whether auto-validation is enabled.static booleanisToolAllowed(String toolName) Checks whether a tool is accessible in the current deployment mode.static booleanrequiresApproval(String toolName) Checks whether a tool invocation requires human approval in the current mode.static voidSets the deployment mode.
-
Field Details
-
GSON
private static final com.google.gson.Gson GSON -
activeMode
Active deployment mode. -
autoValidationEnabled
private static volatile boolean autoValidationEnabledWhether auto-validation is enforced on all calculation/execution tools. -
approvalGateEnabled
private static volatile boolean approvalGateEnabledWhether human approval is required for execution tools. -
TOOL_CATEGORIES
Tool-to-category classification for all MCP tools. -
INDUSTRIAL_CORE
-
ENGINEERING_ADVANCED
-
EXPERIMENTAL_TOOLS
-
-
Constructor Details
-
IndustrialProfile
private IndustrialProfile()Private constructor — utility class.
-
-
Method Details
-
buildToolCategories
Builds the tool-to-category mapping.- Returns:
- unmodifiable map of tool name to category
-
getActiveMode
Gets the current deployment mode.- Returns:
- the active deployment mode
-
setActiveMode
Sets the deployment mode. This changes which tools are accessible and which governance controls are active.- Parameters:
mode- the deployment mode to activate
-
isToolAllowed
Checks whether a tool is accessible in the current deployment mode.- Parameters:
toolName- the MCP tool name- Returns:
- true if the tool is allowed
-
enforceAccess
Enforces tool access for the current deployment mode. Returns an error JSON string if the tool is blocked, or null if the tool is allowed. Call at the top of every @Tool method to prove governance is enforced in code, not just described in docs.- Parameters:
toolName- the MCP tool name being invoked- Returns:
- null if allowed, or a JSON error string if blocked
-
getToolTier
Returns the tier classification for a tool.- Parameters:
toolName- the MCP tool name- Returns:
- the tier, or null if the tool is not classified
-
requiresApproval
Checks whether a tool invocation requires human approval in the current mode.- Parameters:
toolName- the MCP tool name- Returns:
- true if approval is required before execution
-
isAutoValidationEnabled
public static boolean isAutoValidationEnabled()Returns whether auto-validation is enabled.- Returns:
- true if every calculation/execution tool auto-validates results
-
getToolCategory
Gets the category for a specific tool.- Parameters:
toolName- the MCP tool name- Returns:
- the tool category, or null if unknown
-
getIndustrialCore
-
getEngineeringAdvanced
-
getExperimentalTools
-
describeProfiles
Returns a JSON description of all deployment modes and their tool access.- Returns:
- JSON string describing all profiles
-
getProfileDescription
Returns a human-readable description of a deployment mode.- Parameters:
mode- the deployment mode- Returns:
- description string
-
countAllowedTools
Counts the number of tools allowed in a given mode.- Parameters:
mode- the deployment mode- Returns:
- count of allowed tools
-