MCPcopy Create free account
hub / github.com/modelcontextprotocol/inspector / isTaskResult

Function isTaskResult

client/src/App.tsx:1070–1080  ·  view source on GitHub ↗
(
        res: unknown,
      )

Source from the content-addressed store, hash-verified

1068 // Check if this was a task-augmented request that returned a task reference
1069 // The server returns { task: { taskId, status, ... } } when a task is created
1070 const isTaskResult = (
1071 res: unknown,
1072 ): res is {
1073 task: { taskId: string; status: string; pollInterval: number };
1074 } =>
1075 !!res &&
1076 typeof res === "object" &&
1077 "task" in res &&
1078 !!res.task &&
1079 typeof res.task === "object" &&
1080 "taskId" in res.task;
1081
1082 if (runAsTask && isTaskResult(response)) {
1083 const taskId = response.task.taskId;

Callers 1

callToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected