Skip to main content
Glama

toggle_high_contrast

Enable or disable high contrast text on Android devices to improve accessibility for users with visual impairments during development and testing workflows.

Instructions

Enable or disable high contrast text

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enableYes
device_serialNo

Implementation Reference

  • The main handler function for the 'toggle_high_contrast' tool. It is decorated with @mcp.tool() which registers it as an MCP tool. The function toggles high contrast text by setting the Android secure setting 'high_text_contrast_enabled' to '1' or '0' via ADB.
    @mcp.tool() def toggle_high_contrast(enable: bool, device_serial: str | None = None) -> str: """Enable or disable high contrast text""" value = "1" if enable else "0" return run_adb([ "shell", "settings", "put", "secure", "high_text_contrast_enabled", value ], device_serial)

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/rahulkr/r_adb_mcp_server'

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