---
title: "MCP 工具參考"
description: "Calends MCP 伺服器提供的全部 41 個工具：用途、主要參數與 dry_run 預覽機制。"
lang: "zh-TW"
version: "1.84.0"
url: "https://docs.calends.date/zh-tw/ai/tools/"
markdown_url: "https://docs.calends.date/zh-tw/ai/tools.md"
section: "AI"
llms_index: "https://docs.calends.date/llms.txt"
llms_full: "https://docs.calends.date/llms-full.txt"
agents_guide: "https://calends.date/AGENTS.md"
---

# MCP 工具參考

> Calends MCP 伺服器提供的全部 41 個工具：用途、主要參數與 dry_run 預覽機制。

- Canonical page: https://docs.calends.date/zh-tw/ai/tools/
- Markdown source: https://docs.calends.date/zh-tw/ai/tools.md
- Calends version: v1.84.0

查閱 MCP 工具的用途與主要參數；撰寫呼叫指令或排查助理操作時使用本頁。

Calends 的 MCP 伺服器共提供 41 個工具：18 個讀取類、23 個寫入類。唯讀權杖只能檢視與呼叫讀取類工具。接入步驟請見 [MCP 接入](https://docs.calends.date/zh-tw/ai/mcp.md)。

新增訂閱且省略 `icon` 時，若名稱唯一匹配常用服務原名、譯名或安全別名，系統會自動補齊圖示以及未提供的官網與分類（廠商名稱或泛稱如 Vercel、Apple、Copilot Pro 僅供聯想；傳入 `icon: ""` 或明確 `null` 會略過補全）；`dry_run` 預覽結果與實際儲存保持一致。

## 通用約定

- **日期**一律為 `YYYY-MM-DD` 字串。
- **`subscription`** 可為訂閱 id 或名稱（模糊比對）；若命中多個項目會回傳候選清單，供助理改用 id 重試。
- **`method`** 可為付款方式 id 或名稱。
- **`currency_out`** 將金額換算為指定幣別，預設為基準貨幣。
- **`period`** 時間範圍：`today`、`next_3_days`、`next_7_days`、`next_30_days`、`this_month`、`next_month`、`last_30_days`、`this_year`、`custom`（須搭配 `from`、`to`）。
- **`cycle`** 計費週期，例如 `{"unit":"month","every":1}`；`unit` 可選 `day`、`week`、`month`、`year`、`lifetime`（買斷）。
- **`scope`**：`mine` 不含代付、共享僅計我的份額；`gross` 為卡片全額且含代付；`proxy` 僅看代付。
- **`dry_run`**：所有寫入類工具皆支援。傳入 `true` 只回傳預覽不儲存；省略或傳 `false` 時寫入帳本，並回傳該操作儲存後的結果。
- 參數錯誤、找不到訂閱等問題會以工具錯誤結果（`isError`）回傳，讓助理看懂原因並修正。

## 讀取類

| 工具 | 用途 | 主要參數 |
| --- | --- | --- |
| `get_overview` | 帳本快照：今天、基準貨幣、每月成本（不含代付，共享只計我的份額）、計費中數量、付款方式（含 id）、使用中的分類與地區、最重要的健檢提示。建議優先呼叫。 | `currency_out` |
| `list_categories` | 依顯示順序列出分類：名稱、圖示、顏色、內建代碼，以及有多少訂閱正在使用（全部 / 在用）。 | 無 |
| `list_subscriptions` | 列出訂閱：狀態、目前價格、每月成本、下次與上次扣款、付款方式與地區。 | `query`（模糊比對名稱、標籤、備註、分類與主訂閱名）、`status`（`active`、`trial`、`paused`、`ending`、`ended`、`upcoming`、`lifetime`、`live`、`all`；`live` = 計費中 + 試用 + 到期不續 + 暫停）、`kind`（`mine`、`share_owner`、`share_member`、`proxy`、`all`）、`category`、`method`、`region`、`sort`（`next_charge`、`monthly_cost`、`name`、`start`）、`limit`（預設 100） |
| `get_subscription` | 單一訂閱的完整細節：每個階段（換區、換套餐、中斷、關聯訂閱）、價格歷史、首期優惠與贈送時長、近期與未來扣款、轉讓與淨花費、共享成員應收、代付還款、累計支出。 | `subscription`（必填）、`months_back`（預設 12）、`months_forward`（預設 6）、`currency_out` |
| `list_charges` | 特定時間範圍內的扣款（實際與預計）。 | `period`（預設 `next_30_days`）、`from`、`to`、`scope`（預設 `mine`）、`subscription`、`method`、`include_projected`（預設 `true`）、`currency_out` |
| `spending_stats` | 依月、年、分類、付款方式、幣別、地區或訂閱彙總支出。現金口徑：每筆已發生扣款依當天匯率換算。 | `period`（預設 `this_year`）、`from`、`to`、`group_by`（預設 `category`）、`scope`、`include_projected`、`top`（預設 30）、`currency_out` |
| `get_trends` | 時間序列：每月 MRR 走勢、按月現金與真實成本，或兩日之間的 MRR 變動（新增、漲價、降價、停用、匯率影響）。 | `metric`（`mrr`、`cash_vs_accrual`、`movement`）、`months_back`（預設 12）、`months_forward`（預設 3，僅 `cash_vs_accrual`）、`from`、`to`（僅 `movement`） |
| `list_payment_methods` | 付款方式清單：目前估算餘額、每月消耗、餘額續航（能撐多久、首次不足是哪一筆）與儲值建議。 | `topup_months`（預設 6） |
| `list_people` | 人員名冊：聯絡方式、參與的共享與代付、目前待收、累計已收與最近一次收款。 | `query`、`owing_only` |
| `get_receivables` | 他人欠我的款項：依人彙總、共享中到期或逾期的成員，以及代付尚未收回的扣款。 | `kind`（`share`、`proxy`、`all`）、`currency_out` |
| `get_insights` | 健檢與各類報告。 | `section`（`insights` 健檢、`year_review` 年度回顧、`year_outlook` 年度已付與預計、`prepaid` 預付餘值、`cancel_savings` 退訂節省估算）、`year`（僅 `year_review`） |
| `list_events` | 消費決定的變更日誌：開始、結束、暫停、續訂、調價、換區換套餐，以及各項對每月成本的影響。 | `since`、`until`、`subscription`、`limit`（預設 50） |
| `search_services` | 依名稱查詢常用服務目錄，回傳在地化名稱、圖示、官網、對應分類與預設提前天數。 | `query`（必填）、`limit`（預設 8，最多 20） |
| `search_app_store` | 依名稱或 App Store 連結查詢 App：名稱、圖示網址、商店網址、開發者、類別。用於為新訂閱補全圖示與網站。 | `query`（必填）、`country`（兩碼商店地區代碼，預設 `us`） |
| `get_carpool` | 共享方案：每個我發起或我加入的共享席位（已用 / 總數 / 空位）、成員收費標準、已付至與待收；年度成本、成員應交與盈虧；發起至今的付出、已收與結果。 | `subscription`（選填，僅查單一方案） |
| `get_settings` | 讀取白名單業務設定、既有通知管道啟用開關與介面偏好，不回傳任何憑證。 | 無 |
| `list_files` | 列出私人檔案與關聯 | `subscription`, `status`, `query`, `limit` |
| `get_file` | 讀取檔案或取得限時下載連結 | `file`, `as` |

## 寫入類

| 工具 | 用途 | 主要參數 |
| --- | --- | --- |
| `create_subscription` | 新增訂閱。`price` 為每期價格。若已存在同名且同開始日的訂閱會拒絕建立，除非傳 `force=true`。 | `name`、`price`、`currency`、`cycle`（關聯訂閱時可省略幣別與週期以沿用主訂閱）、`start`（預設今天）、`category`（請優先選用 `list_categories` 中的名稱；未知或重名會拒絕；新建須明確傳 `create_category: true`）、`tags`、`method`（傳 `null` 不套用預設付款方式）、`region`、`url`、`icon`、`notes`、`account`、`bundle`（`{parent, follow?}`）、`contract`、`chargeLeadDays`、`cancelLeadDays`、`status`（`active`、`trial`、`cancelled` 或 `terminated`）、`trial_end`、`end`、`intro`（`{price, until}`）、`payments`（支援與 `method` 互斥的 `funding` 拆分來源；選填完整歷史：每筆 `{date, amount, note?}`，須涵蓋所有帳期且日期介於 `start` 至今天；未來依 `price` 推算）、`force` |
| `save_subscription` | 新增或整筆覆寫完整訂閱紀錄，含階段、關聯訂閱與付款；省略的欄位會被移除，編輯前請先讀取 `get_subscription.record`。 | `subscription`（完整紀錄，覆寫時須含 `id`）、`force`、`create_category`、`dry_run` |
| `update_subscription` | 修改描述性欄位與設定，只變更傳入的鍵。調價請用 `change_price`，換區換套餐請用 `change_plan`。 | `subscription`、`set`：`name`、`category`、`tags`、`url`、`manage_url`、`notes`、`account`、`method`、`region`、`bundle`（`null` 解除關聯）、`contract`、`settlement`（`"separate"` / `null`）、`settledBefore`、`remind_days`（`-1` 不提醒）、`end`（`null` 清除）、`next_due`、`trial_end`、`expires`、`chargeLeadDays`、`cancelLeadDays` |
| `change_price` | 新增、編輯或刪除生效日價格點，不影響實付紀錄；起始價不可刪除，預覽會回傳受影響的歷史預計筆數。 | `subscription`、`action`（`add`、`edit`、`remove`，預設新增）、`amount`、`from`、`phase`、`original_from`（編輯/刪除目標） |
| `change_plan` | 為同一個訂閱開啟新階段。 | `subscription`、`action`、`at`、`plan`（`price`、`currency`、`cycle` 必填，選填 `method`、`region`、`bundle`、`contract`、`note`、`planned`）、`keep_previous_until`、`earlier_until` |
| `set_status` | 暫停（停止推算扣款）、退訂 / 停用（某日起不再續費）或恢復（清除暫停與結束日）。 | `subscription`、`action`（`pause`、`cancel`、`terminate`、`reactivate`、`trial`）、`at`（對今天之前已開始或已有付款的訂閱執行 cancel / terminate 須明確傳日期；`null` 表示停用日期未知） |
| `record_payment` | 記錄一筆實際扣款、退款（填正數，自動存為負）、補差或扣款失敗，採訂閱原幣。同日同金額的重複紀錄會被拒絕，除非傳 `allow_duplicate`。 | `subscription`、`amount`（必填）、`date`（預設今天）、`kind`（`charge`、`refund`、`adjust`、`failed`）、`settled`（`{amount, currency}`，卡上實扣）、`note`、`allow_duplicate`、`phase`（兩段並行時指定記在哪一段，填該段開始日） |
| `record_transfer` | 記錄實際買入 / 賣出現金，亦可覆寫或刪除轉讓紀錄。 | `subscription`、`kind`（`buy` / `sell`）、`amount`、`currency`、`date`、`note`、`replace` / `delete`（`{date,index}`）、`dry_run` |
| `delete_payment` | 依日期刪除一筆扣款紀錄。 | `subscription`、`date`、`index`（同日多筆時的索引，自 0 起算）、`phase` |
| `set_meters` | 新增、修改或刪除訂閱的自訂用量指標。 | `subscription`、`meters`（`id`、`name`、`unit`，選填 `kind: reading`）、`remove` |
| `add_readings` | 新增、修改或刪除按日期記錄的用量或累計讀數。 | `subscription`、`readings`、`delete` |
| `delete_subscription` | 刪除訂閱及其全部歷史，無法復原；若底下仍有關聯附屬訂閱則拒絕刪除，並於 `dry_run` 列出 `linked_children`。 | `subscription` |
| `set_share` | 設為共享方案或修改共享設定。 | `subscription`、`role`（`owner` 我發起、`member` 我加入、`none` 取消共享）、`seats`（總席位，含我）、`owner_name`（我加入時的發起人）、`since`（發起日）、`collect_from`（統一收款起點）、`rule`（`{bill_every, fee, fee_currency}`）、`rule_from`（生效日，預設今天） |
| `save_share_member` | 為我發起的共享方案新增成員，或修改成員（傳 `member`）。 | `subscription`、`member`、`name`、`fee`（每期收費）、`fee_currency`（預設為共享收款幣別）、`bill_every`（1–120 的整數月數）、`fee_from`、`follow_rule`、`exempt`（不分攤）、`paid_until`、`joined`、`left`、`contact_via`、`contact`、`account`、`note`、`first_period`（`prorate` 預設按天折算、`full` 收整期、`free` 首期免費）、`first_amount`（首期覆寫金額，`null` 恢復自動計算） |
| `remove_share_member` | 將成員徹底移出共享方案，連同收款紀錄一併刪除。若欲保留歷史，請改用 `save_share_member` 設定 `left`。 | `subscription`、`member` |
| `record_receivable` | 按期記錄共享收款或代付還款，亦可免收、修改或刪除。 | `subscription`、`person`、`kind`、`member`、`periods` / `count`、`action`、`id`、`amount`、`currency`、`date`、`note`；`charged` 使用 `charge`、`charged_amount`、`charged_currency` |
| `update_payment_method` | 新增、編輯、刪除付款方式並遷移參照、校正餘額或修改儲值紀錄；單純修改歷史不改變已校正餘額。 | `action`（`create`、`update`、`delete`）、`method`、`set`、`migrate_to`、`balance`、`top_up`、`top_up_action`（`update`、`delete`）、`top_up_index` |
| `save_category` | 新增、改名、刪除或排序分類；刪除被參照的分類時須指定遷移目標。 | `action`（`create`、`update`、`delete`、`reorder`）、`category`、`set`（`name`、`icon`、`color`）、`migrate_to`、`order` |
| `save_person` | 新增或修改人員，刪除或合併時遷移關聯；成員帳號歸各共享方案管理。 | `action`（`create`、`update`、`delete`）、`person`、`set`（`name`、`contactVia`、`contact`、`note`、`color`）、`migrate_to`、`avatar_base64` + `mime`，或 `avatar: null` |
| `set_proxy` | 設定或移除代付關係，保留原有訂閱扣款。 | `subscription`、`action`（`save`、`remove`）、`person`、`for_name`、`contact_via`、`contact`、`note` |
| `update_settings` | 局部更新白名單業務設定、既有管道啟用開關與已知介面偏好；未知欄位與安全欄位皆會被拒絕。 | `set`、`channel_enabled`（`[{id, enabled}]`）、`prefs`（字串值，`null` 清除） |
| `upload_file` | 上傳檔案或取得一次性上傳連結 | `content_base64`, `url`, `upload_link`, `name`, `subscription`, `kind`, `date`, `dry_run` |
| `update_file` | 重新命名或修改關聯 | `file`, `set` (`name`, `subscription`, `kind`, `date`), `dry_run` |

### 共享收款

`set_share.rule` 以 `{bill_every, fee, fee_currency}` 儲存共享收費規則；`rule_from` 指定生效日期，只調整跟隨合租的成員，保留既有涵蓋期與實收。省略 `rule` 時維持既有規則。`get_carpool.rule` 回傳 `{fee, currency, every_months, stored}`，若由舊成員推斷而得則 `stored=false`。新成員預設跟隨；`save_share_member.follow_rule=true` 自 `fee_from` 起跟隨合租，false 維持自訂。未傳此旗標而修改金額、幣別或週期時，除非與合租規則完全相同，否則標為自訂。回應附帶 `follows_rule` 與 `overdue_days`（今天到期的逾期天數為 0）；整期費率依涵蓋起點自 `fee_history` 選取。

`set_share` 接受 `collect_from`，預覽與儲存都會回傳實際套用的起點。省略時保留已設覆寫值，或依序自發起日、歷史涵蓋期 / 已付至、訂閱開始日推算。只有加入首期會對齊該起點；後續期別一律依成員自己的有效週期排列，不受跳期收款影響。`save_share_member.paid_until` 僅標記開始記帳前已收清至哪一天，不會產生現金收款紀錄。

`save_share_member` 的 `first_period` 支援 `prorate`（預設，依含頭尾實際天數按比例折算並四捨五入至分）、`full`、`free`。`first_amount` 可覆寫非免費首期金額，幣別為 `fee_currency`；傳入 `null` 恢復自動計算，之後回歸常規收費。新成員預設於今天加入。詳見[統一收款日與中途加入](https://docs.calends.date/zh-tw/people/carpool.md#統一收款日與中途加入)。

`record_receivable` 以 `periods` 或 `count` 選擇期別（支援跳期、預收），並支援 `waive` 免收、依紀錄 `id` 修改/刪除，以及代付 `charged` 實扣調整；舊版 `index`、`entry`、`from`/`until`、`paid_until` 參數已移除，外部用戶端須配合更新。金額預設為所選各期應收總和，換幣別時依收款日匯率換算，缺少匯率會報錯；`get_subscription` 回傳各期狀態、應收、收款/免收 id 及無法配對的紀錄。

成員預覽與儲存皆會回傳 `collect_from`、`paid_until`、`first_collection` 與 `next_collection`（含頭尾涵蓋期與金額）、`next_collection_date`、`is_first_period`、`pending_amount`。`record_receivable` 亦回傳實收紀錄；`get_carpool` 帶出相同的摘要、收費與首期設定。下次收款日可能已逾期，待收金額包含截至今天的舊欠期。所有寫入工具皆保留 `dry_run`，內建助手仍須確認草稿後才會寫入。

### `change_plan` 的各種 `action`

| action | 作用 |
| --- | --- |
| `switch` | 自 `at` 起換區、換套餐、換幣別或換付款方式。預設無縫銜接；若傳入 `keep_previous_until`，上一階段會繼續執行至該日，兩段並行且各自照常計費（例如新開土耳其區，美區預付尚未用完）。`plan.planned=true` 表示尚未確定，只是計畫。 |
| `resume` | 中斷後於 `at` 重新續訂，中間空檔記為中斷。 |
| `earlier` | 在訂閱開始前補記一段更早歷史（例如先買斷、後來才轉為訂閱），`at` 為該段開始日；預設延續至原本第一段開始，若指定 `earlier_until` 則於該日結束，中間計為中斷。 |
| `confirm` | 確認一個計畫中的階段，`at` 為其開始日。 |
| `drop` | 取消一個計畫中的階段，上一階段於原訂切換日前一天結束。 |

退訂（`set_status` 的 `cancel`）會一併取消退訂日之後排定的階段，包含計畫中的換方案。

### 分類、頭像與歷史編輯

指派分類前請先呼叫 `list_categories`。未知分類名稱須先呼叫 `save_category action=create`，或在新增 / 修改訂閱時於頂層明確傳入 `create_category: true`；重名一律拒絕。新分類與訂閱採原子寫入，預覽模式不會寫入；可透過 `category_icon` / `category_color` 指定顯式新建分類的外觀。

頭像上傳須為無中繼資料的正方形 PNG/WebP 縮圖，上限 128×128、64 KiB。`list_people` 僅回傳 `has_avatar`，不含圖片位元組。各共享方案獨立的成員帳號請使用 `save_share_member.account`，不放在 `save_person`。

`change_plan action=edit|remove` 可更正歷史；`edit` 可替換 `set.priceHistory` 並保留起始日期。`set_status` 亦支援 `trial`、`terminate`；`cancel` 搭配 `immediate=false` 為到期不續，`true` 為立即停止；`record_payment` 支援覆寫紀錄。`record_receivable action=update|delete` 須依收款或免收紀錄的 `id` 操作，修改前請先讀取原紀錄。刪除被參照的錢包、分類或人員須指定遷移目標。安全設定、憑證、備份與對外傳送皆不在工具開放範圍內。

## 報告與分開記參數

- `get_insights.section` 另支援 `stop_losses`、`month_report`（`month: "2026-11"`）與 `scope_report`（`filter`）。需要與行事曆月報口徑一致時請用 `month_report`。
- `spending_stats.filter` 可限定範圍，`include_transfers: true` 會納入買入 / 賣出現金；預設僅統計服務扣款，與含轉讓的淨支出報告可能不同。
- `save_subscription.subscription` 與 `update_subscription.set` 接受 `settlement: "separate"`、`settledBefore`（`settlement: null` 切回一起記並清除帳期分配）；`record_payment.periods` 指定帳單日而非服務開始日；`get_subscription` 回傳 `unpaid_bills`。詳見[帳單與繳費分開記](https://docs.calends.date/zh-tw/tracking/settlement.md)。
- 關聯訂閱（[附贈與加購](https://docs.calends.date/zh-tw/tracking/bundles.md)）透過 `bundle` 維護：`create_subscription` 接受 `{parent, follow?}` 且可省略幣別與週期沿用主訂閱；`update_subscription.set.bundle` 傳 `null` 可解除關聯；`delete_subscription` 在仍有關聯子項時拒絕刪除。
- `record_payment` 支援互斥的 `method` / `funding` 與用於更正紀錄的 `replace`；卡片實際結算以 `settled` 保留。
- `update_subscription.set.start` 預設僅修改服務開始日、保留計費錨點；傳入 `shift_billing: true` 才同步移動排程。`change_plan` 的歷史編輯同樣支援此選項。
- `change_plan.upgrade` 選擇符合條件的折抵升級要重算或保留扣款日；請先查閱 `upgrade_quote` 預覽再核對實付金額。
- `set_meters` / `add_readings` 維護用量與累計讀數，私密用量不會公開；`set_status edit=true` 可更正既有有日期的停用紀錄，不憑空補上停止日。

## 範例

當你說「Netflix 從今天起漲到 17.99 美元」，助理大致會這樣呼叫：

```json
{ "name": "change_price", "arguments": { "subscription": "Netflix", "amount": 17.99, "dry_run": true } }
```

確認預覽無誤後，再去掉 `dry_run` 呼叫一次即可寫入。

---

## Related Pages & Global AI Discovery

To explore broader context beyond this page, fetch any of the Markdown or plain-text resources below directly:

### Same Section (AI)
- [內建助手](https://docs.calends.date/zh-tw/ai/assistant.md)
- [MCP 接入](https://docs.calends.date/zh-tw/ai/mcp.md)
- [MCP 工具參考](https://docs.calends.date/zh-tw/ai/tools.md) *(current)*

### Reading Order
- Previous: [MCP 接入](https://docs.calends.date/zh-tw/ai/mcp.md)
- Next: [公開頁](https://docs.calends.date/zh-tw/sharing/public-page.md)

### Global Calends Resources
- Read-only Docs MCP Server (zero auth Streamable HTTP): https://docs.calends.date/mcp
- Complete Docs Index (all 37 topics with `.md` links): https://docs.calends.date/llms.txt
- Complete English Docs Bundle (single file): https://docs.calends.date/llms-full.txt
- Complete Simplified Chinese Docs Bundle: https://docs.calends.date/llms-zh.txt
- Docs AI Agent Guide: https://docs.calends.date/AGENTS.md
- Product Website Overview (Markdown): https://calends.date/zh-tw/index.md
- Product LLMs Index & Full Reference: https://calends.date/llms.txt | https://calends.date/llms-full.txt
- Deployment & MCP Agent Guide (AGENTS.md): https://calends.date/AGENTS.md
- FAQ & Calends vs Wallos Comparison (Markdown): https://calends.date/en/faq.md | https://calends.date/en/compare.md
- Complete Changelog (Markdown): https://calends.date/en/releases.md
