Skip to content
IsoKron

No invisible Unicode tag or variation-selector characters

Unicode tag characters (U+E0000 to U+E007F) and supplementary variation selectors (U+E0100 to U+E01EF) do not render but models read them, so they are the standard way to hide instructions in tool metadata; both directories reject them.

Check sec-invisible-encoding · Poisoning and hidden text · default severity: blocking · rubric 2.1.0

What fails

Unicode tag characters (U+E0000 to U+E007F) and supplementary variation selectors (U+E0100 to U+E01EF) do not render, yet models read them. They are the standard way to smuggle hidden instructions into a description. The message shows the hidden text where it decodes to ASCII.

The rule

Contain hidden, obfuscated, or encoded instructions

Source: Anthropic connector pre-submission checklist

How to fix it

Remove the characters. "Copy fixed tool list" strips them.

  1. Strip the characters from every string in the tool list (the checker’s "Copy fixed tool list" does it).
  2. Find where they came from: copied text, a generated description, or a compromised dependency.
  3. Add a CI test so they cannot come back.

A CI test that fails when the pattern comes back, run against the saved tools/list answer:

TypeScript (node:test)

TypeScript test
// tools-list.test.mjs: run `node --test` after saving the answer with
// npx @modelcontextprotocol/inspector --cli <server> --method tools/list > tools.json
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { test } from 'node:test';

const answer = JSON.parse(readFileSync('tools.json', 'utf8'));
const tools = answer.tools ?? answer.result?.tools ?? answer;

// Every string and every key in a tool, with its path.
function* strings(value, path) {
  if (typeof value === 'string') yield [path, value];
  else if (value && typeof value === 'object')
    for (const [k, v] of Object.entries(value)) {
      yield [`${path}.${k} (key)`, k];
      yield* strings(v, `${path}.${k}`);
    }
}

const PATTERN = /[\u{E0000}-\u{E007F}\u{E0100}-\u{E01EF}]/u;

test('no invisible tag or variation-selector characters', () => {
  const hits = [];
  for (const tool of tools) for (const [path, text] of strings(tool, tool.name)) if (PATTERN.test(text)) hits.push(path);
  assert.deepEqual(hits, [], 'hidden Unicode tag or variation-selector characters in tool metadata');
});

Python (pytest)

Python test
# test_tools_list.py: run `pytest` after saving the answer with
# npx @modelcontextprotocol/inspector --cli <server> --method tools/list > tools.json
import json
import re

with open("tools.json", encoding="utf-8") as f:
    answer = json.load(f)
tools = answer.get("tools") or answer.get("result", {}).get("tools") if isinstance(answer, dict) else answer


def strings(value, path):
    """Every string and every key in a tool, with its path."""
    if isinstance(value, str):
        yield path, value
    elif isinstance(value, dict):
        for k, v in value.items():
            yield f"{path}.{k} (key)", k
            yield from strings(v, f"{path}.{k}")
    elif isinstance(value, list):
        for i, v in enumerate(value):
            yield from strings(v, f"{path}.{i}")


PATTERN = re.compile(r"[\U000E0000-\U000E007F\U000E0100-\U000E01EF]")


def test_no_invisible_tag_or_variation_selector_characters():
    hits = [path for tool in tools for path, text in strings(tool, tool["name"]) if PATTERN.search(text)]
    assert hits == [], "hidden Unicode tag or variation-selector characters in tool metadata"

Questions

How can text be invisible to people but not to models?

Tag characters map one-to-one onto ASCII but have no glyph. Renderers skip them; tokenizers keep them, so the model reads the hidden ASCII.

Can legitimate text contain them?

Rarely: emoji flag sequences for some regions use tag characters. Tool metadata has no reason to.

How this check is graded

It counts toward: Poisoning and hidden text, Anthropic connector directory, OpenAI plugin directory. See the rubric.

Last verified against Anthropic connector pre-submission checklist on 2026-11-18. The rule above is quoted in the source’s own words. This page as Markdown.

Check your tool list: paste your tools/list, nothing is sent anywhere