Idna context check
idna-context-check · version 1.0.0 · Numbers & math · free, no key needed
Report every IDNA2008 CONTEXTJ and CONTEXTO finding in one mapped label.
Use when you need to: check idna contextj and contexto · zero width non joiner joining context · catalan middle dot between l letters.
Decide before calling
Read the versioned contract and the supported scope below. Reuse idna-context-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 idna-context-check@1.0.0 for check idna contextj and contexto. 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 idna contextj and contexto
- zero width non joiner joining context
- catalan middle dot between l letters
- arabic indic digit set mixing
- katakana middle dot needs kana or han
- virama before zero width joiner
- בדיקת כללי הקשר בתווית
Not supported
- apply the bidi rule
- check hyphen position or NFC
- map uppercase letters to lowercase
Behavior
- RFC 5892 Appendix A only. Every CONTEXTJ and CONTEXTO code point is a finding, including those after the first failure.
- valid is true only when every finding passed. The first failing finding sets reason_index and cp. ZWNJ and ZWJ use reason contextj; every other rule uses contexto.
- ZWNJ passes after a virama (ccc 9) or between joining types (L or D) and (R or D), skipping transparent marks. ZWJ passes only after a virama.
- U+00B7 must sit between two U+006C. U+0375 must be followed by Script=Greek. U+05F3 and U+05F4 must follow Script=Hebrew. U+30FB needs another Hiragana, Katakana, or Han code point. Arabic-Indic digits and Extended Arabic-Indic digits must not both occur.
- A label with no contextual code point, including uppercase ASCII, is valid here. That does not mean idna-label-validate accepts it.
- Results are not a homograph, phishing, DNS, or authenticity verdict. No DNS query is performed.
Input
label(string, required): min length 1; max length 252
Output
valid(boolean, required)reason(one of null, "contextj", "contexto", required)reason_index(integer or null, required): min 0; max 251cp(integer or null, required): min 0; max 1114111findings(array of object, required): max items 252data_version(constant "idna2008-rfc5892-unicode-15.1.0", required)
Limits
- max label bytes: 252
- max output bytes: 32768
Example
Request input:
{
"label": "l·l"
}
Response:
{
"result": {
"valid": true,
"reason": null,
"reason_index": null,
"cp": null,
"findings": [
{
"index": 1,
"cp": 183,
"rule": "middle_dot",
"passed": true
}
],
"data_version": "idna2008-rfc5892-unicode-15.1.0"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "idna-context-check",
"version": "1.0.0",
"input": {
"label": "l·l"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/idna-context-check/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"label":"l·l"}'
The machine-readable contract is at /v1/tools/idna-context-check/versions/1.0.0.
CLI
node cli.mjs run idna-context-check 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Idna bidi check: Apply the RFC 5893 Bidi Rule to one label and name the first failing condition.
- Interval duration check: Check a claimed duration between two RFC 3339 instants as exact elapsed time or as a calendar duration.
- Shortest path certificate check: Check a claimed shortest s-t path and distance in a weighted digraph using a caller-supplied potential certificate.
- Unit factor check: Check a claimed conversion factor and offset between two unit expressions using caller-defined exact unit definitions
- Bipartite coloring check: Check a complete 0/1 coloring witness for graph bipartiteness and report the first certificate discrepancy.
- Chromatic certificate check: Check a claim chi(G) = k: a proper k-colouring plus a clique or bounded exhaustive proof; returns the first discrepancy.