---
title: "MCP 工具參考"
description: "Calends MCP 伺服器提供的全部 41 個工具：用途、主要參數與 dry_run 預覽。"
lang: "zh-HK"
version: "1.84.0"
url: "https://docs.calends.date/zh-hk/ai/tools/"
markdown_url: "https://docs.calends.date/zh-hk/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-hk/ai/tools/
- Markdown source: https://docs.calends.date/zh-hk/ai/tools.md
- Calends version: v1.84.0

查閱 MCP 工具的用途與主要參數；編寫呼叫或排查助手操作時可使用本頁。

Calends 的 MCP 伺服器提供 41 個工具：18 個讀取類、23 個寫入類。唯讀令牌只可看到並呼叫讀取類工具。接入方式見 [MCP 接入](https://docs.calends.date/zh-hk/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 連結查應用：名稱、圖示網址、商店網址、開發者、類別。用於為新訂閱補齊圖示與網址。 | `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`，今天到期的逾期天數為零；整期費率依涵蓋開始日從 `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-hk/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-hk/tracking/settlement.md)。
- 關聯訂閱（[附贈與加購](https://docs.calends.date/zh-hk/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-hk/ai/assistant.md)
- [MCP 接入](https://docs.calends.date/zh-hk/ai/mcp.md)
- [MCP 工具參考](https://docs.calends.date/zh-hk/ai/tools.md) *(current)*

### Reading Order
- Previous: [MCP 接入](https://docs.calends.date/zh-hk/ai/mcp.md)
- Next: [公開頁](https://docs.calends.date/zh-hk/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-hk/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
