Skip to main content
Glama

ui2.scene_match

Classify screenshots or crops against candidate scene/pattern labels with CLIP similarity, returning zero-shot scores without training.

Instructions

场景/花纹零样本分类(小模型层):给候选标签短语(如 '设置页面'/'聊天列表页'),CLIP 类模型计算图文相似度返回各候选得分——加新场景=加一个标签,无需训练。定位:色彩/布局等像素统计概括不了的花纹与场景语义。需可选依赖:pip install 'mobile-agent-harness[scene]';模型经 MAH_SCENE_MODEL 配置(中文标签用 OFA-Sys/chinese-clip-vit-base-p16,英文标签默认 openai/clip-vit-base-patch32)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boxNo[l,t,r,b] 只对裁剪区域分类
topNo
fromNo截图路径,缺省最近一次 vision.screenshot
candidatesYes候选场景/花纹标签短语(封闭集合声明)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses an optional dependency (pip install 'mobile-agent-harness[scene]'), the model configuration mechanism (MAH_SCENE_MODEL) and defaults per label language. It does not mention load latency, GPU needs, or failure behavior when the dependency is absent.

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?

Front-loaded with purpose, then positioning, then dependency/model config – a logical order. It is dense and long, but each clause (dependency install, model selection) carries operative information for actually invoking the tool.

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?

No output schema exists, so the description must convey returns; 'returns scores for each candidate' is brief but sufficient, and the dependency/config details round out what an agent needs to call it. Minor gap: it does not describe score format/range (e.g. softmax probabilities vs raw similarity).

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

Parameters3/5

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

Schema description coverage is 75%, so the baseline is 3. The description adds meaning to 'candidates' (closed-set label phrases) and reinforces the zero-shot angle, but contributes nothing for box, top, or from beyond what the schema already documents, and 'top' remains undocumented anywhere.

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: zero-shot scene/pattern classification that returns per-candidate image-text similarity scores, with concrete label examples ('设置页面'/'聊天列表页'). It positions itself against pixel-statistics tools ('色彩/布局等像素统计概括不了的花纹与场景语义') but does not name specific siblings like vision.vlm or vision.ask.

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?

Usage is implied through the positioning sentence – use it for pattern/scene semantics that color/layout statistics cannot capture – and through 'no training needed when adding labels'. However, there is no explicit when-to-use vs alternatives guidance, and no named sibling (e.g. vision.vlm) to route the agent against.

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