Skip to main content
Glama

boj_browser_execute_js

Execute JavaScript code directly within the current webpage context to automate tasks, manipulate content, or interact with page elements programmatically.

Instructions

Execute JavaScript in the current page context

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript code to execute
Behavior2/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 states what the tool does but lacks critical behavioral details: it doesn't mention that this executes in the browser context (implying potential side effects like DOM manipulation), whether it returns a value from the script, error handling, security implications, or performance considerations. The description is minimal and doesn't compensate for the absence of annotations.

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 a single, direct sentence with zero wasted words. It front-loads the core action ('Execute JavaScript') and specifies the context ('in the current page context') efficiently. Every word earns its place, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of executing JavaScript in a browser (a potentially powerful and risky operation), the description is incomplete. With no annotations and no output schema, it fails to address key aspects: what the tool returns (e.g., the result of the script, errors), behavioral traits (e.g., side effects, execution context), or error conditions. For a tool with one parameter but significant implicit complexity, this minimal description leaves too many gaps for safe and effective use.

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 has 100% description coverage, with the single parameter 'script' clearly documented as 'JavaScript code to execute'. The description adds no additional semantic context beyond what the schema provides (e.g., no examples of valid scripts, no mention of async support, or return value handling). Since schema coverage is high, the baseline score of 3 is appropriate, as the description doesn't enhance parameter understanding but doesn't need to.

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 the verb ('Execute') and resource ('JavaScript in the current page context'), making the purpose immediately understandable. It distinguishes itself from sibling browser tools like click, navigate, or read_page by focusing on script execution rather than navigation or content extraction. However, it doesn't explicitly differentiate from potential JavaScript-related tools that might exist elsewhere in the server.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a page loaded first), limitations (e.g., cross-origin restrictions), or when other tools like boj_browser_read_page might be more appropriate for extracting information. The agent must infer usage from the tool name and context alone.

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/hyperpolymath/boj-server'

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