Skip to main content
Glama
antonpinchuk

mobile-mcp-opengl

by antonpinchuk

MCP для разработки и автоматизации Android с OpenGL

MCP сервер для AI-кодинг-агентов (Claude Code, Cursor и т.д.) для тестирования Android-приложений, чей весь UI отрисовывается внутри одного непрозрачного OpenGL/Vulkan/Metal-поверхности — Cocos2d-x, Unity, Unreal, чистый OpenGL, libGDX и подобные движки.

Какую проблему это решает

adb shell uiautomator dump и все инструменты автоматизации на основе дерева доступности (включая большинство MCP-серверов для мобильной автоматизации) работают, анализируя нативную иерархию представлений Android — кнопки, метки, их текст и координаты. Это отлично работает для обычного Android-UI, построенного из нативных представлений.

Но это не работает для игры или приложения, которое рендерит весь свой UI как текстуры внутри одного GLSurfaceView. С точки зрения дерева доступности на экране есть ровно одно непрозрачное представление без дочерних элементов, без меток, без координат для чего-либо внутри него. Нечего анализировать — экран является чёрным ящиком, независимо от того, сколько UI на самом деле на нём.

Единственный реальный канал наблюдения — скриншоты. Этот сервер построен вокруг этого факта как обычного случая, а не как случайного запасного варианта.

Чем это отличается от mobile-mcp

mobile-next/mobile-mcp — это универсальный MCP-сервер для мобильной автоматизации, и он хороший выбор по умолчанию для обычных нативных приложений: сначала дерево доступности (быстро, дёшево, без vision-модели, без токенов изображений), с переходом на скриншоты + координаты только когда дерево не даёт нужного.

Для приложения с OpenGL-канвасом этот запасной вариант не случайный — это единственный путь, который вообще работает, каждый раз. mobile-mcp-opengl создан именно для этого случая и в результате принимает два разных дизайнерских решения:

  1. Вообще не пытается использовать дерево доступности. Нет смысла пытаться — для таких приложений оно всегда возвращает пустоту — поэтому каждый инструмент здесь идёт сразу к скриншоту + vision.

  2. Анализ изображений проходит через подключаемый, отдельный провайдер (см. ниже), а не через модель, которая запускает вызывающего агента. Функциональный цикл QA над игрой легко может достигать сотен проверок скриншотов за сессию; прогон всего этого через собственное зрение вашего основного кодинг-агента стоит и реальных денег, и токенов/контекста, которые вы бы предпочли потратить на саму работу по кодингу. Здесь байты скриншотов вообще не попадают в контекст вызывающего агента — только короткий текстовый ответ провайдера.

Related MCP server: Android-MCP

Почему комбинированные инструменты «действие+наблюдение», а не отдельные примитивы

Наивный дизайн предоставляет tap, screenshot и ask как три отдельных инструмента. Это заставляет вызывающего агента оркестрировать многошаговый цикл для каждого взаимодействия: нажатие → сделать скриншот → передать его шагу vision → прочитать результат → решить, что делать дальше. Каждый из этих шагов — отдельный вызов инструмента и отдельный ход — тратя токены на координацию вместо фактической логики теста, и давая больше поверхности для ошибок агента: пропустить шаг, перепутать порядок или рассуждать об устаревшем состоянии между вызовами.

Вместо этого этот сервер предоставляет комбинированные инструменты — tap_and_ask, swipe_and_ask, long_press_and_ask — которые выполняют действие, коротко ждут, делают скриншот, спрашивают vision-провайдера и возвращают один короткий ответ, всё одним вызовом инструмента. Многошаговый тестовый сценарий в итоге стоит примерно один ход агента на значимую проверку, а не три или четыре.

Обычный screenshot_ask (только наблюдение, без действия) и дешёвые инструменты без vision (type_text, press_key, logcat_grep) также доступны для частей тестового потока, которым не нужен этот паттерн.

Инструменты

Инструмент

Что делает

Вызов vision?

screenshot_ask

Скриншот, затем короткий вопрос о нём

Да

tap_and_ask

Нажатие (x, y), ожидание, скриншот, вопрос

Да

swipe_and_ask

Свайп/перетаскивание (x1,y1)→(x2,y2), ожидание, скриншот, вопрос

Да

long_press_and_ask

Долгое нажатие (x, y) в течение заданного времени, ожидание, скриншот, вопрос

Да

record_and_ask

Необязательное действие, затем N скриншотов с интервалами во времени, один и тот же вопрос о каждом кадре

Да (N вызовов)

type_text

Ввод текста в текущее сфокусированное поле

Нет

press_key

Отправка события Android KEYCODE_* (назад, ввод, ...)

Нет

logcat_grep

Чтение последних записей logcat, опционально фильтрация по регулярному выражению

Нет

vision_spend_report

Отчёт о совокупных затратах на vision за сегодня и порогах

Нет

Предпочитайте logcat_grep вызову vision всякий раз, когда то, что вам нужно, уже есть в строке лога (сбои, ваши собственные отладочные выводы, сетевые ошибки) — это бесплатно и точно, а вызов vision — ни то, ни другое.

Проверка анимаций: record_and_ask

Инструменты с одним кадром не могут сказать вам, анимируется ли что-то корректно (пульсирует ли плавно индикатор силы, взлетает ли метка и исчезает, возвращается ли спрайт в начальное положение). record_and_ask выполняет одно необязательное действие (нажатие или свайп, или ничего), ждёт waitMs (то же значение, что и waitMs в tap_and_ask/swipe_and_ask — время для начала реакции UI до первого кадра), затем делает frameCount скриншотов с интервалом intervalMs и возвращает один короткий ответ на каждый кадр — вызывающий агент получает временную шкалу за один вызов инструмента, вместо того чтобы самому организовывать N отдельных циклов скриншот+вопрос.

Почему один вызов vision на кадр, а не один вызов со всеми кадрами вместе. Оказалось, что imageCaption от Runware принимает недокументированный массив inputImages (множественное число) наряду с документированным одиночным inputImage — проверено напрямую через API. Он корректно работает ровно для 2 изображений (сравнение «до/после» в одном запросе вернулось правильным и связным). При 3+ изображениях в одном запросе и этот параметр массива, и вручную скомпонованное изображение-«фильмстрип» давали в тестах усечённые или искажённые ответы — маленькая vision-модель 7B, по-видимому, теряет связность после определённой суммарной визуальной+инструкционной нагрузки в одном вызове. Последовательные вызовы с одним изображением (подход этого инструмента) были надёжны при любом протестированном количестве кадров и не значительно дороже: стоимость определяется длиной ответа (см. ниже), а не количеством вызовов, поэтому N коротких последовательных ответов стоят примерно столько же или меньше, чем один длинный ответ с несколькими изображениями. Если ваш собственный провайдер обрабатывает многокадровые запросы более надёжно, это очевидное место для оптимизации — см. «Своя модель».

Настройка

git clone <this repo>
cd mobile-mcp-opengl
npm install
cp .env.example .env
# edit .env: at minimum set RUNWARE_API_KEY (or switch VISION_PROVIDER, see below)

Требуется adb в PATH (или ADB_PATH, заданный в .env), и запущенное/подключённое устройство или эмулятор. Если подключено более одного, задайте ADB_DEVICE_SERIAL (см. adb devices).

Регистрация в Claude Code

Добавьте .mcp.json в корень вашего проекта (этот файл обычно локальный для проекта и игнорируется git, так как обычно указывает на специфичный для машины путь или содержит специфичные для машины переопределения env):

{
  "mcpServers": {
    "mobile-opengl": {
      "command": "node",
      "args": ["/absolute/path/to/mobile-mcp-opengl/src/server.js"]
    }
  }
}

Claude Code автоматически подхватывает это для проекта. Сервер читает свой собственный .env (рядом с package.json в этом репозитории) для всей конфигурации — вызывающему агенту никогда не нужно знать или передавать какой-либо API-ключ.

