Skip to main content
Glama
stemado

scout-mcp-server

by stemado

execute_javascript

Execute arbitrary JavaScript in the page context to debug click failures, read shadow DOM content, dispatch custom events, or extract data from any DOM element.

Instructions

Execute arbitrary JavaScript in the page context and return the result.

Use this to debug click failures, read shadow DOM content, dispatch custom events, extract data, or perform any DOM operation not covered by other tools.

Args: session_id: Active session ID. script: JavaScript code to execute. The last expression is returned as the result. Scripts with explicit 'return' statements also work for backward compatibility. frame_context: Iframe selector path for execution context. Use 'main' or omit for top-level.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
scriptYes
frame_contextNo
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 explains return value behavior (last expression returned, explicit return works) and the frame_context parameter. However, it lacks disclosure about potential side effects, security risks, or error handling for arbitrary script execution.

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 concise: two short paragraphs plus an Args list. It front-loads the purpose and usage, then provides parameter details. Every sentence adds value without redundancy.

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?

Given no output schema, the description adequately explains the return value (last expression or explicit return). It covers the key parameters and usage context. However, it could mention error handling or prerequisites like a valid session.

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?

The schema has 0% coverage, so the description must compensate. The 'Args' section explains each parameter: session_id (active session ID), script (code to execute with return semantics), and frame_context (iframe selector path). This adds significant meaning beyond the schema's types and required status.

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 executes arbitrary JavaScript in the page context and returns the result. It lists specific use cases (debug click failures, read shadow DOM, etc.) and differentiates from siblings by noting it covers operations not handled by other tools.

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 explicitly states when to use the tool: for debugging clicks, reading shadow DOM, etc., and implies it's for operations not covered by other tools. However, it does not name specific sibling alternatives or provide explicit 'when not to use' guidance.

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/stemado/scout-mcp'

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