Skip to main content
Glama

Duo Data Utilities

IDNA2008 / punycode conversion and domain-label validation

code_idn
Read-onlyIdempotent

Convert internationalised domain names between Unicode and ASCII punycode in either direction, label by label, and validate each label against IDNA2008: length, leading and trailing hyphens, the hyphen-hyphen rule at positions 3 and 4, disallowed code points and bidirectional rules. Returns both forms, the per-label breakdown and the first rule violated. Strict mode is IDNA2008 (UTS 46 non-transitional); it may reject names /v1/code/url displays. Price: $0.05 per successful call, paid over x402 (USDC on Base).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoascii, unicode or both (default). Accepted: ascii, unicode, both.
domainYesDomain name in Unicode or punycode form. Accepted: at most 512 characters.
strictNotrue (default) applies IDNA2008 strictly; false uses UTS 46 transitional (IDNA2003-compatible) processing, which maps e.g. ß to ss; current browsers and /v1/code/url use non-transitional processing, so its output can differ from them. Accepted: true or 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 cover safety (readOnly, idempotent, closed-world), and the description adds genuinely useful traits beyond them: the return payload (both forms, per-label breakdown, first rule violated) and an important cost/auth trait ($0.05 per successful call paid over x402 in USDC on Base). It doesn't discuss failure modes for malformed input or latency beyond the 'first rule violated' hint.

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?

Purpose is front-loaded in the first clause, followed by validation detail and then payment terms. The middle sentence enumerates many rules in a dense run-on, but every listed rule (length, hyphen positions, bidi) earns its place for a validator.

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 correctly fills the gap by describing the return shape (both forms, per-label breakdown, first rule violated). It also covers the non-obvious invocation requirement (paid x402 call) and the semantics of strict mode, leaving nothing an agent needs to call it correctly unstated.

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 all three parameters (domain, to, strict) are already documented in the schema, including enum values and the ß→ss mapping nuance. The description's mention of direction ('either direction', 'label by label') adds only marginal meaning over the schema, so baseline 3 applies.

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 precise verb+resource ('Convert internationalised domain names between Unicode and ASCII punycode'), plus the validation scope (IDNA2008 label rules) and direction control. It also distinguishes itself from the sibling code_url by noting that strict IDNA2008 'may reject names /v1/code/url displays'.

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?

Gives a clear contextual signal for the strict parameter (non-transitional IDNA2008 vs. IDNA2003-compatible UTS 46, and how browsers/code_url differ), which effectively tells the agent when output will diverge from other tooling. It stops short of explicit when-not-to-use guidance or naming an alternative tool for a specific task.

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