|
<< 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 - Command Filtering |
MiniRobot Language (MRL) - MCP Command Filtering Commands
MCP.GetCMDFilter
Retrieve Current Command Filter Rules
Purpose
The MCP.GetCMDFilter command retrieves the current command filter configuration from the MCP server. This allows scripts to inspect which filtering rules are active and how commands are being restricted.
This command is useful for:
• Auditing current security restrictions
• Debugging command access issues
• Documenting server configuration
• Verifying filter setup before operations
Syntax
MCP.GetCMDFilter|$$RETURN_VAR
Parameters
$$RETURN_VAR - The variable that will receive the filter configuration. The returned value contains a list of all active filter rules.
Return Value
Returns the current filter configuration as a structured string or list, showing:
• Filter type (INCLUDE, EXCLUDE, REGEX, PREFIX)
• Filter pattern
• Action (ALLOW or DENY)
• Rule order/priority
Examples
' Example 1: Get current filter configuration
MCP.GetCMDFilter|$$FilterConfig
PRT.Current filters: $$FilterConfig
' Example 2: Check if any filters are active
MCP.GetCMDFilter|$$Filters
LEN.$$Filters|$$FilterLen
IVV.$$FilterLen!0
PRT.Command filtering is active
ELS.
PRT.No command filters configured
EIF.
' Example 3: Save filter config to memory for later
MCP.GetCMDFilter|$$CurrentFilters
MEM.S|$$FilterBackup|$$CurrentFilters
Remarks
If no filters are configured, the command returns an empty string or a special NONE indicator depending on the server implementation. The returned filter list is in the order that filters are evaluated.
The format of the returned filter configuration may vary based on the MCP server version. Scripts should parse the result carefully and not rely on specific formatting.
Error Conditions
The command will fail with an error if:
• The return variable parameter is missing
• Too many parameters are provided
See also:
• MCP.SetCMDFilter - Set Command Filter
• MCP.SaveCMDFilter - Save Command Filter
• MCP.LoadCMDFilter - Load Command Filter