Skip to main content
Glama

Validate and normalize a URL

validate_url
Read-onlyIdempotent

Checks that a URL is well-formed, normalizes it (lowercase host, punycode, default ports removed, spaces encoded) and splits it into parts including each query parameter. Flags common problems such as missing scheme, private/localhost addresses and credentials embedded in the URL. Does not fetch the URL.

Input Schema

NameRequiredDescriptionDefault
urlYes
require_httpsNoTreat http:// as invalid. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorldHint=false). The description adds real behavioral detail beyond that: the exact normalization rules (lowercase host, punycode, default port removal, space encoding) and the classes of problems flagged. It stops short of saying how invalid input is surfaced (exception vs. returned error list).

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 dense sentences, front-loaded with the core verb, with the parenthetical normalization list kept tight and the fetch exclusion placed last. No filler.

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?

With no output schema, the description partially carries the return burden by listing normalization output and split parts, including query parameters. It is missing how validation failures are reported (valid flag vs. thrown error vs. problem list), which is the main residual gap for a validator.

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 50%: require_https is documented in the schema, but the required url parameter carries only a maxLength with no description. The description's mention of 'missing scheme' and credentials relates loosely to the semantics but adds no format/syntax guidance for the url argument beyond what the name implies. Baseline 3 fits when the schema does most of the lifting.

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?

States a specific verb (checks/validates), the resource (URL), and enumerates the actual work performed: normalization steps, splitting into parts, and flagging problems. An agent can distinguish this from validate_email/validate_iban/validate_phone purely from the resource named.

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?

Provides a clear scope boundary with 'Does not fetch the URL,' which tells the agent this is offline validation and not a network retrieval tool. However, it never names an alternative tool or states when to prefer this over sibling validators beyond the obvious resource difference.

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