spec method

ToolSpec? spec(
  1. String name
)

The spec of name; null for a tool the toolkit does not have (the assistant answers unknown tool).

Implementation

ToolSpec? spec(String name) {
  for (final spec in specs) {
    if (spec.name == name) return spec;
  }
  return null;
}