Модель затрат — прочтите перед запуском длительной QA-сессии

Длина ответа определяет стоимость, а не размер изображения. Это было измерено эмпирически на провайдере по умолчанию Runware/Qwen2.5-VL-7B-Instruct: один и тот же вопрос с принудительным однословным ответом стоил одинаково ($0.0006) для размеров изображений от 360×360 до 1600×2400 (ретина-класс). То же изображение 1024×1024 с открытым запросом «опиши это» стоило $0.0013–0.0019 — в 2-3 раза больше — исключительно потому, что модель написала более длинный ответ, а не потому, что изображение было больше.

Практические следствия:

  • Не тратьте время на уменьшение скриншотов перед отправкой — это не значительно снижает стоимость для этого провайдера, и вы теряете детали, которые могут понадобиться.

  • Всегда формулируйте вопросы так, чтобы вынуждать короткие ответы: да/нет, число, короткая метка, крошечный JSON-объект с парой полей. Каждый инструмент этого сервера автоматически добавляет инструкцию о коротком ответе, но расплывчатый открытый вопрос («что ты видишь?») всё равно может подтолкнуть модель к более длинному ответу, чем конкретный («видно ли диалог ошибки? да/нет»).

При ~$0.0006 за вызов для хорошо сформулированных коротких вопросов сессия QA на 500 вызовов стоит примерно $0.30. Тот же объём открытых вопросов «опиши экран» может обойтись в 2-3 раза дороже.

Встроенные защитные ограничители затрат

Каждый вызов vision записывается в .vision-log.jsonl (JSONL, одна запись на вызов: временная метка, вопрос, ответ, стоимость). Поверх этого лога работают две независимые защиты, обе не зависят от провайдера (они работают на основе того costUsd, который сообщает провайдер):

  • Предупреждение на вызов (VISION_ALERT_USD, по умолчанию $0.0015): если отдельный вызов возвращается выше этого, ответ инструмента включает примечание [COST ALERT], сообщающее, что модель, вероятно, проигнорировала инструкцию о коротком ответе — сигнал переформулировать вопрос, а не молча проглатывать.

  • Дневной лимит (VISION_SESSION_CAP_USD, по умолчанию $2.00): как только совокупный зарегистрированный расход за сегодня достигает этого, каждый дальнейший вызов vision категорически отклоняется (до того, как он достигнет провайдера), пока лимит не будет повышен или день не сменится. Это жёсткая остановка против зациклившегося цикла, а не просто предупреждение.

Вызовите vision_spend_report в любое время, чтобы проверить сегодняшний итог без обращения к устройству или vision.

Если провайдер не может сообщить стоимость (см. openai-compatible ниже), вызовы от него записываются с costUsd: null и никогда не вызывают предупреждение и не учитываются в лимите — защитные механизмы просто не могут защитить расходы, о которых у них нет информации.

Своя модель

Анализ изображений проходит через src/providers/visionProvider.js, который выбирает провайдера по имени из VISION_PROVIDER в .env. Встроены два:

  • runware (по умолчанию) — напрямую общается с задачей imageCaption от Runware.ai, используя Qwen2.5-VL-7B-Instruct (AIR id runware:152@2) по умолчанию. Runware и OpenRouter — это два отдельных сервиса с отдельными API-ключами и каталогами моделей — этот сервер общается с Runware напрямую, а не через OpenRouter.

  • openai-compatible — универсальный провайдер для всего, что говорит на формате vision OpenAI chat-completions (части контента image_url). Работает с OpenRouter, локальным сервером Ollama/LM Studio с vision-моделью, Groq, Together.ai или любым другим совместимым endpoint. Настройте OPENAI_COMPATIBLE_BASE_URL, OPENAI_COMPATIBLE_API_KEY, OPENAI_COMPATIBLE_MODEL в .env. Большинство OpenAI-совместимых API сообщают об использовании токенов, а не о плоской долларовой стоимости; задайте OPENAI_COMPATIBLE_PRICE_PER_1M_INPUT/_OUTPUT, если хотите, чтобы этот провайдер оценивал costUsd на основе этого (в противном случае отслеживание затрат/защитные механизмы неактивны для этого провайдера, как отмечено выше).

