Skip to main content
Glama
mobile-debug-mcp

mobile-debug-mcp

classify_action_outcome

Classifies the outcome of the latest mobile action as success, no_op, backend_failure, ui_failure, or unknown using UI changes, action type, network requests, and logs to guide the next debugging step.

Instructions

Classify the outcome of the most recent action into exactly one of: success, no_op, backend_failure, ui_failure, unknown.

Use the runtime action result's action_type as actionType so the classifier can distinguish local-state actions from side-effect actions. Use this when the intended outcome is not already fully verified by the UI signal alone. For backend/API activity, compare get_screen_fingerprint before and after the action and call get_network_activity immediately after the action if the outcome is still ambiguous.

HOW TO GATHER INPUTS before calling:

  1. Call wait_for_screen_change or compare get_screen_fingerprint before/after — set uiChanged accordingly.

  2. If you checked for a specific element with wait_for_ui, set expectedElementVisible.

  3. Pass actionType from the action response when available.

  4. Only provide networkRequests if you already collected them or want to classify a side-effect action with backend evidence.

RULES (applied in order — stop at first match):

  1. If uiChanged=true OR expectedElementVisible=true → outcome=success

  2. If actionType is missing → outcome=unknown

  3. If any request has status=failure or retryable → outcome=backend_failure

  4. If actionType maps to a local-state action → outcome=no_op; prefer state-based verification and avoid default network fallback

  5. If actionType maps to a side-effect action and no networkRequests were supplied → outcome=unknown

  6. If no requests returned → outcome=no_op

  7. If all requests succeeded → outcome=ui_failure

  8. Otherwise → outcome=unknown

BEHAVIOUR after outcome:

  • success → continue

  • no_op → retry with richer state verification or re-resolve the element

  • backend_failure → stop and report the failing endpoint

  • ui_failure → stop and report failure

  • unknown → take one recovery step (e.g. capture_debug_snapshot), then stop

Input Schema

NameRequiredDescriptionDefault
uiChangedYestrue if the screen fingerprint or activity changed after the action. Use wait_for_screen_change or compare get_screen_fingerprint before and after.
actionTypeNoThe runtime action_type from the action response (for example tap, tap_element, swipe, type_text, press_back, start_app).
hasLogErrorsNotrue if structured log errors were observed (e.g. from read_log_stream). Optional — include if you have already read logs.
networkRequestsNoOptional network evidence collected after the action. Use it when the expected outcome is backend/API activity or when the UI signal is ambiguous.
expectedElementVisibleNotrue if the element you expected to appear is now visible (from wait_for_ui). Omit if you did not check for a specific element.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.34.0
    • addedInput schema / allOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "expectedState"
      +      ]
      +    }
      +  }
      +]
  2. First observedv0.31.0

TDQS

A4.7/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and largely discharges it: it publishes the ordered decision rules so the agent can predict the verdict, explicitly defines the ambiguity path (unknown), and specifies post-outcome routing (continue / retry with richer state verification / stop and report the failing endpoint / take one recovery step). That routing behavior is not derivable from the schema at all.

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?

Purpose is front-loaded in one sentence, then instructions are grouped into labelled blocks with numbered, ordered rules, which is the right structure for a rule-driven tool. It is dense, but the length is largely earned by the decision table; only the interface between the 'gather inputs' steps and the rules is mildly repetitive.

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 five-parameter, annotation-free tool with no output schema, the description covers how to compute each input, how the verdict is derived, and what to do with each verdict. The remaining gap is the return contract: nothing says whether the tool returns only the outcome string or also the applied rule/evidence, which the agent must know to consume the result.

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 coverage is 100%, so baseline is 3, and the description adds real provenance semantics: where actionType comes from (the action response's action_type), that uiChanged must be derived from a fingerprint comparison, and the conditional rule for supplying networkRequests. It loses a point because hasLogErrors appears in the schema but is never referenced by any of the eight rules, leaving the agent unsure whether it affects the verdict.

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 first sentence names a specific verb (classify) and resource (outcome of the most recent action) and enumerates the exact output domain: success, no_op, backend_failure, ui_failure, unknown. No sibling tool performs classification, so the enum itself is enough to distinguish it from the verification primitives (wait_for_ui, get_screen_fingerprint) it consumes.

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

Usage Guidelines5/5

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

It states the selecting condition explicitly ('Use this when the intended outcome is not already fully verified by the UI signal alone') and even carves out the local-state case where state-based verification should be preferred over network fallback. The 'HOW TO GATHER INPUTS' block names the sibling tools to call first (wait_for_screen_change, get_screen_fingerprint, wait_for_ui) and when each is optional.

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