Skip to main content
Glama
pssrh
by pssrh

browser_select_frame

Select an iframe by its index to run JavaScript within it. Find the correct index using browser_list_frames, then target actions precisely.

Instructions

Execute JavaScript in a specific iframe by frame index. Use browser_list_frames first to find the right index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoJavaScript to execute in the frame (default: returns text content)
frame_indexYesFrame index from browser_list_frames (0 = main frame)

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.1

TDQS

A3.7/5.0
Behavior2/5

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

With no annotations, the description must carry the behavioral disclosure burden. It says what the tool does but not what side effects executing JavaScript may have, whether the frame context persists for later commands, or what the return value is. The name 'select_frame' also creates ambiguity about whether this is a temporary execution context or a persistent selection.

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?

Two short, focused sentences with the primary action front-loaded and the prerequisite in the second sentence. No wasted words or 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 simple two-parameter tool, the description plus schema covers the essentials. However, there is no output schema and no annotation safety profile, so the lack of any mention of return behavior or post-conditions leaves a minor but real gap.

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?

The input schema already fully documents both parameters, including the meaning of frame_index and the default behavior of code. The description adds a useful link to browser_list_frames but does not substantially expand parameter semantics beyond the schema, so the baseline 3 applies.

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 a specific action (execute JavaScript), a specific target (a specific iframe), and the selection mechanism (frame index). It distinguishes itself from the generic browser_execute_script sibling by scoping execution to a frame.

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 explicitly instructs the agent to call browser_list_frames first to find the right index, which is a concrete usage prerequisite. It does not enumerate alternatives or when not to use the tool, but the guidance is clear enough for correct invocation.

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

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/pssrh/pony-browser-mcp'

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