Skip to content

Commit 3d1191e

Browse files
fix: update style
1 parent 968c9a7 commit 3d1191e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/mcp_server.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@
188188

189189
- MCP 调用后添加「自定义工具」。
190190
MCP 工具返回包含 sqlbot_chat_id 和 sqlbot_token 的 JSON。添加输入参数,将 MCP 调用结果赋值给参数“arg1”。此外,再添加工具节点(Python)来解析 JSON,工具内容:
191-
```
191+
```python
192192
import json
193193
def main1(arg1):
194-
json_obj = json.loads(data[0])
195-
return {"token":json_obj["data"]["sqlbot_token"], "sqlbot_chat_id":json_obj["data"]["chat_id"]}
194+
json_obj = json.loads(data[0])
195+
return {"token":json_obj["data"]["sqlbot_token"], "sqlbot_chat_id":json_obj["data"]["chat_id"]}
196196
```
197197

198198
步骤六: 变量赋值

0 commit comments

Comments
 (0)