|
<< 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.GetSecurityState
Get security state of a function/tool
Syntax
MCP.GetSecurityState|$$FUNC_KEY|$$RETURN_VAR
Parameters
$$FUNC_KEY
The function key of the tool to check, in the format Category::Function (e.g., "FileTools::Delete", "SystemTools::Exec").
$$RETURN_VAR
The variable to receive the security state. Returns one of the following values:
Enabled - Tool is explicitly enabled on the whitelist
Confirm - Tool requires user confirmation before execution
Disabled - Tool is disabled and cannot be executed
Unknown - Tool is not on any list (default state if whitelist is disabled)
Return Value
Returns a string indicating the current security state: "Enabled", "Confirm", "Disabled", or "Unknown".
Description
MCP.GetSecurityState checks the current security state of a specific tool in the Functional Memory system. This allows scripts to determine whether a tool is available for use, requires confirmation, or is blocked before attempting to execute it.
The security state is determined by checking the tool's presence on three internal lists: Enabled (whitelist), Confirm, and Disabled.
Examples
Example 1: Check if a tool is enabled
MCP.GetSecurityState|FileTools::Delete|$$State
IVV.$$State!Disabled
DSP.File delete is allowed
EIF.
Example 2: Handle tools requiring confirmation
MCP.GetSecurityState|SystemTools::Execute|$$ExecState
IVV.$$ExecState!Confirm
DSP.Warning: This operation requires user confirmation!
EIF.
SLL Implementation
SLL Function: MCP_FM_GetSecurityState
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 function key format must be Category::Function
• Priority order: Disabled > Confirm > Enabled > Unknown
• Useful for pre-flight checks before executing sensitive operations
See also:
• MCP.GetList - Get tools by state
• MCP.SetFunctionState - Change security state
• MCP.EnableWhitelist - Enable whitelist mode