|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations > Status & Configuration - Server status and features > MCP Commands - Feature Control |
MiniRobot Language (MRL) - MCP Feature Control Commands
MCP.SetFeature
Enable or Disable MCP Features
Purpose
The MCP.SetFeature command enables or disables specific MCP features at runtime. This allows dynamic control over which server capabilities are active without restarting the server.
This command is useful for:
• Temporarily disabling features for security
• Enabling features on demand
• Implementing feature-based access control
• Dynamic server configuration
Syntax
MCP.SetFeature|$$FEATURE_NAME|$$STATE
Parameters
$$FEATURE_NAME - The name of the feature to enable or disable. Common features include: MEMORY, SCREENSHOT, CLIPBOARD, FILE, REGISTRY, PROCESS, WINDOW, NETWORK, SYSTEM.
$$STATE - The state to set: 1, ON, TRUE, or ENABLE to enable; 0, OFF, FALSE, or DISABLE to disable.
Return Value
Returns a status code indicating the result:
OK - Feature state was successfully changed
NOTFOUND - Feature not available in this server
ERROR - Failed to change feature state
Examples
' Example 1: Enable Memory feature
MCP.SetFeature|MEMORY|ENABLE
PRT.Memory feature enabled
' Example 2: Disable Screenshot feature for security
MCP.SetFeature|SCREENSHOT|DISABLE
PRT.Screenshot feature disabled
' Example 3: Conditional feature enable
' Check if we need clipboard access
IVV.$$NeedClipboard!0
MCP.SetFeature|CLIPBOARD|ON
MCP.MemFromClip|$$ClipboardData
MCP.SetFeature|CLIPBOARD|OFF
EIF.
Remarks
Feature state changes take effect immediately. If a feature is disabled, any subsequent commands using that feature will fail with a feature-not-enabled error.
Note that some critical features may not be disableable for system stability reasons. Attempting to disable such features will return an ERROR status.
Feature states set via this command are temporary and will reset to defaults when the server restarts unless the configuration is saved.
Error Conditions
The command will fail with an error if:
• The feature name parameter is missing
• The state parameter is missing or invalid
• The feature is not available
• Too many parameters are provided
See also:
• MCP.GetFeature - Get Feature Capability
• MCP.SetCMDFilter - Set Command Filter