MCPcopy Create free account
hub / github.com/contextform/freecad-mcp / process_tool

Method process_tool

debug/debug_socket_server.py:134–148  ·  view source on GitHub ↗

Process tool with safety checks

(self, tool, args)

Source from the content-addressed store, hash-verified

132 self.log("Client disconnected")
133
134 def process_tool(self, tool, args):
135 """Process tool with safety checks"""
136 self.log(f"=== PROCESSING TOOL: {tool} ===")
137
138 if tool == "test_echo":
139 return f"Debug echo: {args.get('message', 'no message')}"
140
141 elif tool == "execute_python":
142 return self.safe_execute_python(args)
143
144 elif tool == "check_state":
145 return self.check_freecad_state()
146
147 else:
148 return f"Unknown tool: {tool}"
149
150 def safe_execute_python(self, args):
151 """Execute Python with extensive logging"""

Callers 1

handle_clientMethod · 0.95

Calls 3

logMethod · 0.95
safe_execute_pythonMethod · 0.95
check_freecad_stateMethod · 0.95

Tested by

no test coverage detected