|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations > Server Lifecycle - Commands for managing the MCP server lifecycle (init, start, stop) > MCP. - Model Context Protocol |
MCP.TaskCheckResult |
Top |
MiniRobotLanguage (MRL)
MCP.TaskCheckResult
Check task result status
Intention
The MCP.TaskCheckResult command checks the result status of a completed or running task/job. This is useful for polling the status of asynchronous operations.
Syntax
MCP.TaskCheckResult|$$JOB_ID|$$STATUS_VAR|$$CONTENT_VAR
P1 - $$JOB_ID - The job ID to check
P2 - $$STATUS_VAR - Variable to receive status code
P3 - $$CONTENT_VAR - Variable to receive result content
Status Codes
0 = Pending/Running
1 = Completed successfully
-1 = Error/Failed
-2 = Job not found
Example
' Check task result
MCP.TaskCheckResult|$$JobID|$$Status|$$Content
' Check status
IF $$Status = 1 THEN
DBP.Task completed: $$Content
ELSEIF $$Status = 0 THEN
DBP.Task still running...
ELSE
DBP.Task failed or not found
END IF
' Using short alias
MCP.tcr|$$JobID|$$Status|$$Content
Related Commands
MCP.CheckJobResult - Check job result
MCP.WaitForJobResult - Wait for job completion
MCP.GetJobResult - Get job result