MCP TypeScript SDK (V2)
    Preparing search index...
    • Consumes a ResponseMessage stream and returns the final result, discarding intermediate taskCreated and taskStatus messages. Throws if an error message is received or the stream ends without a result.

      Type Parameters

      • T extends {
            _meta?: {
                "io.modelcontextprotocol/related-task"?: { taskId: string };
                progressToken?: string | number;
                [key: string]: unknown;
            };
            [key: string]: unknown;
        }
      • U extends AsyncGenerator<ResponseMessage<T>, any, any>

      Parameters

      • it: U

      Returns Promise<T>