Skip to main content
Glama

sim_statusbar

Set or clear the data network indicator in the iOS simulator status bar. Specify a network type (e.g., wifi, 5g) or use "clear" to reset overrides, ensuring accurate network status simulation for testing.

Instructions

Sets the data network indicator in the iOS simulator status bar. Use "clear" to reset all overrides, or specify a network type (hide, wifi, 3g, 4g, lte, lte-a, lte+, 5g, 5g+, 5g-uwb, 5g-uc).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNetworkYesData network type to display in status bar. Use "clear" to reset all overrides. Valid values: clear, hide, wifi, 3g, 4g, lte, lte-a, lte+, 5g, 5g+, 5g-uwb, 5g-uc.
simulatorUuidYesUUID of the simulator to use (obtained from list_simulators)

Implementation Reference

  • The main handler function that executes the tool logic: sets the data network indicator in the iOS simulator status bar using xcrun simctl commands.
    export async function sim_statusbarLogic(
      params: SimStatusbarParams,
      executor: CommandExecutor,
    ): Promise<ToolResponse> {
      log(
        'info',
        `Setting simulator ${params.simulatorId} status bar data network to ${params.dataNetwork}`,
      );
    
      try {
        let command: string[];
        let successMessage: string;
    
        if (params.dataNetwork === 'clear') {
          command = ['xcrun', 'simctl', 'status_bar', params.simulatorId, 'clear'];
          successMessage = `Successfully cleared status bar overrides for simulator ${params.simulatorId}`;
        } else {
          command = [
            'xcrun',
            'simctl',
            'status_bar',
            params.simulatorId,
            'override',
            '--dataNetwork',
            params.dataNetwork,
          ];
          successMessage = `Successfully set simulator ${params.simulatorId} status bar data network to ${params.dataNetwork}`;
        }
    
        const result = await executor(command, 'Set Status Bar', true, undefined);
    
        if (!result.success) {
          const failureMessage = `Failed to set status bar: ${result.error}`;
          log('error', `${failureMessage} (simulator: ${params.simulatorId})`);
          return {
            content: [{ type: 'text', text: failureMessage }],
            isError: true,
          };
        }
    
        log('info', `${successMessage} (simulator: ${params.simulatorId})`);
        return {
          content: [{ type: 'text', text: successMessage }],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        const failureMessage = `Failed to set status bar: ${errorMessage}`;
        log('error', `Error setting status bar for simulator ${params.simulatorId}: ${errorMessage}`);
        return {
          content: [{ type: 'text', text: failureMessage }],
          isError: true,
        };
      }
    }
  • Zod schema defining input parameters: simulatorId (UUID) and dataNetwork (enum of network types).
    const simStatusbarSchema = z.object({
      simulatorId: z
        .string()
        .uuid()
        .describe('UUID of the simulator to use (obtained from list_simulators)'),
      dataNetwork: z
        .enum([
          'clear',
          'hide',
          'wifi',
          '3g',
          '4g',
          'lte',
          'lte-a',
          'lte+',
          '5g',
          '5g+',
          '5g-uwb',
          '5g-uc',
        ])
        .describe(
          'Data network type to display in status bar. Use "clear" to reset all overrides. Valid values: clear, hide, wifi, 3g, 4g, lte, lte-a, lte+, 5g, 5g+, 5g-uwb, 5g-uc.',
        ),
    });
  • Tool registration exporting the 'sim_statusbar' tool with name, description, public schema (without simulatorId), and session-aware handler.
    export default {
      name: 'sim_statusbar',
      description:
        'Sets the data network indicator in the iOS simulator status bar. Use "clear" to reset all overrides, or specify a network type (hide, wifi, 3g, 4g, lte, lte-a, lte+, 5g, 5g+, 5g-uwb, 5g-uc).',
      schema: publicSchemaObject.shape, // MCP SDK compatibility
      handler: createSessionAwareTool<SimStatusbarParams>({
        internalSchema: simStatusbarSchema as unknown as z.ZodType<SimStatusbarParams>,
        logicFunction: sim_statusbarLogic,
        getExecutor: getDefaultCommandExecutor,
        requirements: [{ allOf: ['simulatorId'], message: 'simulatorId is required' }],
      }),
    };
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly indicates this is a mutation tool ('Sets'), but does not mention permission requirements, side effects, or error conditions. It provides some context about the 'clear' option resetting overrides, but lacks details on persistence, simulator state requirements, or response format.

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 perfectly concise with two sentences that each earn their place. The first sentence states the core purpose, and the second provides essential usage guidance for parameter values. There is zero wasted language or redundancy.

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?

For a mutation tool with no annotations and no output schema, the description is adequate but has clear gaps. It explains what the tool does and parameter usage, but lacks information about required simulator states, error conditions, or what happens after execution. Given the complexity of modifying simulator status bars, more behavioral context would be helpful.

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

Parameters4/5

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

Schema description coverage is 100%, so the schema already fully documents both parameters. The description adds minimal value by mentioning the 'clear' option and listing network types, but this largely repeats schema information. With 2 parameters and complete schema coverage, the baseline would be 3, but the description provides slight additional context about the 'clear' option's purpose.

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

Purpose5/5

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

The description clearly states the specific action ('Sets the data network indicator') and target resource ('in the iOS simulator status bar'), distinguishing it from sibling tools like set_simulator_location or set_sim_appearance. It uses precise verbs and identifies the exact UI component being modified.

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

Usage Guidelines4/5

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

The description provides clear context for when to use specific values ('Use "clear" to reset all overrides'), but does not explicitly mention when to use this tool versus alternatives or any prerequisites. It implies usage for iOS simulator status bar management but lacks explicit exclusions or comparisons to sibling tools.

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

Related 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/getsentry/XcodeBuildMCP'

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