TsgcWSAPIClient_MCP › Methods › TasksGet
Requests the status of a task (tasks/get) and returns it.
function TasksGet(const aTaskId: string): TsgcAI_MCP_TaskStatus;
| Name | Type | Description |
|---|---|---|
aTaskId | const string | Id of the task, from OnMCPTaskCreated. |
Requires the protocol version 2026-07-28; in the legacy era the method raises an exception. Raises OnMCPTaskStatus with the full task and returns aimcptskWorking, aimcptskInputRequired, aimcptskCompleted, aimcptskFailed or aimcptskCancelled. Use it when MCPOptions.Tasks.AutoPoll is False.
See Tasks.
if MCP.TasksGet(FTaskId) = aimcptskCompleted then
Log('done');