Skip to main content
Glama

safari_replace_editor

Replaces all content in supported code editors (Monaco, CodeMirror, Ace, ProseMirror) through native APIs, enabling agents to set complete code or text reliably.

Instructions

Replace ALL content in a code editor (Monaco, CodeMirror, Ace, ProseMirror). Use ONLY for code editors — Airtable automations, GitHub gists, CodePen, n8n code nodes, etc. NOT for rich text editors like Medium/LinkedIn (use safari_fill for those). Detects ProseMirror/Draft.js/CodeMirror/Monaco/Ace and uses their native API.

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": {
      "text": "<text>"
    },
    "name": "safari_replace_editor"
  }
}

Input Schema

NameRequiredDescriptionDefault
whyNoOptional short purpose of this step, shown to the user in the cursor's status pill (e.g. 'to save the settings'). The page can read it: never put passwords, codes, card numbers or other private data in it.
textYesThe complete code/text to put in the editor
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.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose the key behavioral trait: it overwrites ALL existing content, and it works via the editors' native APIs after detecting ProseMirror/Draft.js/CodeMirror/Monaco/Ace. It does not say what happens on failure (unfocused editor, unsupported cross-origin frame) or whether the change is undoable, which keeps it below a 5 for a destructive mutation.

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 short sentences, front-loaded with the core action, then scope exclusions, then implementation detail. Every clause carries decision-relevant information with no padding or repetition.

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 three-parameter tool with full schema coverage and no output schema, the description covers purpose, routing, and the underlying mechanism. The remaining gap is failure/edge-case behavior (unfocused element, unsupported editor, no-editor-on-page outcome), which an agent would need to recover from an error.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and each parameter (why, text, receipt) is already documented in the schema, so the description adds no parameter-level meaning. Baseline 3 applies because the schema does the heavy lifting.

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 scope ('Replace ALL content') plus the exact resource class ('code editor') with named implementations (Monaco, CodeMirror, Ace, ProseMirror). It also explicitly distinguishes itself from the sibling safari_fill, so an agent can route 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit when-to-use clause ('Use ONLY for code editors'), concrete positive examples (Airtable automations, GitHub gists, CodePen, n8n code nodes), and an explicit exclusion with the alternative named ('NOT for rich text editors... use safari_fill for those'). Nothing is left to inference.

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