MCP Commands - Logging & Security

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations > Logging & Security - Logging and access control >

MCP Commands - Logging & Security

MCP.SetWhitelist - Set Whitelist

PreviousTopNext


MiniRobot Language (MRL) - MCP Logging & Security Commands

 

MCP.SetWhitelist

Configure Whitelist Entries

 

Purpose

 

The MCP.SetWhitelist command sets the list of actions that should be automatically approved when whitelist checking is enabled. This replaces the current whitelist with the specified list of action identifiers.

 

This command is used to configure which operations are considered safe enough to be automatically approved without user interaction.

 

Syntax

 

MCP.SetWhitelist|$$ACTION_LIST

 

Parameters

 

$$ACTION_LIST - A delimited list of action identifiers to whitelist. Actions should be separated by the delimiter specified by the server (typically comma or pipe).

 

Return Value

 

OK - Whitelist was updated successfully

ERROR - Invalid parameter format

 

Examples

 

' Example 1: Set whitelist with single action

MCP.SetWhitelist|FileRead

 

' Example 2: Set whitelist with multiple actions

MCP.SetWhitelist|FileRead,FileWrite,DirectoryList

 

' Example 3: Clear whitelist (empty list)

MCP.SetWhitelist|

 

' Example 4: Set whitelist using variable

MEM.S|$$AllowedActions|FileRead|FileWrite|RegistryRead

MCP.SetWhitelist|$$AllowedActions

 

Remarks

 

This command replaces the entire whitelist. To add or remove individual items, you should first retrieve the current whitelist with MCP.GetWhitelist, modify it, and then set it again.

 

Common action identifiers include: FileRead, FileWrite, FileDelete, DirectoryCreate, DirectoryDelete, RegistryRead, RegistryWrite, ExecuteCommand, etc. The exact identifiers depend on the MCP server configuration.

 

Error Conditions

 

The command will fail with a parameter error if:

• The action list parameter is missing (pass empty string to clear)

• Too many parameters are provided

 

See also:

 

MCP.GetWhitelist - Get Whitelist

MCP.EnableWhitelist - Enable Whitelist

MCP.Permission - Request Permission