URL safe name check
url-safe-name-check · version 1.0.0 · Text · free, no key needed
Check whether a name is a non-dot RFC 3986 unreserved ASCII URL path segment and return a reason.
Use when you need to: check URL-safe name · validate unreserved path segment · is this slug URL safe.
Decide before calling
Read the versioned contract and the supported scope below. Reuse url-safe-name-check@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use url-safe-name-check@1.0.0 for check URL-safe name. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- check URL-safe name
- validate unreserved path segment
- is this slug URL safe
- check RFC 3986 name
- validate portable URL name
- detect unsafe URL characters
Not supported
- percent-encode a URL
- validate a complete URL
- validate a URL
- generate a slug from prose
Behavior
- This is an explicit portable-name profile, not a universal slug convention: only RFC 3986 unreserved ASCII ALPHA, DIGIT, hyphen, period, underscore, and tilde are accepted.
- The empty string is invalid, and the complete names "." and ".." are invalid dot segments under RFC 3986 path processing.
- Well-typed names failing the profile return valid false with a stable reason; malformed inputs and declared-limit violations throw.
Input
name(string, required): min length 0; max length 255
Output
valid(boolean, required)reason(one of null, "empty", "dot_segment", "not_unreserved", required)
Limits
- max name bytes: 255
Example
Request input:
{
"name": "release_1.0~beta"
}
Response:
{
"result": {
"valid": true,
"reason": null
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "url-safe-name-check",
"version": "1.0.0",
"input": {
"name": "release_1.0~beta"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/url-safe-name-check/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"name":"release_1.0~beta"}'
The machine-readable contract is at /v1/tools/url-safe-name-check/versions/1.0.0.
CLI
node cli.mjs run url-safe-name-check 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Citation anchor check: Check a quote anchor (exact text plus prefix/suffix) matches exactly one place in a supplied source version.
- Citation passage check: Check that a cited start/end span of a supplied source version reads exactly as the quoted passage.
- Text slugify: Create a deterministic ASCII or Unicode slug using an explicit, documented normalization profile.
- Bleu brevity penalty: Compute the BLEU corpus brevity penalty from candidate and reference lengths using closest reference lengths.
- Citation batch check: Check an ordered batch of citations (span+quote or quote anchors) against supplied sources; returns the first failure.
- Text control characters find: Find non-whitespace control characters in a text string.