# Agent Tool Spec

## Tool: normalize_tw_address

用途：將台灣地址轉成結構化欄位。

### Input

```json
{
  "address": "台北市大安區金山南路二段55號3樓之1"
}
```

### Output

```json
{
  "original": "台北市大安區金山南路二段55號3樓之1",
  "cleaned": "臺北市大安區金山南路2段55號3樓之1",
  "city": "臺北市",
  "district": "大安區",
  "road": "金山南路",
  "section": "2段",
  "lane": "",
  "alley": "",
  "number": "55號",
  "floor": "3樓之1",
  "room": "",
  "normalized": "臺北市大安區金山南路2段55號3樓之1",
  "confidence": 0.92,
  "missing": [],
  "notes": ["格式可用於第一階段物流/表單清理"]
}
```

## Tool: batch_normalize_tw_addresses

用途：批次處理 CSV 或資料列。

### Input

```json
{
  "rows": [
    { "id": "A001", "address": "台北市大安區金山南路二段55號" },
    { "id": "A002", "address": "高雄市前鎮區中山二路2號" }
  ],
  "limit": 500
}
```

### Output

```json
{
  "processed": 2,
  "failed": 0,
  "rows": [
    {
      "id": "A001",
      "normalized": "臺北市大安區金山南路2段55號",
      "city": "臺北市",
      "district": "大安區",
      "confidence": 0.92
    }
  ]
}
```

## Pricing Hook

未來 Agent 平台可按次收費：

- 單筆工具：每 1,000 次 NT$99。
- 批次工具：每 10,000 筆 NT$699。
- 大量企業用量：另報價。

## Safety Notes

- 不保證地址可投遞成功。
- 不保留原始地址資料，除非使用者明確選擇保存。
- 地址可能是個資，應提供刪除與不保存選項。
