Skip to main content
Glama

detox_list_configurations

List available Detox configurations for mobile testing projects to identify setup options for React Native E2E testing.

Instructions

List all available Detox configurations (e.g., ios.sim.debug, android.emu.debug).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathNoPath to project root

Implementation Reference

  • Primary handler function for the detox_list_configurations tool. Parses arguments, reads Detox config using helper, lists configurations, and returns success/error with list.
    export const listConfigurationsTool: Tool = {
      name: "detox_list_configurations",
      description: "List all available Detox configurations (e.g., ios.sim.debug, android.emu.debug).",
      inputSchema: zodToJsonSchema(ListConfigurationsArgsSchema),
      handler: async (args: z.infer<typeof ListConfigurationsArgsSchema>) => {
        const parsed = ListConfigurationsArgsSchema.parse(args);
        const projectPath = parsed.projectPath || process.cwd();
    
        const result = await readDetoxConfig(projectPath);
    
        if (!result) {
          return {
            success: false,
            error: "No Detox configuration found.",
            configurations: [],
          };
        }
    
        const configurations = listConfigurations(result.config);
    
        return {
          success: true,
          configurations,
        };
      },
    };
  • Zod schema defining the input parameters for the tool: optional projectPath string.
    export const ListConfigurationsArgsSchema = z.object({
      projectPath: z.string().optional().describe("Path to project root"),
    });
    
    export type ListConfigurationsArgs = z.infer<typeof ListConfigurationsArgsSchema>;
  • The tool is registered by inclusion in the allTools array, imported and served via MCP ListTools and CallTool handlers in src/index.ts.
    export const allTools: Tool[] = [
      buildTool,
      testTool,
      initTool,
      readConfigTool,
      listConfigurationsTool,
      validateConfigTool,
      createConfigTool,
      listDevicesTool,
      generateTestTool,
      generateMatcherTool,
      generateActionTool,
      generateExpectationTool,
    ];
  • Core helper function that parses a DetoxConfig object and returns a list of available configurations with details.
    export function listConfigurations(config: DetoxConfig): Array<{
      name: string;
      device: string;
      app: string;
      deviceType?: string;
      appType?: string;
    }> {
      if (!config.configurations) {
        return [];
      }
    
      return Object.entries(config.configurations).map(([name, conf]) => {
        const device = config.devices?.[conf.device];
        const app = config.apps?.[conf.app];
    
        return {
          name,
          device: conf.device,
          app: conf.app,
          deviceType: device?.type,
          appType: app?.type,
        };
      });
    }
  • Helper function to find, read, and parse the Detox configuration file from the project path.
    export async function readDetoxConfig(projectPath: string): Promise<{
      config: DetoxConfig;
      configPath: string;
    } | null> {
      const configPath = await findConfigFile(projectPath);
      if (!configPath) {
        return null;
      }
    
      try {
        const config = await parseConfig(configPath);
        return { config, configPath };
      } catch (error) {
        throw new Error(`Failed to parse Detox config at ${configPath}: ${error}`);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states it lists configurations but doesn't disclose behavioral traits like whether it requires authentication, how it handles errors, if results are paginated, or what format the output takes. The description adds minimal value beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose with zero waste. It includes helpful examples without unnecessary elaboration, making it appropriately sized for its function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a simple parameter (1 param, 0 required), the description is adequate but has clear gaps. It explains what the tool does but lacks context on behavioral aspects like output format or error handling, which are important for a tool with no structured coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'projectPath' documented in the schema. The description doesn't add any parameter-specific information beyond what the schema provides, so it meets the baseline of 3 for high schema coverage without compensating value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all available Detox configurations') with specific examples ('ios.sim.debug, android.emu.debug'). It distinguishes from some siblings like 'detox_read_config' (which reads a single config) but doesn't explicitly differentiate from 'detox_list_devices' (which lists devices rather than configurations).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing to see available configurations, but provides no explicit guidance on when to use this vs. alternatives like 'detox_read_config' (for reading a specific config) or 'detox_create_config' (for creating new ones). No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/gayancliyanage/detox-mcp'

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