Tin

Examples · learn/16-tools · 220 of 339

schema.tools

examples/learn/16-tools/schema.tools.tintin run examples/learn/16-tools/schema.tools.tin
type Unit = | Celsius | Fahrenheit

/// Look up the weather for a city.
tool fn weather(
  /// City name, for example "Istanbul"
  city: string,
  unit: Unit,
  /// How many days ahead (0 = today). Optional.
  days: Option<int>,
): string => "sunny in {city}"

fn main() {}