Skip to main content
Glama

Start async focus trace

mobile_focus_trace_start

Start non-blocking focus sampling on Android logical displays, optionally bound to a record ID so samples include record-aligned offsets for diagnostics.

Instructions

Start non-blocking focus sampling for logical displays. Optionally bind to a recordId so samples include recordOffsetMs aligned with record marks. Default interval 250ms; samples are ring-buffered (maxSamples).

Input Schema

NameRequiredDescriptionDefault
serialYesExact ADB serial from mobile_devices_list; never inferred when multiple devices exist
displayIdsYes
maxSamplesNo
boundRecordIdNo
sampleIntervalMsNo

Output Schema

NameRequiredDescriptionDefault
startedAtIsoYes
focusSessionIdYes

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.9/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnly=false, idempotent=false, destructive=false), so the bar is lower, yet the description still adds real behavior: sampling is non-blocking, samples are ring-buffered up to maxSamples (i.e. old samples are overwritten), and recordOffsetMs alignment is produced when bound. It does not mention the lifecycle requirement to stop the trace or resource cost.

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

Conciseness5/5

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

Three dense sentences, front-loaded with the core action, then optional binding, then defaults and buffer behavior. No filler; every clause carries information an agent needs.

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?

An output schema exists, so return values need no exposition, and the description covers action, key parameters, and buffering. The notable gap is lifecycle context: it never states the trace must be terminated with mobile_focus_trace_stop or whether concurrent traces are permitted.

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?

With schema coverage at only 20%, the description carries much of the burden and delivers: it explains boundRecordId's purpose, the default sampleIntervalMs (250ms), and maxSamples as the ring-buffer bound. It leaves serial and displayIds semantics to the schema, which happens to document them well.

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+resource ('Start non-blocking focus sampling for logical displays') and the 'async/non-blocking' framing distinguishes it from the synchronous sibling mobile_focus_trace. It does not name the sibling or mobile_focus_trace_stop explicitly, so differentiation is implied rather than stated.

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?

The binding-to-recordId note implies a key use case (aligning samples with record marks during a recording), which gives implicit context for when to reach for this tool. However, it never says when to use this versus mobile_focus_trace or the record_* family, nor any prerequisite or exclusion.

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