Skip to main content
Glama
DICloak Local API MCP Server

DICloak Local API MCP Server

Official

chrome_send_command_to_inject_script

Trigger user-defined events in an injected browser script by sending a JSON payload to the correct environment and tab. Use it to activate event listeners set up in a DICloak browser profile.

Instructions

If the script injected using chrome_inject_script listens for user-defined events, this tool can be used to trigger those events

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": {
      "envId": "<envId>",
      "eventName": "<eventName>"
    },
    "name": "chrome_send_command_to_inject_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
envIdYesEnvironment ID for the browser environment to operate.
tabIdNoThe tab where you previously injected the script (if not provided, use the currently active tab)
payloadNoThe payload passed to event, must be a JSON string
eventNameYesThe eventName your injected content script listens for

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior2/5

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

No annotations exist, so the description carries the full behavioral burden, yet it discloses only that the tool dispatches events to a previously injected listener. It says nothing about what happens if no listener is registered, whether the call blocks or returns a payload, error behavior, or whether a specific tab is required versus the active tab fallback.

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?

A single short sentence with no filler, and the prerequisite condition is front-loaded so the agent can self-qualify quickly. It is arguably too terse for a 4-parameter tool, but nothing is wasted.

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 four-parameter command tool with full schema coverage and no output schema, the description covers the essential trigger context but leaves gaps around tab targeting behavior when tabId is omitted and around what a successful or failed invocation looks like.

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%, so envId, tabId, payload, and eventName are already documented in the schema, including the JSON-string requirement for payload and the active-tab default for tabId. The description adds no additional semantics beyond what the schema provides, which is the expected baseline here.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action — triggering user-defined events that an injected script listens for — and ties it to the sibling chrome_inject_script, which distinguishes it from injection itself. It stops short of a crisp standalone verb+resource framing because the whole sentence is conditional.

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 precondition: the tool applies only when a script injected via chrome_inject_script is listening for user-defined events. It names the related sibling implicitly and establishes the sequencing (inject first, then send command), but gives no explicit when-not guidance or failure-mode alternatives.

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