Skip to main content
Glama

Normalize URL

url.normalize
Read-onlyIdempotent

Canonicalize messy URLs by lowercasing scheme and host, stripping fragments, and sorting query parameters before comparing or opening them.

Instructions

GET /v1/normalize-url — canonicalize a URL (scheme/host lowercased, fragment stripped, query sorted) before comparing or opening. Call before url.open when the URL is messy or duplicated. Analytics-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesURL to normalize. Example: 'HTTPS://Example.com/a?b=1#x'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.4

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds value by disclosing the exact canonicalization behavior (lowercasing, fragment stripping, query sorting) and the 'Analytics-only' nature, which goes beyond the annotations. It doesn't mention error behavior or edge cases, but for a read-only normalization tool, the disclosed behavior is sufficient.

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

Conciseness5/5

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

Two sentences with no filler. The core behavior is front-loaded, the usage guidance is explicit, and the 'Analytics-only' qualifier is a useful final note. Every sentence earns its place.

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

Completeness4/5

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

For a single-parameter, read-only, idempotent tool with a 100% schema-covered parameter, the description is nearly complete. It explains what the tool does, when to use it, and its non-critical nature. The only minor gap is that it doesn't describe the return format, but since there is no output schema and the tool is simple, this is a small omission.

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 the schema already documents the single parameter 'q' with an example. The description adds context about what normalization does to the URL but doesn't add new parameter-level semantics beyond the schema. Baseline 3 is appropriate.

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 ('canonicalize') and resource ('a URL'), and enumerates the exact transformations (scheme/host lowercased, fragment stripped, query sorted). It also distinguishes itself from siblings by naming url.open and the condition for use ('when the URL is messy or duplicated').

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

Usage Guidelines5/5

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

The description explicitly says 'Call before url.open when the URL is messy or duplicated,' providing a clear when-to-use directive and naming the alternative. It also notes 'Analytics-only,' which signals a non-critical, observational use case. This is strong guidance for an agent deciding between tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.