Skip to main content
Glama

browser_get_app_state

Extract server-side rendered application state from SPAs like Next.js and Nuxt to access embedded data before client-side rendering modifies the page.

Instructions

Extract embedded SPA framework state (Next.js, Nuxt, Remix, GitHub, Apollo, Redux SSR) in one CDP call. Returns parsed payloads with framework labels. Use BEFORE browser_eval or browser_get_dom on SPAs where rendered HTML is sparse. Pass selectors to target specific window globals (e.g. 'window:MY_STATE'). Caveats: Only extracts SSR-injected state — client-only runtime state requires browser_eval.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorsNoOptional override list of CSS selectors / window globals to probe. Window globals must be prefixed with 'window:' (e.g. 'window:__INITIAL_STATE__'). When omitted, scans the standard list (Next.js, GitHub react-app, Nuxt, Apollo, Remix, Redux SSR, JSON-LD).
maxBytesNoMaximum bytes per individual payload (default 4000). Larger payloads are stringified and truncated.
tabIdNoTab ID from browser_connect. Omit to use the first page tab.
portNoChrome/Edge CDP remote debugging port.
includeContextNoWhen true, append activeTab and readyState context to the response.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: what the tool extracts (SSR-injected state only), what it returns (parsed payloads with framework labels), performance characteristics ('in one CDP call'), and important limitations/caveats ('client-only runtime state requires browser_eval'). It doesn't mention error handling or authentication needs, but covers the essential operational 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?

The description is efficiently structured with three sentences that each serve distinct purposes: stating the core functionality, providing usage guidance, and explaining limitations. It's front-loaded with the primary purpose, avoids redundancy, and every sentence adds value without unnecessary elaboration.

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 with 5 parameters, 100% schema coverage, but no output schema or annotations, the description provides good contextual completeness. It explains what the tool does, when to use it, its limitations, and how it relates to other tools. The main gap is the lack of information about return values (no output schema), but the description does mention what gets returned ('parsed payloads with framework labels'), which partially compensates.

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?

With 100% schema description coverage, the baseline is 3. The description adds minimal parameter semantics beyond what's in the schema - it mentions 'pass selectors to target specific window globals' which aligns with the schema's description of the selectors parameter, but doesn't provide additional context about parameter interactions or usage patterns that aren't already documented in 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's purpose with specific verbs ('extract', 'returns') and resources ('embedded SPA framework state', 'parsed payloads with framework labels'). It explicitly distinguishes from siblings like browser_eval and browser_get_dom by specifying when to use this tool instead ('use BEFORE... on SPAs where rendered HTML is sparse').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool ('use BEFORE browser_eval or browser_get_dom on SPAs where rendered HTML is sparse') and when not to use it ('Only extracts SSR-injected state — client-only runtime state requires browser_eval'). It names specific alternative tools (browser_eval) for different scenarios, offering clear decision criteria.

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/Harusame64/desktop-touch-mcp'

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