MCP Commands - Data Tools

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations > Data Tools - Data analysis operations >

MCP Commands - Data Tools

DataGetInfo - Get Data Information

PreviousTopNext


MiniRobot Language (MRL) - MCP Data Tools Commands

 

MCP.DataGetInfo

Get Data Information

 

Purpose

 

The MCP.DataGetInfo command retrieves metadata and information about data stored in the MCP Data Store. This command provides details such as data size, line count, creation time, and other properties that help you understand the structure and characteristics of stored data without retrieving the entire content.

 

This command is particularly useful when:

• Determining the size of data before retrieval

• Checking line count for pagination decisions

• Verifying data existence and accessibility

• Checking data properties before processing

 

Syntax

 

MCP.DataGetInfo|$$DATA_KEY|$$INFO_VAR

 

Parameters

 

$$DATA_KEY - The key identifier of the data in the MCP Data Store.

 

$$INFO_VAR - The variable that will receive the information structure containing data properties.

 

Return Value

 

The command populates $$INFO_VAR with a structured string containing:

SIZE - Total size of the data in bytes

LINES - Number of lines in the data

TYPE - Data type (TEXT, BINARY, JSON, etc.)

CREATED - Creation timestamp

MODIFIED - Last modification timestamp

 

Examples

 

' Example 1: Get basic data information

MCP.DataGetInfo|$$MyData|$$Info

PRT.Data info: $$Info

 

' Example 2: Check data size before retrieval

MCP.DataGetInfo|$$LargeFile|$$FileInfo

' Parse SIZE from $$FileInfo

REG.Get|$$FileInfo|SIZE|(\d+)|$$Size

IVV.$$Size!1000000

PRT.Large file detected: $$Size bytes

ELS.

MCP.DataGetLines|$$LargeFile|1|100|$$Data

EIF.

 

Remarks

 

The MCP.DataGetInfo command requires the Data Tools feature to be enabled in the MCP server configuration. If the feature is disabled or the data key does not exist, an appropriate error will be returned.

 

The information structure returned can be parsed using standard MiniRobot string manipulation commands or regular expressions to extract specific property values.

 

Error Conditions

 

The command will fail with an error if:

• The data key parameter is missing

• The return variable parameter is missing

• The specified data key does not exist in the Data Store

• The MCP Data Tools feature is disabled

 

See also:

 

MCP.DataGetLines - Get Lines from Data

MCP.DataFindText - Find Text in Data

Data Tools Overview