Чтобы добавить полностью кастомного провайдера (самохостинговая модель, совершенно другая форма API), скопируйте src/providers/openaiCompatibleProvider.js как отправную точку, реализуйте:

async function ask(imageBuffer, mimeType, question) {
  // return { text: string, costUsd: number | null }
}
module.exports = { ask };

и зарегистрируйте его с именем в loadProvider() в src/providers/visionProvider.js.

Лицензия

MIT


Разработано Kinect.PRO

Available Tools

9 tools
logcat_grepRead recent logcat, filteredA

Read the last N logcat lines, optionally filtered by a regex (e.g. your app's tag, or "Exception|FATAL"). No vision call, no cost - prefer this over screenshot_ask whenever what you need is already in a log line (crashes, your own debug prints, network errors).

ParametersJSON Schema
NameRequiredDescriptionDefault
linesNoHow many recent lines to fetch (default 200).
filterRegexNoOptional regex; only matching lines are returned.

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It clearly frames the operation as a read ('Read the last N logcat lines'), implying no mutation, and adds resource-related behavior ('No vision call, no cost'). It does not detail empty-result behavior or regex error handling, but for a non-destructive log reader this is sufficient.

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?

Two compact sentences, each earning its place: the first states the core operation, the second provides selection guidance and cost context. No redundant phrases or unnecessary details.

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?

Given only two optional parameters and no output schema, the description covers the action, filtering, selection criteria, and cost trade-off. It is complete enough for an agent to invoke correctly, though it does not spell out behavior for empty results or invalid regex.

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?

The input schema already documents both parameters with 100% coverage, so the baseline is 3. The description adds practical regex examples ('your app's tag, Exception|FATAL') and clarifies that the filter is optional, providing contextual guidance beyond the raw schema.

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 uses a specific verb ('Read') and a clear resource ('logcat lines'), and it explicitly distinguishes itself from a sibling tool (screenshot_ask) by stating 'No vision call, no cost'. An agent can immediately tell what this tool does and how it differs.

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 gives an explicit when-to-use rule: 'prefer this over screenshot_ask whenever what you need is already in a log line,' followed by concrete examples (crashes, debug prints, network errors). It also explains the cost advantage, making the selection decision clear.

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

long_press_and_askLong-press + screenshot + askA

Long-press at (x, y) for durationMs, wait briefly, take a screenshot, and ask a short question about the result.

ParametersJSON Schema
NameRequiredDescriptionDefault
xYes
yYes
waitMsNoMilliseconds to wait after releasing before screenshotting (default 500).
questionYes
durationMsNoHold duration in ms (default 800).

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden of disclosing behavior. It transparently lists the operation sequence and references default waitMs/durationMs defaults in the schema. However, it does not disclose side effects of long-pressing (e.g., opening context menus or triggering navigation), what the 'ask' returns or to whom, or any required permissions.

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?

A single sentence that front-loads the core action and includes the full workflow without filler. Every element earns its place.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 5 parameters, no annotations, and no output schema, the description leaves important gaps: the return/response behavior is ambiguous ('ask a short question about the result'), coordinate system is unspecified, and side effects are not mentioned. An agent would need additional implicit knowledge to call this tool confidently.

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 descriptions only cover waitMs and durationMs (40% coverage). The description helps by framing x and y as long-press coordinates and question as a short question about the result. Still, it does not specify coordinate units/origin or any constraints on the question, so it only partially compensates for the schema gaps.

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?

States a specific action sequence: long-press at (x, y) for durationMs, wait, screenshot, and ask a question. The long-press gesture clearly differentiates it from sibling tools like tap_and_ask, swipe_and_ask, and screenshot_ask, even without naming them explicitly.

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 description implies the use case: perform a long-press and inspect the resulting screen via a screenshot and question. However, it does not explicitly state when to prefer this over tap_and_ask, swipe_and_ask, or other siblings, nor does it mention any exclusions.

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

press_keyPress hardware/virtual keyA

Send an Android keyevent code (e.g. 4 = BACK, 66 = ENTER, 187 = APP_SWITCH). No vision call.

ParametersJSON Schema
NameRequiredDescriptionDefault
keycodeYesAndroid KEYCODE_* integer value.

TDQS

A4/5.0
Behavior3/5

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

No annotations are present, so the description is the only source of behavior. It discloses the core action (sending a keycode) and that it does not use vision, but it does not clarify whether the key is pressed and released with a single event or describe timing/duration. Lacks details on side effects.

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?

One compact sentence with two clauses; the key action is front-loaded, and each part (action, examples, vision exclusion) adds value without redundancy.

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?

Simple tool with one required parameter and no output schema. The description covers what it does and gives examples, so an agent can invoke it correctly. It does not explain return behavior or errors, but those are likely unnecessary for a fire-and-forget key event. Minor missing context about when to use it is covered under usage guidance.

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?

The schema already documents keycode as an Android KEYCODE_* integer. The description adds specific example values (4=BACK, 66=ENTER, 187=APP_SWITCH), which clarify the range and meaning significantly beyond the schema's generic description.

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?

States the specific verb 'send' and resource 'Android keyevent code', gives concrete examples distinguishing it from vision-based siblings like screenshot_ask and tap_and_ask, and explicitly notes 'No vision call.'

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?

Provides minimal guidance on when to use; the 'No vision call' implies it is not for visual tasks, but it does not explicitly name alternatives or conditions for selection. The examples imply use for system keys but lack explicit routing.

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

record_and_askRecord a timed screenshot sequence + ask about each frameA

For checking an ANIMATION or any effect that plays out over time (e.g. "does the strength indicator pulse smoothly?", "does the XP label fly up and fade out?", "does the sprite return to its start position?"). Optionally performs one action first (tap or swipe, or neither), then takes frameCount screenshots spaced intervalMs apart, and asks the SAME short question about each frame separately (each frame gets its own vision call, with its frame number in the prompt) - returns one answer per frame in order.

Sequential single-frame calls were chosen over sending several frames in one request: Runware's imageCaption does accept an undocumented multi-image array, and it works fine for exactly 2 frames, but degrades noticeably at 3+ (truncated/malformed answers in testing) - sequential calls are both more reliable and, per-frame, no more expensive. Keep frameCount modest (3-6) - each frame is a full separate vision call and cost scales linearly with it.

ParametersJSON Schema
NameRequiredDescriptionDefault
xNoRequired for action=tap or action=swipe (swipe start x).
yNoRequired for action=tap or action=swipe (swipe start y).
x2NoRequired for action=swipe (end x).
y2NoRequired for action=swipe (end y).
actionYesAction to perform before starting the capture sequence.
waitMsNoMilliseconds to wait after the action before the FIRST screenshot (default 500) - same meaning as waitMs in tap_and_ask/swipe_and_ask, separate from intervalMs which spaces out the frames after that.
questionYesThe same short question asked about every captured frame (e.g. "Is the indicator visible? yes/no").
frameCountYesHow many screenshots to take, spaced intervalMs apart (2-8; keep modest, see description).
intervalMsYesMilliseconds between each screenshot (i.e. the sampling interval of the sequence).

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it delivers: it reveals that each frame gets its own vision call with the frame number in the prompt, that answers come back one per frame in order, and that sequential calls were deliberately chosen over multi-image requests due to reliability degradation. This gives the agent accurate expectations about cost and behavior.

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?

The description is longer than average, but every sentence contributes: purpose, action semantics, per-frame behavior, return ordering, rationale for sequential calls, and cost guidance. The key use case is front-loaded, and the engineering rationale is placed where it helps the agent decide rather than adding noise.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 9 parameters, no output schema, and no annotations, the description covers the core interaction fully: what triggers the sequence, what each frame does, how the question is applied, what the result order is, and cost implications. The remaining parameter details are already well documented in the input schema.

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 the baseline is 3. The description adds extra value by advising frameCount stay modest (3-6), explaining linear cost scaling, and clarifying that waitMs is distinct from intervalMs and has the same meaning as in tap_and_ask/swipe_and_ask. This goes beyond the schema's structural descriptions.

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 opens with a specific use case—checking an animation or effect that plays out over time—and clearly states the mechanism: perform an optional action, take frameCount screenshots spaced intervalMs apart, and ask the same question about each frame. This distinguishes it from single-shot siblings like screenshot_ask or tap_and_ask without needing to open 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?

It explicitly says when to use the tool: for animations or time-based effects. It also explains when the optional action is tap, swipe, or neither. However, it does not explicitly name alternative tools or state when NOT to use this one, so the guidance is clear but not fully contrastive.

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

screenshot_askScreenshot + askA

Take a screenshot of the current screen and ask a short question about it (e.g. "Is there an error dialog visible?", "How many word icons are on screen?", "What color is the strength indicator?"). Use this when you need to check state WITHOUT performing an action first. Phrase the question so a short answer is possible (yes/no, a number, a short label) - see this server's README "Cost model".

ParametersJSON Schema
NameRequiredDescriptionDefault
questionYesA short, specific question about the current screen.

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden of behavioral disclosure. It clearly communicates a non-action read-only behavior and implies the response is short ('so a short answer is possible'). It points to the README for cost details, adding context. While it doesn't describe the exact return format, the answer is implied by the question-asking purpose.

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?

The description is concise (about 3 sentences) and front-loaded with the main action. Every sentence earns its place: statement of action, examples, usage guidance, and cost reference. No redundancy or filler.

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 single-parameter, read-only tool without an output schema, the description is largely complete. It covers purpose, usage timing, question phrasing, and cost considerations. It could explicitly mention that the result is an answer to the question, but that is reasonably implied. The description is sufficient for an agent to call it correctly.

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% and the parameter description already clarifies the question. The tool description adds value by providing examples of valid questions and guidance on phrasing for short answers, which enriches the parameter's semantics beyond the schema alone.

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 states a specific verb-resource pair ('Take a screenshot of the current screen and ask a short question about it') and provides clear examples. It also distinguishes itself from siblings by specifying 'WITHOUT performing an action first', which separates it from action-based tools like tap_and_ask or swipe_and_ask.

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 explicitly states when to use this tool ('when you need to check state WITHOUT performing an action first') and gives concrete guidance on phrasing questions for short answers. The reference to the README 'Cost model' provides additional usage context. This fully addresses when to use instead of alternatives.

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

swipe_and_askSwipe/drag + screenshot + askA

Swipe (or drag, for drag-and-drop UIs) from (x1, y1) to (x2, y2), wait briefly, take a screenshot, and ask a short question about the result - all in one call.

ParametersJSON Schema
NameRequiredDescriptionDefault
x1Yes
x2Yes
y1Yes
y2Yes
waitMsNoMilliseconds to wait after the swipe before screenshotting (default 500).
questionYesA short, specific question about the screen after the swipe.
durationMsNoSwipe duration in ms (default 300; use longer for drag-and-drop hold gestures).

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden and does disclose the full ordered behavior: swipe, wait, screenshot, ask. It also notes the duration nuance for drag-and-drop holds. It doesn't detail coordinate units or what 'ask' returns, but the step sequence is clearly communicated.

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?

One sentence captures the entire workflow with no filler. The core action is front-loaded, and the drag-and-drop nuance is efficiently folded into the gesture description.

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?

The description is adequate for a simple composite gesture tool, but given no output schema and no annotations, it omits the return/answer semantics of 'ask', the coordinate system, and any cost or side-effect implications. These gaps prevent it from being fully self-sufficient.

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 only 43%, so the description must compensate. It explains x1/y1/x2/y2 as the swipe's start and end points, and clarifies that question should be short and about the post-swipe screen. The optional waitMs and durationMs already have schema descriptions, and the prose adds the 'hold for drag-and-drop' nuance.

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 states a specific verb+resource: swipe/drag from one coordinate to another, wait, screenshot, and ask a question. It clearly distinguishes itself from sibling tools like tap_and_ask and screenshot_ask by naming the gesture ('Swipe') and the compound workflow.

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 instruction to use drag 'for drag-and-drop UIs' gives some contextual guidance, but there is no explicit when-to-use/when-not-to-use statement or reference to alternatives. The appropriate context is implied by the swipe gesture rather than directly contrasted with siblings.

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

tap_and_askTap + screenshot + askA

Tap at device screen coordinates (x, y), wait briefly for the UI to react, take a screenshot, and ask a short question about the result - all in one call. Use this for any "tap here, then check what happened" step instead of calling separate tap/screenshot/ask tools.

ParametersJSON Schema
NameRequiredDescriptionDefault
xYesX coordinate in device pixels.
yYesY coordinate in device pixels.
waitMsNoMilliseconds to wait after the tap before screenshotting (default 500).
questionYesA short, specific question about the screen after the tap.

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the sequence of actions (tap, wait, screenshot, ask) and mentions a wait period before screenshotting. However, it does not disclose what happens if the tap fails, the exact return format (e.g., does it return an image, a text answer, or both?), or any side effects like requiring a running app. The description is adequate for basic behavior but lacks depth on error handling or output, which is significant for a composite tool.

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?

The description is two sentences with no redundancy. The first sentence front-loads the action sequence, and the second sentence provides direct usage guidance. Every word serves a purpose, and the structure is clean and immediately understandable. It avoids jargon and is well-scoped.

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?

For a composite tool with 4 parameters and no output schema, the description should cover the response format and any prerequisites. While it clearly states the purpose and usage, it does not mention what the tool returns (e.g., an answer to the question, a screenshot reference) or any necessary preconditions (e.g., the device being interactive). Since there is no output schema, the description's silence on return values leaves an agent without complete information for correctly interpreting the tool's outcome. This is a notable gap, so a 3.

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 100%, so the baseline is 3. The description adds minimal semantic value beyond the schema: it refers to 'wait briefly' which maps to waitMs, and characterizes the question as 'short and specific', but does not explain coordinate units or default wait behavior beyond what the schema provides. The description does not go beyond the schema definitions, so a 3 is appropriate.

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 clearly states the tool's verb and resource: 'Tap at device screen coordinates (x, y), wait briefly for the UI to react, take a screenshot, and ask a short question about the result - all in one call.' It distinguishes itself from the siblings by defining its specific action (tap) and explicitly contrasting with calling separate tap/screenshot/ask tools. The title also reinforces the composite nature, so there is no ambiguity.

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 description provides explicit when-to-use guidance: 'Use this for any "tap here, then check what happened" step instead of calling separate tap/screenshot/ask tools.' This clearly defines the usage context and names an alternative (separate tools). It does not explicitly mention sibling tools like swipe_and_ask or long_press_and_ask, but the reference to 'tap' inherently implies a distinction from those. This is strong guidance, but not exhaustive about exclusions from all siblings, hence a 4.

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

type_textType textA

Type text into whatever field currently has focus. No screenshot/vision call - pair with screenshot_ask if you need to confirm the result.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It discloses that typing targets the focused field and that screenshot/vision is not part of the operation, but it does not cover edge cases such as no focused field, whether existing text is replaced, or how special characters are handled.

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?

Two tight sentences: the core behavior is front-loaded, and the follow-up guidance about screenshot_ask earns its place. No filler or redundancy.

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 one-parameter tool, the description is nearly sufficient: it states the target, the action, and the verification route. Missing failure-mode detail, such as what happens when no field has focus, keeps it from a 5.

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%, and the description does not add meaning beyond the property name 'text'. The parameter is simple, but nothing explains format, newline behavior, limits, or encoding, so the description fails to compensate for the schema's lack of documentation.

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?

States a concrete action ('Type text') and a specific target ('whatever field currently has focus'), and explicitly warns against treating it as a screenshot/vision operation. This clearly differentiates it from screenshot_ask and the other _and_ask siblings.

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?

Gives clear operational guidance: use it when a field has focus, and pair it with screenshot_ask when confirmation is needed. It does not explicitly contrast with press_key or other input tools, but the focus-based behavior is enough to guide selection.

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

vision_spend_reportReport today's vision spendA

Report the cumulative vision-provider spend for today and the configured alert/cap thresholds, without making any device or vision call.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It openly states 'without making any device or vision call', which discloses side-effect-free behavior, but it does not describe the output format, potential delays, or any other behavioral aspects. This is a reasonable disclosure but not comprehensive.

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?

The description is a single, well-structured sentence that front-loads the verb and resource. Every word adds value, with no redundancy or filler.

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 zero-parameter, no-output-schema tool, the description covers the essential information: what is reported and the guarantee of no side effects. It does not specify the return format or any prerequisites, but given the simplicity, it is sufficiently complete.

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?

There are zero parameters, so the baseline is 4. The description adds meaning about what the report contains (spend and thresholds) beyond the empty schema, which is exactly what is needed for a parameterless tool.

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 uses the specific verb 'Report' and identifies the exact resource ('cumulative vision-provider spend for today') plus the alert/cap thresholds. It is clearly distinct from the sibling action-oriented tools (screenshot, tap, etc.) by stating it makes no device or vision call.

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 description implies the tool is for checking spend information and explicitly notes it does not make any device or vision call, but it does not name alternative tools or provide explicit when-to-use guidance. The use case is somewhat obvious given the sibling list, but the guidance is not explicit enough for a higher score.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 9 tool updatesv0.1.0
    • First observedlogcat_grep
    • First observedlong_press_and_ask
    • First observedpress_key
    • First observedrecord_and_ask
    • First observedscreenshot_ask
    • First observedswipe_and_ask
    • First observedtap_and_ask
    • First observedtype_text
    • First observedvision_spend_report

TDQS

A4.3/5.0

Scored across 9 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: screenshot_ask is passive state-checking, while tap/swipe/long_press_and_ask each combine a specific gesture with screenshot-and-ask. record_and_ask targets animations, type_text and press_key are direct input without vision, logcat_grep handles logs, and vision_spend_report tracks cost. No two tools overlap in function.

Naming Consistency5/5

All tool names follow a consistent snake_case pattern, with a clear <action>_and_ask convention for vision-verifying interactions and simple verb_noun for the rest. The naming logically separates gesture tools from non-vision tools, making the set easy to navigate.

Tool Count5/5

Nine tools is well-scoped for a mobile automation/verification server. Each tool addresses a concrete need—actions, verification, logging, cost monitoring—and none feel redundant or purely decorative. The count fits the domain without bloat or sparsity.

Completeness5/5

The tool surface covers the full cycle of mobile UI interaction and verification: direct input (type_text, press_key), gestures (tap/swipe/long_press), visual state checking (screenshot_ask, record_and_ask), log inspection (logcat_grep), and cost governance (vision_spend_report). No obvious dead ends or missing operations for the stated purpose.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    C
    maintenance
    A lightweight bridge enabling AI agents to perform real-world tasks on Android devices such as app navigation, UI interaction, and automated QA testing without requiring computer-vision pipelines or preprogrammed scripts.
    14
    2,158 PyPI
    880
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Enables AI agents to control Android devices and emulators through direct UI interaction, allowing app navigation, automated testing, and real-world task execution via ADB without computer vision or scripts.
    18
    2
    MIT