Skip to main content
Glama

safari_run_script

Run a sequence of Safari actions in one MCP session, executing each step in order and stopping if a tab-safety check or tab switch fails.

Instructions

Batch Safari actions in one MCP session, run in order. Each step is {action, args}, args as the matching tool takes them. Actions: navigate, navigateAndRead, reload, goBack, goForward, newTab, switchTab and closeTab (by tab index: {index}), listTabs, click, doubleClick, rightClick, clickAndWait, hover, fill, fillForm, fillAndSubmit, clearField, typeText, pressKey, selectOption, scroll, scrollTo, scrollToElement, readPage, getPageSource, screenshot, screenshotElement, evaluate, waitFor, waitForTime, getElementInfo, querySelectorAll, verifyState, extractTables, extractMeta, extractImages, extractLinks, analyzePage, detectForms, getAccessibilityTree, getPerformanceMetrics, getLocalStorage, setLocalStorage, deleteLocalStorage, getSessionStorage, setSessionStorage, deleteSessionStorage, getCookies, setCookie, deleteCookies, reactSelectSet, reactSelectListOptions, nativeClick, nativeHover, nativeType, nativeKeyboard, replaceEditorContent, uploadFile, mockNetworkRoute. A step refused by a tab-safety check, or a switchTab that fails, stops the batch.

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": {
      "steps": "<steps>"
    },
    "name": "safari_run_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepsYesArray of steps to execute sequentially

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 behavioral burden, and it does disclose genuinely useful traits: sequential execution order, argument pass-through to the matching tool, and that a tab-safety refusal or failed switchTab aborts the remaining batch. It does not say whether completed steps are rolled back, what the call returns (no output schema exists), or that actions like fill, uploadFile, and mockNetworkRoute mutate page state.

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?

Front-loaded with purpose, then step shape, then the action vocabulary, then the abort rule. The long action list is dense but earns its place because the input schema declares no enum for the action field, so this is the only source of the valid action names.

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

Completeness4/5

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

For a one-parameter batch executor with no annotations and no output schema, the definition covers ordering, step structure, action vocabulary, and failure abort. The notable remaining gap is what comes back from the call and what state persists after a mid-batch abort, which an agent needs to plan around partial results.

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 real meaning beyond the schema's bare 'Action name (e.g. navigate, click, fill)'. It enumerates the full accepted action vocabulary and explains the {action, args} step shape, including that tab-targeting actions use {index}; the only gap is per-action argument detail, which it explicitly delegates to the matching tool.

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?

The description states a specific verb and resource ('Batch Safari actions in one MCP session, run in order'), and the enumerated action vocabulary makes clear this is the multi-step wrapper around the single-action Safari siblings. An agent can distinguish it from tools like safari_click or safari_fill without opening any schema.

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?

Usage is implied rather than stated: 'batch ... in one MCP session' suggests multi-step flows, and 'args as the matching tool takes them' tells the agent to consult the corresponding single-action tool. There is no explicit when-to-use vs. when-to-call-individually rule, no guidance on whether a long batch is preferable to separate calls, and no prerequisites (open tab, session state) are given.

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