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.LST

PreviousTopNext


MiniRobot Language (MRL) - MCP Memory Bank

 

MEM.LST

List all memory keys (with optional filter)

Alias: MEM.List, MCP.MemLst

 

Syntax

 

MEM.LST|$$RETURN_VAR

MEM.LST|$$RETURN_VAR|$$FILTER

 

Parameters

 

$$RETURN_VAR

The variable to receive the list of keys. Keys are typically returned as a delimited list.

 

$$FILTER (Optional)

A filter pattern to match key names. Only keys matching the filter will be returned.

 

Return Value

 

A list of key names. The format depends on the MCP implementation (typically newline-delimited or comma-separated). If no keys exist, an empty string is returned.

 

Description

 

MEM.LST retrieves a list of all keys currently stored in the MCP Memory Bank. This is useful for debugging, inventory purposes, or when you need to iterate over stored data.

 

An optional filter can be specified to return only keys matching a pattern. The filter syntax depends on the MCP implementation (may support wildcards or partial matching).

 

Examples

 

Example 1: List all keys

' Get all memory keys

MEM.LST|$$AllKeys

LBL.|Memory keys:

LBL.|$$AllKeys

 

Example 2: List keys with filter

' Get only keys starting with "Config"

MEM.LST|$$ConfigKeys|Config*

LBL.|Configuration keys:

LBL.|$$ConfigKeys

 

Example 3: Count memory entries

' Get all keys and count them

MEM.LST|$$Keys

LFT.$$Keys|$$Count|§§

LBL.|Number of memory entries: $$Count

 

Remarks

 

• The list includes both TEMP and PERM storage keys.

• The delimiter used in the returned list depends on the MCP implementation.

• Large numbers of keys may produce a very long return value.

• Use the filter parameter to reduce the result set when working with many keys.

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

 

Related Commands

 

MEM.DEL - Delete a key

MEM.EXS - Check specific key existence

MEM.STO - Store values

Memory Bank Overview