Skip to main content
Glama

app_eval

Run JavaScript inside the connected app during development and return the JSON result; bridge and React Native objects are available for inspecting or controlling app state.

Instructions

Run JavaScript inside the app (dev only) and return the JSON result. Expression or statements with return. bridge and RN (react-native) are in scope.

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": {
      "code": "<code>"
    },
    "name": "app_eval"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden. It does disclose the important gating fact that this is dev-only, the expected code form, and the in-scope globals (`bridge`, `RN`), which is genuinely useful. It says nothing about side effects on app state, execution timeouts, error behavior, or serialization limits for non-JSON-safe return values — significant gaps for arbitrary code execution.

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 short sentences, front-loaded with the action and result, followed by the code-form rule and scope note. No filler and nothing repeated from the schema.

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 single-parameter tool this would normally be easy, but arbitrary JS execution with zero annotations warrants more: side-effect expectations, failure modes, and whether the caller must serialize results manually are all unstated. The core calling instructions are present, which keeps it at minimum-viable rather than deficient.

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 coverage is 0% and the schema only types `code` as a string, so the description must compensate. It does clarify the accepted form (an expression, or statements containing an explicit return), which is meaningful. It does not address async/promise handling, size limits, or syntax constraints.

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 verb and resource ('Run JavaScript inside the app') plus the result behavior ('return the JSON result'). Among the sibling UI-action tools (app_tap, app_scroll, app_snapshot), arbitrary JS evaluation is clearly distinguishable from this wording alone.

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?

'(dev only)' and 'Expression or statements with return' give real usage constraints on how to form a call. However, there is no guidance on when to prefer this over siblings such as app_snapshot or app_status for inspecting app state, nor any stated exclusions.

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