Home / Servers / Web and Network / url_build
Url build
An MCP tool from the Web and Network server, hosted on mcp.hjlabs.in.
Build or normalise a URL: start from a base URL, optionally resolve a relative path against it, set/remove query parameters, strip tracking parameters (utm_*, fbclid, gclid...), lower-case the host, drop the fragment or default port. Pure, no network. Use it to construct API calls or clean URLs for comparison.
Name on the gateway: web__url_build · read-only.
Parameters
| Name | Type | Description |
|---|---|---|
base required | string | Base URL, e.g. "https://example.com/api". |
path | string | Optional relative or absolute path to resolve against base. |
set_params | any | Object of query parameters to set, e.g. {"q":"cats","page":2}. |
remove_params | array | Query parameter names to remove. |
strip_tracking | boolean | Remove utm_*, fbclid, gclid, msclkid, mc_cid, mc_eid, ref, _ga (default true). |
drop_fragment | boolean | Remove the #fragment. |
sort_params | boolean | Sort query parameters for a canonical form. |
How to call it
Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:
{
"name": "web__url_build",
"arguments": {
"base": "…"
}
}Or connect the Web and Network server directly, which lists 22 tools including this one:
claude mcp add --transport http hj-web https://mcp.hjlabs.in/mcp/web \
--header "Authorization: Bearer YOUR_API_KEY"Try asking
Use the url build tool with base set to ….