Skip to main content
Glama

safari_verify_state

Verifies an editor or input's framework-level state matches the expected value before submitting, catching stale internal data that DOM text can hide.

Instructions

Verify the framework-level state of an editor/input matches the expected value. Returns JSON {match, mode, actual, expected, hint?}. Modern editors (ProseMirror, Lexical, Closure, React-controlled inputs) maintain state separately from the DOM — .value or .textContent may show new text while the internal store still holds old data, so a Submit click sends stale data. Call this AFTER safari_fill and BEFORE clicking Submit on critical forms (Featured.com, LinkedIn share, Medium, Reddit).

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": {
      "selector": "<selector>",
      "expected": "<expected>"
    },
    "name": "safari_verify_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
receiptNoOmit it: Daylight has no tab receipts and refuses a call that passes one
expectedYesExpected value or text fragment that should appear in framework state
selectorYesCSS selector of the editor/input to verify

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 disclosure burden and does well: it explains the stale-data failure mode and gives the return shape {match, mode, actual, expected, hint?}. It does not say whether the tool waits/polls for state to settle, what timeout applies, or what happens if the selector is missing, which are relevant for a verification step.

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, front-loaded with purpose then return shape then workflow guidance. No filler; the middle sentence on framework vs DOM state is long but is the core justification for the tool existing.

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?

No output schema exists, so the inline return shape {match, mode, actual, expected, hint?} is necessary and present. Gaps remain around timing/retry behavior and what 'mode' represents, which matter for an agent deciding whether a failed match is retryable.

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 coverage is 100% and each parameter is documented in the schema, including the unusual receipt parameter that must be omitted. The description adds no syntax or format detail beyond what the schema already states about selector and expected, so baseline 3 applies.

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: verify the framework-level state of an editor/input against an expected value. The explanation of why framework state differs from DOM state makes clear how this differs from safari_fill and DOM-reading tools like safari_evaluate.

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?

Explicit sequencing: 'Call this AFTER safari_fill and BEFORE clicking Submit on critical forms', with named concrete targets (Featured.com, LinkedIn share, Medium, Reddit). An agent knows exactly where in a workflow this tool belongs, though no explicit when-not condition is 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