|
<< 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.GetFeature / MCP.GetCapability
Get Feature Capability Information
Purpose
The MCP.GetFeature command retrieves information about a specific MCP feature, including its availability, current state, and capabilities. This allows scripts to determine which features are available and how they are configured.
This command is useful for:
• Checking if a specific feature is available
• Determining feature configuration options
• Querying current feature state
• Writing feature-conditional code
Syntax
MCP.GetFeature|$$FEATURE_NAME|$$RETURN_VAR
MCP.GetCapability|$$FEATURE_NAME|$$RETURN_VAR
Parameters
$$FEATURE_NAME - The name of the feature to query. Common features include: MEMORY, SCREENSHOT, CLIPBOARD, FILE, REGISTRY, PROCESS, WINDOW, NETWORK.
$$RETURN_VAR - The variable that will receive the feature capability information.
Return Value
Returns feature capability information that may include:
AVAILABLE - Feature is available but disabled
ENABLED - Feature is available and enabled
DISABLED - Feature is disabled
NOTFOUND - Feature is not available in this server version
Examples
' Example 1: Check if Memory feature is enabled
MCP.GetFeature|MEMORY|$$MemFeature
SCH.$$MemFeature|ENABLED|$$IsEnabled
IVV.$$IsEnabled!0
PRT.Memory feature is enabled
ELS.
PRT.Memory feature is not enabled
EIF.
' Example 2: Check Screenshot capability
MCP.GetFeature|SCREENSHOT|$$SSFeature
IVV.$$SSFeature!NOTFOUND
MCP.Screenshot|screen.png
ELS.
PRT.Screenshot feature not available
EIF.
Remarks
MCP.GetFeature and MCP.GetCapability are aliases for the same command. The feature names are case-insensitive but should use uppercase for consistency.
Feature availability depends on the MCP server configuration and version. Features may be compiled into the server but disabled by configuration settings.
Error Conditions
The command will fail with an error if:
• The feature name parameter is missing
• The return variable parameter is missing
• Too many parameters are provided
See also:
• MCP.SetFeature - Set Feature State
• MCP.GetStatus - Get Server Status
• MCP.GetStatusByte - Get Status Byte