Skip to main content
Glama

Agent Data Hub

URL parser + cleaner: parts, query params, strip tracking

util_url_parse
Read-onlyIdempotent

Parse a URL into scheme, host, port, path segments (decoded), file extension, query parameters (repeated keys as arrays), fragment, subdomain and registrable domain (handles co.uk, com.au, github.io …), and return a normalized copy with lower-case host, sorted query and tracking parameters removed (utm_*, fbclid, gclid, msclkid, mc_cid …). Pure parsing — the URL is not fetched. Use to dedupe links, clean shared URLs, or read query values. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.

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": "util_url_parse"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe URL, e.g. https://shop.example.co.uk/p?utm_source=x&id=7
strip_trackingNotrue (default) or false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that parsing is pure and the URL is not fetched, lists the tracking parameters that may be removed, describes normalization behavior, and gives pricing/free-tier details. This adds substantial operational context beyond readOnly, idempotent, and non-destructive hints.

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?

The definition is front-loaded and dense, with no obvious filler. The first sentence is long because it enumerates returned fields, but that complexity is relevant to the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, but the description enumerates the important returned fields and the normalized copy behavior. For a parsing utility with two simple parameters, this is sufficiently complete; only invalid-URL behavior is left unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the parameters are already documented. The description still adds meaning to strip_tracking by naming tracking parameters removed and explaining the normalized-output behavior.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: it parses a URL into named components and returns a normalized copy. It also distinguishes the operation from fetching by saying 'the URL is not fetched,' which is useful next to web_url_check.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

It gives clear usage contexts: dedupe links, clean shared URLs, and read query values. It does not explicitly name alternatives or when-not-to-use cases, but the contexts are enough for an agent to infer likely selection.

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