|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations > Functional Memory - Tool execution and security management (SLL-ONLY) > MCP Commands - Functional Memory |
MiniRobot Language (MRL) - Functional Memory (SPR only - not in public MCP-Server)
⚡ SPR only - not in public MCP-Server FEATURE
This command is only available when using the MCP server as an SLL (Server-Side Library). It cannot be called via HTTP/MCP protocol.
MCP.SetFunctionState
Set security state of a function/tool
Syntax
MCP.SetFunctionState|$$FUNC_KEY|$$STATE
Parameters
$$FUNC_KEY
The function key of the tool to modify, in the format Category::Function (e.g., "FileTools::Delete", "SystemTools::Exec").
$$STATE
The new security state to set. Must be one of:
ENABLED - Add tool to the enabled/whitelist (execution allowed)
CONFIRM - Require user confirmation before executing this tool
DISABLED - Block/disable this tool from execution
Return Value
None. The tool's security state is updated in the Functional Memory system.
Description
MCP.SetFunctionState sets the security state of a specific tool in the Functional Memory system. This allows dynamic control over which tools are available for execution, which require confirmation, and which are blocked.
When a state is set, the tool is automatically removed from any other security lists first, ensuring it only appears on one list at a time.
Examples
Example 1: Enable a tool
' Allow FileTools::ReadFile to be executed
MCP.SetFunctionState|FileTools::ReadFile|ENABLED
Example 2: Disable a dangerous tool
' Block SystemTools::Format from execution
MCP.SetFunctionState|SystemTools::Format|DISABLED
Example 3: Require confirmation for sensitive operations
' Require confirmation before deleting files
MCP.SetFunctionState|FileTools::Delete|CONFIRM
SLL Implementation
SLL Function: MCP_FM_SetFunctionState
Source File: MCP_Tools.inc
Remarks
• This command is SPR only - not in public MCP-Server and cannot be called via the MCP HTTP protocol
• The state parameter is case-insensitive (ENABLED, enabled, Enabled are all valid)
• Setting a state automatically removes the tool from other security lists
• Use with caution - this affects tool availability for all subsequent calls
• Changes take effect immediately for new tool execution requests
See also:
• MCP.GetSecurityState - Check current state
• MCP.SetConfirmList - Batch set confirm list
• MCP.EnableWhitelist - Enable whitelist mode