MCP Commands - Memory Bank

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations > Memory Bank - Commands for storing and recalling data >

MCP Commands - Memory Bank

MEM.R

PreviousTopNext


MiniRobot Language (MRL) - MCP Memory Bank

 

MEM.R

Simple recall

Shortcut for: MEM.RCL|$$KEY|$$RETURN_VAR

 

Syntax

 

MEM.R|$$KEY|$$RETURN_VAR

 

Parameters

 

$$KEY

The key name of the value to retrieve. Case-sensitive.

 

$$RETURN_VAR

The variable to receive the stored value.

 

Return Value

 

The stored value is placed in $$RETURN_VAR. If the key does not exist, $$RETURN_VAR will be empty.

 

Description

 

MEM.R is a shortcut command for recalling values from memory. It is equivalent to using MEM.RCL and provides a shorter syntax for quick value retrieval.

 

Examples

 

Example 1: Simple store and recall pair

' Store data

MEM.S|$$MyData|Hello World

 

' Recall it

MEM.R|$$MyData|$$Result

' $$Result now contains "Hello World"

 

Example 2: Same as MEM.RCL

' These two lines are equivalent:

MEM.R|$$Key|$$Var

MEM.RCL|$$Key|$$Var

 

Remarks

 

• MEM.R is designed to pair with MEM.S for quick temporary storage operations.

• If the key doesn't exist, the return variable will be empty (not an error).

• Use MEM.EXS if you need to distinguish between empty values and missing keys.

• The Memory Bank feature requires the RESOURCES capability in MCP server configuration.

 

Related Commands

 

MEM.S - Simple store (paired command)

MEM.RCL - Full recall command

Memory Bank Overview