Build a canonical UNPKG file URL
build_file_urlBuild a direct UNPKG file URL (the original file lookup) with a deliberate version policy, verifying the file exists when a path is given.
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": {
"package": "<package>"
},
"name": "build_file_url"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | File path inside the package. Defaults to the resolved entry point. | |
| policy | No | preserve: keep the given spec (default). exact: resolved version. patch: major.minor (bug fixes flow). range: ^major.minor.patch. | |
| package | Yes | ||
| subpath | No | Package subpath import, e.g. hooks for preact/hooks. Resolved through the exports map, then file discovery. Ignored when file is given. | |
| version | No | Exact version, dist-tag, or range to resolve. Defaults to latest. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| file | Yes | ||
| package | Yes | ||
| specUsed | Yes | ||
| resolvedVersion | Yes | ||
| verifiedFileExists | Yes |