URL resolve
url-resolve · version 1.0.0 · URLs & IP addresses · free, no key needed
Resolve a URL against an absolute http(s) base using WHATWG. No fetching. Result must be http(s).
Use when you need to: url resolve · resolve relative url · join url against base.
Supported
- url resolve
- resolve relative url
- join url against base
Not supported
- fetch
- dns
- file urls
- security equivalence
Behavior
- base must be an absolute http or https URL. url is resolved with new URL(url, base).
- The resolved href must have http or https scheme; otherwise invalid_input.
- Return WHATWG href serialization. No extra normalize beyond WHATWG resolve/serialize unless the result is returned as href.
- No network and no security-equivalence claim.
Input
base(string, required): min length 1; max length 8192url(string, required): min length 1; max length 8192
Output
url(string, required)
Limits
- max url bytes: 8192
Example
Request input:
{
"base": "https://example.com/a/b",
"url": "../c"
}
Response:
{
"result": {
"url": "https://example.com/c"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "url-resolve",
"version": "1.0.0",
"input": {
"base": "https://example.com/a/b",
"url": "../c"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/url-resolve/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"base":"https://example.com/a/b","url":"../c"}'
The machine-readable contract is at /v1/tools/url-resolve/versions/1.0.0.
CLI
node cli.mjs run url-resolve 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- URL normalize: Normalize an absolute http or https URL via WHATWG parse. No DNS, fetch, or security-equivalence claim.
- URL query build: Build a query string or replace an absolute URL query from ordered pairs. No fetching.
- URL query merge: Merge query pairs into an absolute URL. No fetching.
- URL query parse: Parse query pairs and fragment from an absolute URL. Parse only; no fetching.
- IPv4 address classify: Classify an IPv4 address against the static IANA IPv4 special-purpose address registry.
- IPv4 address compare: Compare two canonical IPv4 addresses by their numeric uint32 value.