Skip to main content
Glama

js.get_source

Read-only

Retrieve a script or resource source, returning a requested line window inline and saving the full file as an artifact for inspection.

Instructions

Source of one script or resource. Returns a line window inline and the whole file as an artifact.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "js.get_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
line_endNo
save_pathNo
script_idNo
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
line_startNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds genuinely useful behavior beyond that — it returns a line window inline and the whole file as an artifact — which is the kind of dual-response detail an agent needs. It still omits what happens with save_path, how the window defaults are chosen, and whether the call is scoped to the active target by default.

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?

Two short sentences, front-loaded with the purpose followed immediately by the return shape. Nothing is wasted, though the brevity borders on under-specification rather than economy.

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 seven parameters, zero required, 29% schema coverage, and no output schema, the description carries most of the burden — and it only addresses the return format. An agent cannot tell from this text how to identify the script, how to control the line window, or when an artifact versus an inline result is produced.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 29%: only target_id and browser_id are documented, and the description says nothing about any parameter. The url-vs-script_id distinction, the meaning of line_start/line_end, and the effect of save_path are all left completely unexplained despite being the core control surface of a 7-parameter tool.

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?

"Source of one script or resource" names the resource but uses a noun phrase rather than a verb, and "resource" is left undefined (network body? stylesheet? document?). Saying "one" implies it fetches a single item, which distinguishes it weakly from js.search_source, but the description never states that contrast explicitly.

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 at all: nothing says whether to use this instead of js.search_source to locate code, or network.get_body / css.get_stylesheet_text to fetch non-script content. The reader must infer the boundary from the sibling names alone.

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