Skip to main content
Glama

stb_canvas

Explores Flutter or canvas apps with no accessibility nodes by tapping a coordinate grid, comparing before/after screenshots, and recording screens as a uimap JSON for the STB pipeline.

Instructions

Traverse a Flutter/canvas app (or any app with zero AT-SPI/uiautomator nodes) via screenshot-diff: tap a grid of coordinates, screenshot before/after each tap, and register a new screen whenever the frame changes. Writes uimap JSON compatible with the rest of the STB pipeline. Args: package, max_taps, out.

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": {
      "package": "<package>"
    },
    "name": "stb_canvas"
  }
}

Input Schema

NameRequiredDescriptionDefault
outNo
packageYes
max_tapsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does disclose key traits: it performs real taps, takes before/after screenshots, registers new screens on frame change, and writes uimap JSON. However, it omits prerequisites (app must be launched and foregrounded, device/emulator connection), the fact that taps have side effects on live UI, and rough runtime cost for up to max_taps screenshots.

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?

Two front-loaded sentences deliver the mechanism and scenario before any detail, and nothing is padded. The trailing 'Args: package, max_taps, out' list is low-value repetition of the schema but costs only a few tokens.

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

Completeness3/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 not be described, and the core mechanism is covered. For a tool that drives a device through dozens of live taps and writes files, the missing prerequisites, output-destination behavior for the empty `out` default, and side-effect warnings leave meaningful gaps.

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 description coverage is 0%, so the description must compensate, but it only restates the three parameter names in an 'Args:' suffix. The meaning of max_taps (bound on taps, default 60), package (which app identifier), and especially out (where the uimap JSON lands, and what the empty-string default implies) is never explained.

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 pairs a specific verb and mechanism (traverse via screenshot-diff, tapping a coordinate grid) with an explicit target scenario: Flutter/canvas apps or any app with zero AT-SPI/uiautomator nodes. That condition alone lets an agent distinguish it from accessibility-tree-based siblings such as stb_dump_ui without inspecting their schemas.

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?

The 'or any app with zero AT-SPI/uiautomator nodes' clause gives a clear selection condition for when this tool is appropriate, which implicitly excludes accessibility-rich apps. It stops short of naming a preferred alternative (e.g. use stb_dump_ui when the tree is populated) or stating any exclusion explicitly.

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