Skip to main content
Glama
luizhbesper

react-native-dev-mcp

by luizhbesper

Evaluate JavaScript in the app

evaluate_js

Execute JavaScript inside your live React Native app to inspect state (Redux, Zustand, globals) or trigger actions. Awaits promises automatically with configurable timeout.

Instructions

Execute a JavaScript expression inside the running React Native app and return the result. Use to inspect state (Redux/Zustand stores, globals) or trigger behavior. Promises are awaited via polling (Hermes limitation), up to timeoutMs. This can mutate app state — prefer read-only expressions when verifying. Requires Metro running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetIdNoRuntime target id (from list_runtime_targets)
timeoutMsNoPromise wait budget (default 5000)
expressionYesA JS expression (wrap multi-statement code in an IIFE)
awaitPromiseNoAwait a returned Promise via polling (default true)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultNo
previewNoString preview when the value is not fully serializable
exceptionNo
truncatedNo
resultTypeYes
Behavior4/5

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

The description discloses that the tool can mutate app state, that Promises are awaited via polling due to Hermes limitation, and the timeout behavior. Annotations provide little (openWorldHint: false), so the description carries the burden effectively.

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 sentences, front-loaded with purpose. Each sentence adds value without redundancy. No filler.

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?

The description covers purpose, usage context (inspect/trigger), behavioral caveats (mutability, polling, Metro), and prerequisites. Output format is left to the output schema, which is acceptable. Everything needed for correct invocation is present.

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%, but the description adds meaning by explaining that timeoutMs limits Promise polling and that awaitPromise controls awaiting. This goes beyond the schema's bare 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 clearly states the verb 'execute' and the resource 'JavaScript expression inside the running React Native app'. It distinguishes from siblings like list_runtime_targets or read_console by focusing on evaluating arbitrary JS.

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 specifies when to use: to inspect state or trigger behavior. It advises preferring read-only expressions when verifying, and notes the prerequisite 'Requires Metro running'. No exclusions or alternatives are given, but the context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/luizhbesper/react-native-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server