Skip to main content
Glama

Agent Data Tools: Utilities

Parse a URL

url_parse

Split a URL into protocol, host, port, path, query parameters (as an object), hash and origin, and report whether the host is an IP address. Use to read query parameters or check a link's host. Example: url=https://example.com:8080/a/b?x=1&y=2#top. Price $0.003/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only; not marked read-only because each call is charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to parse

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?

Goes well beyond the annotations by disclosing pricing ($0.003/call), the payment paths (x402 USDC or card key), the first-25-free allowance, and that failed calls are not charged. It also pre-empts the most confusing annotation by explaining that readOnlyHint=false is due to per-call billing rather than any mutation, which is exactly the kind of context an agent needs.

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?

Front-loaded with the operation, then usage, then an example, then billing. Every sentence earns its place, though the pricing clause is dense and could be tightened slightly without losing meaning.

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, yet the description effectively enumerates the return fields and calls out the boolean IP-detection result, so an agent knows exactly what it will receive. Billing behavior and error-cost behavior are also covered, leaving nothing material unspecified for a single-parameter tool.

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% for the single 'url' parameter, so the schema already carries the semantics and the baseline is 3. The description's inline example (url=https://example.com:8080/a/b?x=1&y=2#top) adds mild value by showing an accepted format, but no additional constraints or edge cases.

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 (split/parse) and enumerates the exact output parts: protocol, host, port, path, query object, hash, origin, plus an IP check. It is immediately distinguishable from url_encode/url_decode siblings, which transform rather than decompose a URL.

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?

"Use to read query parameters or check a link's host" gives clear usage context, and the worked example removes ambiguity about input format. It stops short of naming alternatives or stating when not to use it (e.g., for encoding/decoding, use url_encode/url_decode).

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.