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' }], }), };

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/cameroncooke/XcodeBuildMCP'

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