Calculate emissions
calculate_emissionsCalculate emissions for one activity: activity data × an official factor from the database. Checks units, the applicable year and whether the factor may be used for calculation, and returns the formula, kg and tonnes, the factor version and the source URL. Returns a clear error instead of guessing when the unit is incompatible, the year does not match or required data is missing (fuel factors need a user-supplied lower heating value; refrigerants need the basis of the quantity). A refrigerant blend such as R-410A can be calculated by passing refrigerant_blend with the user-supplied composition instead of factor_id. 計算單一活動的排放量:活動數據 × 資料庫中的官方係數。會檢查單位、適用年度與係數是否可用於計算,回傳公式、公斤與公噸、係數版本與來源網址。單位不相容、年度不符或缺少必要資料時(燃料係數需要使用者提供低位熱值,冷媒需要說明數量的依據)回傳明確錯誤,不會猜測。混合冷媒(如 R-410A)可不給 factor_id,改以 refrigerant_blend 提供使用者確認過的成分比例。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"quantity": "<quantity>",
"quantity_unit": "<quantity_unit>"
},
"name": "calculate_emissions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | 活動發生的年度(西元)。有給就必須與係數的適用年度相符,不會自動以其他年度代替。 | |
| quantity | Yes | 活動數據,不小於零。可用數字或十進位字串(字串可避免精度問題),例如 12000 或 "17.495"。 | |
| factor_id | No | 係數 ID,來自 search_emission_factors 或 get_electricity_factor 的結果。請勿自行猜測。 | |
| quantity_unit | Yes | 活動數據的單位,例如 kWh、度、L、公秉、kg、t、m3。「度」在電是 kWh、在水是 m³。 | |
| factor_version | No | 指定係數版本,用來重現過去的計算。不給就用目前版本。 | |
| optional_context | No | 補充資料。燃料燃燒係數需要 lower_heating_value;冷媒等含氟氣體的逸散需要 refrigerant。 | |
| refrigerant_blend | No | 混合冷媒(例如 R-410A)。成分比例必須來自使用者或設備、冷媒的規格文件;本服務沒有內建任何冷媒的成分,請勿憑記憶填寫,不確定時請向使用者確認。 |