getTask method
Poll a task's current state (tasks/get).
Implementation
Future<Task> getTask(String taskId) async {
if (!isConnected) throw McpError('Client is not connected to a transport');
final response = await _sendRequest('tasks/get', {'taskId': taskId});
if (response == null) throw McpError('tasks/get returned no result');
return Task.fromJson(Map<String, dynamic>.from(response as Map));
}