updateTask method

Future<void> updateTask(
  1. String taskId,
  2. Map<String, dynamic> inputResponses, {
  3. Map<String, dynamic>? meta,
  4. RequestOptions? options,
})

Deliver input responses to an input_required task (tasks/update). inputResponses is keyed by the task's outstanding inputRequests keys.

Implementation

Future<void> updateTask(
    String taskId, Map<String, dynamic> inputResponses,
    {Map<String, dynamic>? meta, RequestOptions? options}) async {
  if (!isConnected) throw McpError('Client is not connected to a transport');
  await _sendRequest(
      'tasks/update',
      _withMeta(
          {'taskId': taskId, 'inputResponses': inputResponses}, meta), options);
}