{
  "name": "fx-rates",
  "version": "1.0.0",
  "display_name": "Exchange rates",
  "description": "Converts an amount of money between currencies with the daily reference rates of the European Central Bank. No account needed.",
  "author": { "name": "DokProd (example)" },
  "_meta": {
    "com.desktopaicompanion": {
      "apiVersion": 1,
      "kind": "declarative",
      "slug": "fx",
      "minAppVersion": "0.9.0",
      "permissions": {
        "network": { "hosts": ["api.frankfurter.dev"] }
      },
      "tools": {
        "convert": {
          "description": "Convert an amount of money from one currency to another with today's reference rates. Currencies are three-letter codes such as USD, EUR or JPY.",
          "risk": "R0",
          "hint": {
            "en": "convert money between currencies",
            "fr": "convertir une somme entre devises",
            "de": "Geld zwischen Währungen umrechnen",
            "es": "convertir dinero entre divisas",
            "it": "convertire denaro tra valute",
            "pt": "converter dinheiro entre moedas",
            "ja": "通貨を換算する",
            "ru": "переводить деньги между валютами",
            "zh": "在货币之间换算金额",
            "ko": "통화 간 금액 환산"
          },
          "inputSchema": {
            "type": "object",
            "properties": {
              "amount": { "type": "number", "description": "Amount of money to convert.", "minimum": 0 },
              "from": { "type": "string", "description": "Currency to convert from, a three-letter code such as USD.", "maxLength": 3 },
              "to": { "type": "string", "description": "Currency to convert to, a three-letter code such as EUR.", "maxLength": 3 }
            },
            "required": ["amount", "from", "to"]
          },
          "request": {
            "method": "GET",
            "url": "https://api.frankfurter.dev/v1/latest",
            "query": { "base": "{{from}}", "symbols": "{{to}}", "amount": "{{amount}}" }
          },
          "response": { "pick": ["amount", "base", "date", "rates"] }
        }
      }
    }
  }
}
