Skip to main content
Glama

Fetch Bundle & Source Map

sourcemap_fetch

Download a JavaScript or CSS bundle and its source map, resolve the sourceMappingURL reference, and save both to an output directory for debugging production websites.

Instructions

Download a JavaScript or CSS bundle and its source map from a URL. Automatically resolves the sourceMappingURL reference (inline data URIs, external URLs, and conventional .map suffix fallback). Saves both files to the output directory. Use this as the first step when debugging a production website.

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

Input Schema

NameRequiredDescriptionDefault
urlYesURL of the JavaScript or CSS file to fetch
outputDirNoDirectory to save the downloaded files (default: /tmp/srcmap)/tmp/srcmap

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

The annotations already declare openWorldHint=true and readOnlyHint=false, so the agent knows this reaches the network and writes files; the description usefully confirms the write side ('Saves both files to the output directory') and explains the sourceMappingURL resolution chain. However, it does not disclose what happens on failure or when no source map is found, nor anything about rate limits or redirects, which matters for an open-world fetch. With annotations covering the safety profile, this is a moderate addition.

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?

Four short sentences, ordered from action to mechanism to side effect to usage, with the download action front-loaded and no filler. Slightly more efficient than most, though the resolution-mechanism sentence could be compressed.

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

Completeness4/5

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

Satisfies what a simple two-parameter fetch tool needs: it states inputs, side effects, and the resolution behavior. With no output schema present, the one gap is that it does not say what the tool returns (e.g., discovered paths or extraction status), so an agent must guess how to learn where the files landed.

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 both `url` and `outputDir` (including its default) are fully documented in the schema. The description adds no syntax, format, or path-resolution detail beyond that, 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?

The description opens with a specific verb and resource: 'Download a JavaScript or CSS bundle and its source map from a URL.' This is unambiguous and clearly positions the tool as the entry point of the sourcemap_* family, but it never names a sibling the way a 5 would (e.g., 'use sourcemap_extract_sources next').

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?

'Use this as the first step when debugging a production website' gives a concrete usage context and implies the ordering relative to the other sourcemap tools. It stops short of explicit exclusions or pointing at the specific follow-up tool, so it is clear context without full when-not guidance.

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