Skip to main content
Glama

Duo Data Utilities

URL parse, canonicalise, and registrable-domain (eTLD+1) extraction

code_url
Read-onlyIdempotent

Parse and canonicalise a URL, and extract its registrable domain using the Public Suffix List — the part an agent needs to decide whether two URLs belong to the same owner. Returns scheme, host, port, path, decoded query parameters and fragment, the public suffix, the registrable domain (eTLD+1), the subdomain, whether the suffix is an ICANN or a private entry, plus a canonical form with default port, dot-segments and percent-encoding normalised. unicode_host uses WHATWG/UTS 46 (non-strict). Price: $0.05 per successful call, paid over x402 (USDC on Base).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesAbsolute URL, or a bare hostname (https:// assumed). Accepted: an absolute URL, or a hostname.
baseNoBase URL to resolve url against as a relative reference. Accepted: an absolute URL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover readOnly/idempotent/openWorld; the description goes well beyond by disclosing the full returned field set, the canonicalisation rules applied (default port, dot-segments, percent-encoding), the non-strict WHATWG/UTS 46 handling of unicode_host, and the private-vs-ICANN suffix distinction. It even surfaces billing behavior ($0.05 per successful call via x402/USDC on Base), which annotations cannot express.

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?

It is front-loaded with the core action and outcome before the pricing tail, and every clause carries information. The return-field enumeration makes it a long single sentence, but no sentence is filler.

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?

With no output schema, the description compensates by enumerating exactly what is returned, and it covers input forms, canonicalisation semantics, and cost. An agent has everything needed to call it and interpret the result.

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

Parameters3/5

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

Schema description coverage is 100%, so both 'url' and 'base' are already documented in the schema and the baseline is 3. The description adds nothing about how relative resolution via 'base' interacts with canonicalisation, so it neither compensates nor detracts.

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 names a specific verb set (parse, canonicalise, extract registrable domain) and the exact resource (URL), and states the concrete outcome: scheme, host, port, path, query, suffix, eTLD+1, subdomain. No sibling tool in this list does anything comparable, so the agent can distinguish it immediately.

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 a clear motivating use case — 'the part an agent needs to decide whether two URLs belong to the same owner' — which tells the agent when this tool is the right one. It stops short of naming exclusions or alternative tools, but none of the siblings overlap, so the practical guidance is sufficient.

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