url-parser
Parse a URL into its components: protocol, host, port, path, query parameters, hash. Returns the query string parsed into a key-value map.
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": "url-parser"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to parse. Must include the protocol (http:// or https://). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hash | Yes | Fragment identifier including leading '#', or empty. | |
| host | Yes | Hostname plus port if present. | |
| path | Yes | Pathname including leading slash. | |
| port | Yes | Port number as a string, or null. | |
| query | Yes | Raw query string including leading '?', or empty. | |
| origin | Yes | Origin (protocol + host). | |
| params | Yes | Parsed query parameters. | |
| hostname | Yes | Hostname only. | |
| protocol | Yes | URL protocol without trailing colon (e.g. 'https'). |