Skip to main content
Glama
Lyosis

claudeForSafari

safari_javascript

Execute JavaScript code in the active Safari tab and return the result. Enables automation and data extraction from web pages without leaving the browser.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJS expression or statements. Use return for values.
tabIdNoTab ID — omit to use the active tab
profileNoSafari profile name (e.g. "Perso", "Pro"). Omit to use the first connected profile.
Behavior2/5

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

No annotations provided, so description carries full burden. Mentions execution of arbitrary JS but omits risks like page mutation, navigation, or data extraction. No disclosure of sandboxing, permissions, or side effects.

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?

Single sentence, highly efficient. Every word adds meaning. No filler or repetition.

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?

Lacks details on behavior when no return statement is present, error handling, or execution environment. For an arbitrary code execution tool, more context is warranted, especially given no output schema.

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?

Schema covers all three parameters with descriptions. Description adds value with 'Use return for values' for code and confirms defaults for tabId and profile, aiding agent understanding beyond schema.

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?

Clearly states verb 'execute', resource 'JavaScript in the current page', and outcome 'return the result'. Unambiguously distinguishes from sibling tools like safari_click or safari_navigate.

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?

Implied usage from description but no explicit guidance on when to use versus alternatives. Lacks when-not-to-use warnings or examples of appropriate scenarios.

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/Lyosis/claudeForSafari'

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