Skip to main content
Glama

Set dark mode

set_dark_mode
Idempotent

Toggle the Android system dark theme on or off to test light and dark appearances; the original mode is restored automatically when the server exits or when called again with the original value.

Instructions

Turn the system dark theme on or off (cmd uimode night) — to test light/dark appearances. The mode it found is remembered and put back when the server exits (when it could be read); call it again with the original value to restore it sooner, and doctor lists it while it is changed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "enabled": "<enabled>"
    },
    "name": "set_dark_mode"
  }
}

Input Schema

NameRequiredDescriptionDefault
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
enabledYestrue = dark theme on, false = off.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (idempotent, non-destructive), the description discloses meaningful hidden behavior: the pre-change mode is captured and restored on server exit, that capture is conditional ('when it could be read'), and doctor surfaces the changed state while active. These are exactly the side effects an agent needs to know for a global device-state mutation.

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

Conciseness4/5

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

A single tight sentence, front-loaded with the verb and resource, with the restore semantics following. The nested parentheticals ('(cmd uimode night)', '(when it could be read)') make it slightly dense to parse, but nothing is wasted.

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

Completeness4/5

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

For a two-parameter boolean toggle with no output schema, the description covers purpose, side effects, persistence, and recovery. The only gap is device-selection behavior when multiple devices are attached, which the schema already handles for the serial parameter.

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%, so both serial and enabled are fully documented in the schema. The description reinforces the on/off semantics but adds no syntax, format, or edge-case detail about the parameters beyond what is already structured. Baseline 3 is appropriate.

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 uses a precise verb+resource ('Turn the system dark theme on or off') and even names the underlying mechanism ('cmd uimode night'), which distinguishes it from siblings like set_status_bar, set_battery, or stay_awake. An agent can identify exactly what it changes without opening the schema.

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?

It supplies a clear context ('to test light/dark appearances') and an explicit follow-up action ('call it again with the original value to restore it sooner'), plus a way to check current state via doctor. It doesn't name exclusions or alternatives (e.g., when to prefer screenshot with a theme flag), so it falls short of a full when/when-not statement.

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