Skip to main content
Glama

Build a canonical UNPKG file URL

build_file_url
Read-onlyIdempotent

Build a direct UNPKG file URL (the original file lookup) with a deliberate version policy, verifying the file exists when a path is given.

Input Schema

NameRequiredDescriptionDefault
fileNoFile path inside the package. Defaults to the resolved entry point.
policyNopreserve: keep the given spec (default). exact: resolved version. patch: major.minor (bug fixes flow). range: ^major.minor.patch.
packageYes
subpathNoPackage subpath import, e.g. hooks for preact/hooks. Resolved through the exports map, then file discovery. Ignored when file is given.
versionNoExact version, dist-tag, or range to resolve. Defaults to latest.

Output Schema

NameRequiredDescriptionDefault
urlYes
fileYes
packageYes
specUsedYes
resolvedVersionYes
verifiedFileExistsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (read-only, idempotent, non-destructive, open-world), so the description's job is to add context — and it does, disclosing that the file is actually verified to exist when a path is supplied. That tells an agent to expect a network round-trip and possible failure on a bad path, which the annotations alone would not reveal.

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?

A single tight sentence that front-loads the action and resource. It is information-dense without waste, though the parenthetical "(the original file lookup)" is slightly awkward phrasing rather than a clean differentiator.

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?

With five parameters, a policy enum, and an output schema, the description is adequate but thin: it does not state what the returned URL looks like in edge cases (unresolved version, missing entry point) or whether verification failure is an error or a warning. The presence of an output schema lowers the burden, so this is close to sufficient but not fully complete.

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 coverage is 80%, so the schema already documents file, subpath, version, and the full policy enum with per-value meanings. The description adds only the framing "deliberate version policy" and does not explain precedence between file and subpath or how an unresolved version is handled, leaving it at the baseline.

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 names a specific verb and resource ("Build a direct UNPKG file URL") and characterizes it as "the original file lookup", which hints at why it exists apart from siblings like resolve_package or verify_url. It stops short of explicitly naming an alternative tool, so an agent still has to infer 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 Guidelines3/5

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

Usage is only implied: the mention of a "deliberate version policy" and file verification suggests the tool is for constructing a pinned, known-good CDN link rather than listing or resolving packages. There is no explicit when-to-use or when-not-to-use statement and no sibling is named.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources