Skip to main content
Glama

Stop async focus trace

mobile_focus_trace_stop

Stop an async mobile focus session to retrieve focus change events and trace samples for flash or launcher debugging on a specified device.

Instructions

Stop an async focus session and return focus change events plus samples (wallClockIso, tMs, optional recordOffsetMs). Prefer changes for flash/launcher hunting. Large traces write samples JSON to an artifact.

Input Schema

NameRequiredDescriptionDefault
serialYesExact ADB serial from mobile_devices_list; never inferred when multiple devices exist
focusSessionIdYes
includeAllSamplesNo

Output Schema

NameRequiredDescriptionDefault
serialYes
changesYes
samplesYes
truncatedYes
displayIdsYes
durationMsYes
changeCountYes
sampleCountYes
startedAtIsoYes
stoppedAtIsoYes
boundRecordIdNo
droppedSamplesYes
focusSessionIdYes
sampleIntervalMsYes
responseCompactedNo
samplesArtifactUriNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.9.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.5.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and destructiveHint=false, so the agent knows this is a state-mutating but non-destructive stop. The description adds real context beyond that: large traces write samples JSON to an artifact, a side effect not visible in the annotations. It does not explain reversibility or the artifact's lifecycle.

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?

Three compact sentences with the main action front-loaded, and no wasted phrasing. The field-name parenthetical is slightly dense but earns its place by clarifying the return shape.

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?

With an output schema and annotations already present, the description need not re-explain returns, yet it still summarizes them and adds the artifact-writing behavior. The main gap is the undocumented includeAllSamples input, which is minor for an otherwise complete stop-and-collect tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33% (only serial is documented). The description explains none of the input parameters and never mentions includeAllSamples, which is the one parameter most in need of clarification and is only given a default. The parenthetical field list (wallClockIso, tMs, recordOffsetMs) describes outputs, not inputs, so it does not compensate.

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

Purpose4/5

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

States a specific verb and resource ('Stop an async focus session') and describes the return content (focus change events plus samples). It is clearly the stop counterpart to mobile_focus_trace_start, though it never explicitly names that sibling.

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

Usage Guidelines3/5

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

'Prefer `changes` for flash/launcher hunting' gives steering on which output to consume, and stopping a started session is implied. But there is no explicit when-to-use vs alternatives (e.g., mobile_focus_trace vs mobile_focus_trace_start) and no preconditions stated.

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