reset_environment
Restore Charles Proxy's saved configuration to reset the environment for consistent network traffic analysis and debugging.
Instructions
Reset the Charles environment and restore the saved configuration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- charles_mcp/tools/reset.py:59-68 (handler)The implementation of the reset_environment tool. It restores the configuration using the provided dependencies.
async def reset_environment(ctx: ToolContext) -> str: """Reset the Charles environment and restore the saved configuration.""" deps = get_tool_dependencies(ctx) await safe_ctx_log(ctx, "info", "Running manual environment reset...") try: await deps.restore_config_fn(deps.config) return "Environment reset completed" except Exception as exc: logger.error("Reset environment failed: %s", exc) return f"Reset failed: {exc}" - charles_mcp/tools/reset.py:25-25 (registration)The function register_reset_tools registers reset_environment (along with other tools) with the FastMCP server.
def register_reset_tools(mcp: FastMCP) -> None: