Skip to main content
Glama

metro_state

Evaluate a JavaScript expression to read React Native app state via Metro CDP debugger, such as Redux store values. Auto-discovers the debugger connection and supports custom expressions.

Instructions

Reads app state from a React Native app by evaluating a JS expression in its runtime via the Metro CDP debugger (Runtime.evaluate, returnByValue). Default expression reads a globally-exposed Redux store; override expression to read any in-app value. The app must expose the value on a global the runtime can reach. Auto-discovers the ws via metro_apps when omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionNoJS expression to evaluate (default: a globally-exposed Redux store's getState()). e.g. "store.getState().user" or "globalThis.__APP_STATE__".
webSocketDebuggerUrlNoCDP WebSocket URL from metro_apps. Omit to auto-discover.
portNoMetro port for auto-discovery (default 8081)
timeoutMsNoEvaluation timeout in ms (default 5000)
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. It discloses the use of Runtime.evaluate with returnByValue, auto-discovery, and the need for global exposure. However, it does not explicitly state whether the evaluation is read-only or note potential side effects from custom expressions.

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 three concise sentences, each providing essential information. The first sentence states the core action and mechanism; the second explains customization; the third covers prerequisites and auto-discovery. No waste.

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 tool that evaluates an expression and returns a value, the description covers key aspects: input parameters, default behavior, auto-discovery, and prerequisites. It lacks explicit mention of the output format but that is implicit. Error handling or failure modes are not discussed, but overall it is reasonably 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?

Schema coverage is 100% with descriptions. The tool description adds value by explaining the default expression behavior, auto-discovery for webSocketDebuggerUrl, and practical examples for expression. This goes beyond the 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 clearly states the tool reads app state by evaluating a JS expression via Metro CDP debugger. It specifies the default expression (Redux store) and overridability. It distinguishes itself from siblings like metro_apps by mentioning auto-discovery.

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 explains when to use (to read app state or any in-app value via expression override) and mentions auto-discovery via metro_apps. It does not explicitly state when not to use, but context and sibling differentiation are 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/hoainho/podium-mcp'

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