Skip to main content
Glama

safari_eval_file

Executes JavaScript from a local file path in Safari, avoiding inline script size limits and manual copying; enables binary uploads through generated base64 .js files.

Instructions

Execute JavaScript read from a FILE path (avoids passing huge scripts inline / manual copy). Same engine as safari_evaluate: AppleScript (the extension bridge is off in Daylight). Use to upload binary via a generated .js containing base64.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "safari_eval_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to a .js file whose contents are the script to execute
receiptNoOmit it: Daylight has no tab receipts and refuses a call that passes one

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose real behavior: execution goes through AppleScript, the extension bridge is off in Daylight, and the file is read from disk. It omits return values, failure modes (missing file, syntax error, timeout), and any safety implications of arbitrary JS execution, which is a meaningful gap for an eval tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

Three compact sentences, each carrying distinct information: what it does, the engine/transport, and the upload use case. The parenthetical asides are slightly dense but every clause earns its place; nothing is padded.

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?

For a two-parameter tool with no output schema, the definition covers inputs and environment well, and the 'same engine as safari_evaluate' note transfers some behavioral expectations. However, it never states what the call returns or how errors surface, which an agent needs before invoking arbitrary script execution.

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 baseline is 3, but the description adds genuine meaning beyond the schema by explaining why the path parameter exists (avoiding huge inline scripts / manual copy) and giving a concrete use case (base64 payload in a generated .js). It does not mention the 'receipt' parameter, though the schema already instructs to omit it.

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?

States a specific verb and resource ('Execute JavaScript read from a FILE path') and immediately contrasts it with the inline-script path used by safari_evaluate. An agent can tell exactly what this tool does and how it differs from its closest sibling without opening either schema.

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?

Gives a clear selection rule — use this when scripts are too large to pass inline or when avoiding manual copy — and adds a concrete scenario (upload binary via a generated .js containing base64). It names safari_evaluate as the same-engine alternative but does not explicitly state when NOT to use this tool, so it falls short of a full routing instruction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools