reset
Clear the current session to an empty state, removing all snapshots. Use this to start fresh without exiting.
Instructions
Clear the current session back to empty state, including all snapshots.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/build123d_mcp/server.py:129-132 (registration)MCP tool registration for 'reset' — decorates the handler function with @mcp.tool() making it available via MCP protocol.
@mcp.tool() def reset() -> str: """Clear the current session back to empty state, including all snapshots.""" return _session.reset() - src/build123d_mcp/session.py:236-242 (handler)Session.reset() — core implementation that clears the namespace, current shape, registered objects, snapshots, and last error, then re-injects restricted builtins.
def reset(self) -> None: self.namespace.clear() self.current_shape = None self.objects.clear() self.snapshots.clear() self.last_error_detail = None self._inject_builtins() - src/build123d_mcp/worker.py:97-99 (handler)Worker dispatch handler for the 'reset' operation — calls session.reset() when the worker receives a reset request.
if op == "reset": session.reset() return "Session reset."