Skip to main content
Glama

safari_eval_file

Execute JavaScript from a file path, bypassing size limits of inline scripts, and enabling base64 binary uploads.

Instructions

Execute JavaScript read from a FILE path (avoids passing huge scripts inline / manual copy). Same engine as safari_evaluate: extension-first (no focus steal), AppleScript fallback. Use to upload binary via a generated .js containing base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to a .js file whose contents are the script to execute
Behavior3/5

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

No annotations provided, so description must cover behavior. It mentions execution engine (extension-first, AppleScript-fallback) and lack of focus steal. However, it does not disclose potential side effects, error handling (e.g., file not found), or return value behavior, which are important for a file-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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences: first defines action and benefit, second explains engine, third gives a key use case. No wasted words, each sentence contributes essential information.

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?

Provides good background on engine and use cases but lacks details on return values (what happens after execution?), error conditions, and whether the execution is synchronous or asynchronous. For a tool with no output schema, this gap reduces completeness.

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 coverage is 100%, so the schema already describes the path parameter. The description adds value by explaining the file must be a .js file and the contents are executed, and provides a concrete use case (binary upload). This enriches understanding beyond the 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 it executes JavaScript from a file path, distinguishing from inline execution (safari_evaluate). The description also mentions specific use case (binary upload via base64), making the tool's purpose unmistakable.

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?

Explicitly states when to use (avoid huge scripts inline, upload binary via base64) and the same engine as safari_evaluate. Does not explicitly exclude inappropriate use cases but provides sufficient context to guide the agent.

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/achiya-automation/safari-mcp'

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