Skip to main content
Glama
react-native-devtools-mcp

react-native-devtools-mcp

js_eval

Execute JavaScript in a running React Native app through Metro CDP to inspect runtime state or test expressions; returns results and supports await for async code.

Instructions

Execute JavaScript in the running React Native app via Metro CDP. Returns the result. Supports await for async expressions.

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": {
      "expression": "<expression>"
    },
    "name": "js_eval"
  }
}

Input Schema

NameRequiredDescriptionDefault
expressionYesJavaScript expression or statement to evaluate

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral disclosure burden. It mentions the result return and await support, but does not disclose that arbitrary JavaScript execution can mutate app state, cause side effects, or fail in specific ways, nor does it describe prerequisites or error 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?

Three short sentences, front-loaded with the core action and environment. Every sentence adds useful information, and there is no redundancy.

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 one-parameter tool with full schema coverage and no output schema, the description covers the essentials of execution and return. However, given that this is arbitrary code execution with no annotations, it should more explicitly address side effects, execution context, and result format to be fully complete.

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 100%, so the expression parameter is already documented by the schema. The description adds minor meaning by noting that await is supported for async expressions, which helps an agent construct appropriate expressions but does not go beyond a baseline.

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 (Execute), resource (JavaScript in the running React Native app), and transport (via Metro CDP). It is clearly distinguishable from all sibling tools, which are device inspection or UI interaction tools rather than arbitrary code execution.

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 context implies this is the tool for evaluating JavaScript directly, but it does not explicitly state when to use it instead of sibling tools like get_js_logs or tap, nor does it warn when not to use it. Guidance remains inferred rather than stated.

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