Skip to main content
Glama
andreahaku
by andreahaku

detox.session.stop

Stop the current Detox UI automation testing session for React Native/Expo iOS applications to end test execution and release simulator resources.

Instructions

Stop the current Detox testing session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function `stopDetoxSession` that cleans up temporary Detox directories and updates the global state to idle.
    export async function stopDetoxSession(): Promise<void> { logger.info("detox", "Stopping Detox session"); const detoxState = stateManager.getDetox(); if (detoxState.state === "idle") { logger.info("detox", "No active session to stop"); return; } // Cleanup temp directory if (hasConfig()) { const config = getConfig(); const testDir = join(config.projectPath, ".mcp-detox-tmp"); try { const { rm } = await import("fs/promises"); await rm(testDir, { recursive: true, force: true }); } catch { // Ignore cleanup errors } } stateManager.updateDetox({ state: "idle", sessionId: undefined, configuration: undefined, }); logger.info("detox", "Detox session stopped"); }
  • Registers the MCP tool 'detox.session.stop' using server.tool(), providing an inline async handler that calls stopDetoxSession() and formats the MCP response.
    server.tool( "detox.session.stop", "Stop the current Detox testing session", {}, async () => { try { await stopDetoxSession(); return { content: [ { type: "text", text: JSON.stringify({ success: true, message: "Detox session stopped" }), }, ], }; } catch (error) { return handleToolError(error); } } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andreahaku/expo_ios_development_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server