Skip to main content
Glama

frame_evaluate

Run JavaScript inside a same-origin iframe by specifying its URL pattern. Useful for automating actions within specific frames while avoiding cross-origin restrictions.

Instructions

Run JS inside an iframe matching URL pattern.

Same-origin frames only: cross-origin iframes (reCAPTCHA bframe, payment
widgets, third-party embeds) block contentWindow.eval and return an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frame_url_patternYes
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description takes full burden and clearly discloses a key behavioral trait: same-origin only and error on cross-origin. It does not detail other behaviors like return format, but the output schema exists to cover that.

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 sentences with no waste. First sentence states action, second provides critical constraint. Highly concise and front-loaded.

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?

Given 2 parameters and an output schema, the description covers a key limitation but lacks parameter format details and usage context. It is not fully complete for an AI agent to use without additional inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description adds minimal meaning to parameters. 'matching URL pattern' for frame_url_pattern is vague (no format), and 'JS' for expression is generic. No examples or additional guidance provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it runs JS inside an iframe matching a URL pattern. It specifies the verb 'Run' and resource 'iframe', distinguishing it from main-page evaluation tools like 'evaluate' among siblings. However, it does not explicitly name alternatives.

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 description mentions same-origin restriction and that cross-origin iframes return an error, providing a condition for use. But it does not explicitly compare to sibling tools like 'evaluate' or 'list_frames', leaving the agent to infer usage context.

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/RobithYusuf/mcp-stealth-chrome'

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