execute_script
Run JavaScript code on the currently open Safari page to automate tasks or extract data.
Instructions
Execute JavaScript in the current Safari page
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | JavaScript code to execute |
Run JavaScript code on the currently open Safari page to automate tasks or extract data.
Execute JavaScript in the current Safari page
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | JavaScript code to execute |
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavior. It only states execution but does not mention whether results are returned, if the script has side effects, if it's destructive, or any other behavioral traits. This is a significant gap for a script execution tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at one sentence, but it may be under-specified. While it is front-loaded, it lacks necessary details for effective use. It is not bloated, but conciseness should not come at the cost of completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema and no behavioral details, the description leaves the agent uncertain about what happens after execution (e.g., return value, side effects). For a tool that executes arbitrary code, this is insufficient for safe and effective invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for the single parameter 'script', describing it as 'JavaScript code to execute'. The description adds no additional meaning beyond what the schema already provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Execute' and the resource 'JavaScript in the current Safari page', making the purpose immediately obvious. It distinguishes from sibling tools like click_element or navigate, which perform different actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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. No mention of prerequisites, when to avoid, or comparison to other tools. The agent has no context for appropriate usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/iclaudiumihaila/mcp-safari-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server