computeToolIsolated function

Future<Map<String, Object?>> computeToolIsolated(
  1. String toolName,
  2. Map<String, Object?> args,
  3. McpLimits limits
)

Runs the tool named toolName with the configured timeout. Convenience wrapper over runToolInIsolate, mirroring the native executor's API.

Implementation

Future<Map<String, Object?>> computeToolIsolated(
  String toolName,
  Map<String, Object?> args,
  McpLimits limits,
) {
  final timeoutMs = (args['timeoutMs'] as int?) ?? limits.timeoutMs;
  return runToolInIsolate(
    toolName,
    args,
    limits,
    Duration(milliseconds: timeoutMs),
  );
}