> For the complete documentation index, see [llms.txt](https://docs.cherryai.com.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherryai.com.cn/docs/zhong-wen-fan-ti/advanced-basic/developer-tools/trace.md).

# 調用鏈同開發者模式

調用鏈用嚟睇一次對話或者 Agent 任務內部發生嘅模型請求、工具調用同 MCP 交互。佢適合排錯同性能分析，唔係日常聊天一定要開嘅功能。

<figure><img src="/files/d79c458123f30c98d216324d72730e674f3d34c4" alt="从运行环境、认证网络到 Agent 绑定和调用链的 MCP 排错流程图"><figcaption><p>排查 MCP 調用時先確認伺服器同認證，再用調用鏈判斷請求有冇入到 Agent 同工具執行階段。</p></figcaption></figure>

## 開啟方式

{% stepper %}
{% step %}

### 1. 打開【設定】→【系統】

喺【開發者模式】區域開啟【啟用開發者模式】。
{% endstep %}

{% step %}

### 2. 重啟 Cherry Studio

開發者模式會喺重啟後生效。重啟前正在運行嘅 Agent 任務應先確認狀態。
{% endstep %}

{% step %}

### 3. 重現一次問題

重新發送最小測試訊息，只保留必要模型同工具，減少無關調用。
{% endstep %}

{% step %}

### 4. 打開調用鏈

喺對話或者 Agent 右側面板入面去【調用鏈】，揀節點睇輸入、輸出、耗時同狀態。Agent 任務仲可以睇到 Agent 名稱、操作同工具調用數量。
{% endstep %}
{% endstepper %}

## 常見節點點樣讀

| 節點       | 重點檢查               | 常見問題             |
| -------- | ------------------ | ---------------- |
| 模型請求     | 模型、輸入、輸出、Token 同狀態 | 服務商錯誤、上下文過長、輸出為空 |
| 工具調用     | 工具名、參數、結果          | 參數錯誤、權限等待、工具返回異常 |
| MCP 調用   | 服務名、連接類型、輸入同輸出     | 伺服器斷線、認證失敗、遠端錯誤  |
| Agent 執行 | Agent、操作、工具數量同狀態   | 子任務失敗、流程冇結束      |
| HTTP 請求  | 方法、URL、狀態同回應       | 地址錯誤、網絡或者鑑權問題    |

{% hint style="danger" %}
調用鏈可能包含提示詞、文件內容、請求頭同工具參數。分享截圖或者導出資訊之前，必須刪除 API Key、Authorization、Cookie、電郵、本地路徑同業務數據。
{% endhint %}

## 用戶案例：MCP 工具返回空結果

先喺 MCP 設定頁確認伺服器正常，再畀 Agent 只調用一個工具。調用鏈顯示請求已到達伺服器但輸出為空，說明問題更可能喺服務端數據或者參數，而唔係 Agent 冇綁定；如果根本冇 MCP 節點，就返去 Agent【MCP】檢查綁定。

<details>

<summary>點解開咗之後仲係睇唔到調用鏈？</summary>

確認已經重啟應用，並喺重啟後重新發起一次請求。啟用前產生嘅歷史消息唔會自動補返調用數據。

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cherryai.com.cn/docs/zhong-wen-fan-ti/advanced-basic/developer-tools/trace.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
