返回提交历史
Modified
g4f/mcp/server.py
+1
-8
Modified
g4f/mcp/tools.py
+1
-1
XFEstudio/gpt4free
Refactor MCPServer response structure and update FileListTool workspace handling for safe mode
758df772
代码差异
2 个文件
+2
-9
@@ -143,14 +143,7 @@ class MCPServer:
143
143
return MCPResponse(
144
144
jsonrpc="2.0",
145
145
id=request.id,
146
result={
147
"content": [
148
{
149
"type": "text",
150
"text": json.dumps(result, indent=2)
151
}
152
]
153
}
146
result=result
154
147
)
155
148
156
149
elif method == "ping":
@@ -760,7 +760,7 @@ class FileListTool(MCPTool):
760
760
continue
761
761
762
762
result: Dict[str, Any] = {
763
"workspace": str(workspace),
763
"workspace": "" if self.safe_mode else str(workspace),
764
764
"path": rel_path or "/",
765
765
"entries": entries,
766
766
"count": len(entries),