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.SaveCMDFilter - Save Command Filter

PreviousTopNext


MiniRobot Language (MRL) - MCP Command Filtering Commands

 

MCP.SaveCMDFilter

Save Command Filter Configuration

 

Purpose

 

The MCP.SaveCMDFilter command saves the current command filter configuration to persistent storage. This ensures that filter rules persist across server restarts and can be shared between server instances.

 

This command is useful for:

• Persisting security configurations

• Backing up filter rules

• Sharing configurations between servers

• Maintaining consistent security policies

 

Syntax

 

MCP.SaveCMDFilter|$$FILENAME

 

Parameters

 

$$FILENAME - The path and filename to save the filter configuration. If omitted, saves to the default filter configuration file.

 

Return Value

 

Returns a status code indicating the result:

OK - Filter configuration saved successfully

ERROR - Failed to save filter configuration

 

Examples

 

' Example 1: Save to default location

MCP.SaveCMDFilter|

PRT.Filter configuration saved to default location

 

' Example 2: Save to specific file

MCP.SaveCMDFilter|C:\MCP\Filters\SecureFilter.cfg

PRT.Filter saved to custom location

 

Remarks

 

The saved filter configuration can be loaded later using MCP.LoadCMDFilter. The format is server-specific and may include additional metadata such as creation date and version information.

 

If the specified directory does not exist, the command will attempt to create it. If the file already exists, it will be overwritten.

 

Error Conditions

 

The command will fail with an error if:

• The specified path cannot be created

• The file cannot be written (permissions)

• Too many parameters are provided

 

See also:

 

MCP.LoadCMDFilter - Load Command Filter

MCP.SetCMDFilter - Set Command Filter

MCP.GetCMDFilter - Get Command Filter