Skip to main content
Glama

app_toggle

Flip a switch or set its boolean value in a connected Expo app by targeting an element with a reference, label, or testID.

Instructions

Flip a Switch (or set it with value).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "app_toggle"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoref from the last snapshot, e.g. "e4"
fullNofull screen instead of a diff
textNovisible label/placeholder (exact match first, then contains)
valueNo
testIDNotestID prop of the element
snapshotNoreport the screen afterwards (default true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and discloses almost nothing. It omits that the tool reports the screen afterwards by default (snapshot defaults to true), says nothing about whether the toggle is confirmed or awaited, and gives no indication of what happens on a non-Switch target or an unresolved ref.

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 short sentence with the action front-loaded and no filler. Its brevity is a virtue for scanning, though it tips into under-specification rather than tightness.

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

Completeness2/5

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

For a six-parameter, annotation-free UI-mutation tool with no output schema, the description should explain element targeting (ref vs text vs testID), the side effect of the default snapshot, and the flip-vs-set distinction more fully. As written, an agent must reverse-engineer most of that from the schema alone.

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?

The schema already documents 83% of parameters, including ref, full, text, testID and snapshot. The description's key contribution is explaining that `value` either flips the Switch when omitted or sets an explicit state when supplied; since `value` is the one parameter with no schema description, this genuinely closes the only documentation gap.

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

Purpose3/5

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

"Flip a Switch (or set it with value)" names a specific verb and a target component type, so the action is decipherable, but the description never states what is being toggled or how the target Switch is identified. An agent must infer from the parameters that this acts on a UI element resolved by ref/text/testID, which is left unstated.

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

Usage Guidelines2/5

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

There is no guidance on when to use this instead of app_tap, which is the obvious sibling for interacting with an element. The only implied rule is that the target should be a Switch, and neither prerequisites nor failure cases (e.g. element is not a Switch) are mentioned.

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