Skip to main content
Glama
DICloak Local API MCP Server

DICloak Local API MCP Server

Official

chrome_inject_script

Inject and manage JavaScript scripts in a DICloak browser page by environment ID, including inline code, script files, script tags, removal, and listing.

Instructions

Inject JavaScript scripts into the page

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>",
      "action": "<action>"
    },
    "name": "chrome_inject_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoScript element ID (for add_script_tag)
urlNoScript URL (required for add_script_tag)
envIdYesEnvironment ID for the browser environment to operate.
actionYesAction type: inject, inject_file, add_script_tag, remove_script, list_scripts
scriptNoJavaScript code (required for inject)
contentNoInline script content (for add_script_tag)
file_pathNoScript file path (required for inject_file)
element_idNoElement ID to remove (for remove_script)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.5/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and delivers almost nothing: no statement about permissions, CSP restrictions, whether injected scripts persist across navigation, when execution occurs, or what happens to an existing script on re-inject. The only behavioral signal is that the target is a page.

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

Conciseness3/5

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

The single sentence contains no filler and is front-loaded, but it is under-specified rather than concise: for a five-action, eight-parameter tool one sentence covering only one action leaves the structure unable to carry the needed information.

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

Completeness2/5

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

With eight parameters, a five-value action enum, no annotations, and no output schema, the description covers roughly one fifth of the tool's surface. An agent gets no help distinguishing the actions, no success/failure semantics, and no note that list_scripts returns data while the others mutate page state.

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 every parameter carries an inline note tying it to an action (url for add_script_tag, script for inject, file_path for inject_file, element_id for remove_script). The description adds no meaning beyond the schema, so the baseline of 3 applies.

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

Purpose3/5

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

The verb+resource ('Inject JavaScript scripts into the page') is clear for the primary action, but the schema's action enum also exposes inject_file, add_script_tag, remove_script, and list_scripts. The description names none of these, so it under-describes the tool's actual scope and would mislead an agent looking to remove or list scripts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no routing to alternatives such as the sibling chrome_send_command_to_inject_script or chrome_script_library. 'Into the page' implies a browser-page context but the agent must infer which of the five actions applies to its situation.

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