Skip to main content
Glama
Web Scraper MCP Server

Web Scraper MCP Server

by bhubadinn

run_script

Navigate to a specified URL, execute custom JavaScript in the page context, and return the result for dynamic web scraping or page interaction.

Instructions

Navigate to a URL and execute custom JavaScript, returning the result

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": {
      "url": "<url>",
      "script": "<script>"
    },
    "name": "run_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe URL to navigate to
scriptYesJavaScript code to execute in the page context. Must return a value.

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 provided, so the description carries the full behavioral burden, yet it says nothing about the risk profile of executing arbitrary code against an arbitrary URL: no sandboxing or page-context limits, no timeouts, no statement about side effects or persistence of state changes, no auth/cookie behavior, and no failure modes. The only behavioral fact disclosed is sequencing and that a result is returned.

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?

One sentence, front-loaded with the action and ending with the outcome; nothing is padded. It is efficient but so terse that the terseness itself contributes to the disclosure gaps.

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?

For a remote-code-execution tool with zero annotations and no output schema, the description is under-specified: it does not characterize the return value beyond 'the result', nor cover sandbox, permissions, timeouts, or side effects. What is present is accurate but far short of what an agent needs before invoking something this powerful.

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 both parameters are documented in the schema, including the 'must return a value' constraint on the 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.

Purpose4/5

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

States a specific two-step action (navigate to a URL, execute custom JavaScript) and the outcome (returns the result). This is meaningfully distinct from the structured siblings like scrape_url and extract_data, though the description never explicitly names those siblings to sharpen the boundary.

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 and no mention of alternatives. An agent reading only this text cannot tell whether to reach for run_script versus scrape_url, extract_data, or screenshot_url when both would work; the choice must be inferred from the tool name alone.

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