Skip to main content
Glama
MCP Chrome Bridge

MCP Chrome Bridge

javascript

Run a script expression in a specified Chrome tab to inspect or manipulate page content and return the result.

Instructions

Execute JavaScript in a tab

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": {
      "tabId": "<tabId>",
      "expression": "<expression>"
    },
    "name": "javascript"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabIdYesTab ID
expressionYesJavaScript expression to evaluate

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/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 burden, yet it says nothing about whether the expression's value is returned, whether promises/async results are awaited, whether the script mutates or can break the page, or what security/CSP constraints apply. For arbitrary code execution this is a substantial disclosure gap.

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?

A single short sentence with no wasted words, but its brevity comes at the cost of under-specification; there is no front-loaded statement of result behavior or risk, which matters more here than compactness.

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?

Given only two well-documented required parameters and no output schema, the definition is minimally sufficient, but it omits what the tool returns and how errors surface, both of which an agent needs before executing arbitrary code.

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% with two required parameters (tabId, expression) already documented in the schema. The description adds no extra meaning such as expected expression form or evaluation context, so the baseline 3 applies.

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?

"Execute JavaScript in a tab" states a specific verb plus resource and is clearly distinct from siblings like click, get_page_text, or console_logs. It stops short of naming scope or the kinds of expressions expected, so it is clear but not fully differentiating.

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?

The description gives no when-to-use guidance, no indication of when a dedicated sibling tool (e.g., form_input, get_page_text, find) is preferable, and no prerequisites such as the tab needing to exist or be active. The agent must infer all routing decisions.

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