Skip to main content
Glama

Robot Actions — Remote Device Control

android_traffic_mock_add

Add (or update in place, if id matches an existing route) a mock/abort rule that short-circuits future matching HTTPS requests on this device inside the TLS-inspecting proxy — the request never reaches the real server. mode "mock" (default) returns the given status/headers/body; mode "abort" kills the connection so the app sees a network failure. Requires TLS capture to already be running on this device (android_traffic_start) — routes are stored per-device and take effect live, no restart needed. Certificate-pinned apps cannot be intercepted at all (same limit as capture itself), so a route targeting pinned traffic will simply never match.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoRoute id to update in place (replaces the existing route); omit to auto-generate a new one
bodyNoResponse body to inject for mode "mock" (text, or base64 when bodyEncoding is "base64")
modeNo"mock" injects a canned response (default); "abort" kills the connection
methodNoOptional HTTP method filter (e.g. "GET"/"POST"); matches any method when omitted
serialYesAndroid device serial (adb serial)
statusNoHTTP status to inject for mode "mock" (default 200)
delayMsNoLatency to inject before responding/aborting, in ms (clamped to 60s server-side)
enabledNoWhether the route is active (default true) — disabled routes are kept but ignored
headersNoResponse headers to inject for mode "mock", as {headerName: value} — e.g. {"content-type": "application/json"}
matchUrlYesURL pattern to match against the request's full URL
matchTypeNoHow matchUrl is interpreted against the request URL (default "contains")
bodyEncodingNoEncoding of `body` (default "text")

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

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 does it thoroughly: mutation happens in place, requests never reach the real server, abort causes a network failure, routes are per-device and take effect live, and certificate-pinned traffic will never match. These are exactly the side effects and limits an agent needs.

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?

Four dense sentences, each earning its place: definition/effect, modal behavior, prerequisite/live behavior, and a critical limitation. The most important fact (add/update a rule) is front-loaded.

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?

Given 12 parameters, no output schema, and no annotations, this is complete: it covers prerequisites, live application, per-device storage, and the pinned-certificate boundary. Nothing critical to deciding whether or how to call the tool is missing.

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, but the description adds a useful behavioral layer on top: how `mode` changes behavior, how `id` enables updating in place, and how `serial` scopes routes per-device. It doesn't restate all 12 parameters, which is appropriate given the schema already documents them.

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 gives a specific verb and resource: add or update a mock/abort rule in the TLS-inspecting proxy. It also clarifies scope (device-level HTTPS traffic, not a browser context) and mentions `android_traffic_start`, so an agent can tell it apart from web/devtools mock tools.

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 gives a clear precondition (TLS capture must already be running) and a hard limitation (certificate-pinned apps won't match). It doesn't explicitly name alternatives like `android_traffic_mock_remove` for deletion or `android_devtools_mock_add` for browser-level mocking, so when-to-use-vs-siblings is mostly inferred from names.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources