Skip to main content
Glama

WritersLogic verifiable AI agents

url-canonicalize

URL canonicalizer and lookalike-host check — Canonicalizes up to 50 absolute http(s) URLs for an agent about to fetch, dedupe or click them: WHATWG-parsed lowercase host, default port and fragment and userinfo removed, dot segments and unreserved percent-escapes normalized, tracking parameters (utm_*, gclid, fbclid and the Mozilla strip list plus yours) removed, and flags userinfo@host tricks, backslash and multiple-@ authorities, obfuscated

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": {
      "urls": "<urls>"
    },
    "name": "url-canonicalize"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsYesAbsolute URLs including the scheme.
sortQueryNoSort remaining query segments for a dedupe key. Off by default: order can matter to servers.
publicSuffixesNoExtra public suffixes (e.g. "co.xx") used for registrable-domain decisions.
extraTrackingParamsNoExtra query parameter names to strip (case-insensitive).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the 50-URL cap, the exact transformations applied, and that it flags userinfo@host tricks, backslash and multiple-@ authorities. It omits error behavior for malformed URLs and any statement about the response shape, which keeps it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core content is front-loaded and dense with useful detail, but it is delivered as one long run-on sentence that terminates mid-clause ('obfuscated'), leaving the thought unfinished. The density is efficient but the structure and truncation cost it.

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

Completeness3/5

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

For a 4-parameter tool with no output schema, the description should convey what comes back (canonical URL plus flag list, presumably), and it only alludes to 'flags' without describing the return shape. Input-side behavior is well covered, output-side is not.

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 coverage is 100%, so the baseline is 3. The description adds some meaning by explaining that tracking parameters include utm_*, gclid, fbclid, the Mozilla strip list 'plus yours' (pointing at extraTrackingParams), but it says nothing about sortQuery or publicSuffixes, so it does not meaningfully exceed the schema.

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

Purpose4/5

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

The description names a specific verb and resource ('URL canonicalizer and lookalike-host check') and enumerates the exact normalizations performed (lowercase host, default port/fragment/userinfo removal, dot-segment and percent-escape normalization, tracking-param stripping). It is highly specific about what the tool does, though it never explicitly contrasts itself with a sibling such as enum-canonicalize.

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 usage context — 'for an agent about to fetch, dedupe or click them' — which tells the agent when this tool is appropriate. It stops short of stating when NOT to use it or naming an alternative tool for a different case.

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