Skip to main content
Glama

Taiwan Carbon Open Data (Unofficial)

Calculate batch

calculate_batch
Read-onlyIdempotent

Calculate several activities at once, each with its own factor and source. A total is given only when every item succeeded and the items share a gas basis and boundary type; otherwise the reason is stated. An item may be a refrigerant blend such as R-410A: pass refrigerant_blend with the user-supplied composition instead of factor_id; it stays one row in the results, and its components count toward the total. 批次計算多筆活動,逐筆回傳結果與來源。只有全部成功、氣體基礎與邊界類型一致時才提供合計,否則說明不提供的原因。混合冷媒(如 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": {
      "items": "<items>"
    },
    "name": "calculate_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYes要計算的活動,最多 50 筆。每筆用 factor_id 或 refrigerant_blend 擇一。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / items / items / properties / factor_version / description
      Previous value: -"指定係數版本,用來重現過去的計算。不給就用目前版本。"New value: +"指定係數版本,用來重現過去的計算。不給就用目前版本。混合冷媒(refrigerant_blend)不適用,給了會回錯誤。"
  2. Changed3 schema fields changed
    • changedInput schema / properties / items / description
      Previous value: -"要計算的活動,最多 50 筆。"New value: +"要計算的活動,最多 50 筆。每筆用 factor_id 或 refrigerant_blend 擇一。"
    • addedInput schema / properties / items / items / properties / refrigerant_blend
      Added value: +{
      +  "description": "混合冷媒(例如 R-410A)。成分比例必須來自使用者或設備、冷媒的規格文件;本服務沒有內建任何冷媒的成分,請勿憑記憶填寫,不確定時請向使用者確認。",
      +  "properties": {
      +    "components": {
      +      "description": "各成分與其質量百分比,合計必須剛好是 100。",
      +      "items": {
      +        "properties": {
      +          "factor_id": {
      +            "description": "成分的係數 ID(公告附表四的含氟氣體),來自 search_emission_factors,例如查 R-32、HFC-125。",
      +            "maxLength": 120,
      +            "minLength": 1,
      +            "type": "string"
      +          },
      +          "mass_percent": {
      +            "description": "這個成分的質量百分比,例如 50。",
      +            "type": [
      +              "number",
      +              "string"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "factor_id",
      +          "mass_percent"
      +        ],
      +        "type": "object"
      +      },
      +      "maxItems": 6,
      +      "minItems": 2,
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "components"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / items / items / required
      Previous value: -[
      -  "factor_id",
      -  "quantity",
      -  "quantity_unit"
      -]New value: +[
      +  "quantity",
      +  "quantity_unit"
      +]
  3. First observed

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds real behavior: a total appears only when every item succeeded and gas basis and boundary type match, otherwise a stated reason is returned. The blend-row rule and component counting add further operational context not present in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is front-loaded and well ordered — calculation behavior first, blend handling second. However, the entire text is duplicated in Chinese, roughly doubling length with no added information, which hurts efficiency against a 10% weight.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 50-item batch mutation-free calculation with no output schema, the description explains what comes back per item, how totals are gated, and the blend edge case. Only the choice relative to sibling calculation tools remains unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds a genuinely load-bearing fact the schema does not state: factor_id and refrigerant_blend are mutually exclusive per item, the blend must come from user-supplied composition, and each blend occupies exactly one result row.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb and scope: computing several activity items in one call, each with its own factor and source. That distinguishes it from the single-item calculate_emissions sibling, though no sibling is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives conditional guidance inside the call — use refrigerant_blend instead of factor_id for blends — and explains when a total is produced. It never states when to choose this tool over calculate_emissions or match_activity, so alternative selection is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.