MCP Commands - Command Filtering

<< 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

MCP.LoadCMDFilter - Load Command Filter

PreviousTopNext


MiniRobot Language (MRL) - MCP Command Filtering Commands

 

MCP.LoadCMDFilter

Load Command Filter Configuration

 

Purpose

 

The MCP.LoadCMDFilter command loads a previously saved command filter configuration from persistent storage. This allows restoring filter rules that were saved using MCP.SaveCMDFilter.

 

This command is useful for:

• Restoring saved security configurations

• Deploying standard filter templates

• Switching between different security profiles

• Initializing servers with predefined restrictions

 

Syntax

 

MCP.LoadCMDFilter|$$FILENAME

 

Parameters

 

$$FILENAME - The path and filename of the filter configuration to load. If omitted, loads from the default filter configuration file.

 

Return Value

 

Returns a status code indicating the result:

OK - Filter configuration loaded successfully

NOTFOUND - Filter file not found

INVALID - Filter file format is invalid or corrupted

ERROR - Failed to load filter configuration

 

Examples

 

' Example 1: Load from default location

MCP.LoadCMDFilter|

PRT.Default filter configuration loaded

 

' Example 2: Load specific security profile

MCP.LoadCMDFilter|C:\MCP\Filters\HighSecurity.cfg

 

' Example 3: Load with error checking

MCP.LoadCMDFilter|C:\Filters\Custom.cfg

GVC.$$_RC|$$Result

SCH.$$Result|OK|$$Loaded

IVV.$$Loaded!0

PRT.Filter loaded successfully

ELS.

PRT.Failed to load filter: $$Result

EIF.

 

Remarks

 

Loading a filter configuration replaces all current filter rules with the loaded configuration. Any existing filters are cleared before the new configuration is applied.

 

If the filter file was created by a different version of the MCP server, some features may not be available or may behave differently. Always test filter configurations after loading.

 

Error Conditions

 

The command will fail with an error if:

• The specified file does not exist

• The file format is invalid or corrupted

• The file cannot be read (permissions)

• Too many parameters are provided

 

See also:

 

MCP.SaveCMDFilter - Save Command Filter

MCP.SetCMDFilter - Set Command Filter

MCP.GetCMDFilter - Get Command Filter