Skip to main content
Glama

unicode-safety-gate

Adversarial Unicode & Trojan Source gatekeeper — Scans a public GitHub repo, a pull request, a unified diff or a list of files for adversarial Unicode with the 19 rules (USC001-USC019) of dcondrey/unicode-safety-check: bidi controls (Trojan Source), invisible and default-ignorable characters, variation-selector and tag-character payloads (Glassworm), private-use code points, homoglyph and mixed-script identifiers, confusable collisions, misplace

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "unicode-safety-gate"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoBranch, tag or commit for repo; defaults to the default branch.
diffNoUnified diff (git diff output). Only added lines are scanned; findings carry new-file line numbers.
repoNoAlternative to files and diff: a public GitHub repository, owner/repo or https://github.com/owner/repo[/tree/ref]. Read from its source archive; files are scanned shallowest first up to the character cap and the rest are listed as skipped.
filesNoFiles to scan in full. Provide exactly one of files, diff, repo or prUrl; total content is capped at 1000000 characters.
prUrlNoAlternative to files and diff: a public GitHub pull request, commit or compare URL. Only added lines are scanned.
scanExcludedNoAlso scan paths the upstream scanner skips (node_modules/, vendor/, dist/, build/, .lock, .min.js, images, archives). Default false.
identifierPolicyNoDefault ascii-only: any non-ASCII identifier is flagged (USC019).
permittedScriptsNoUsed with permitted-scripts. Default Latin, Common, Inherited.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full behavioral burden: it usefully discloses the exact detection surface (which Unicode attack classes trigger findings) and the standard it conforms to, which is the kind of context structured fields cannot supply. However, it says nothing about that this is a read-only scan, that repo/PR modes require network fetches of source archives, any rate limits, what the response contains, or how findings are ranked — and the text is truncated mid-clause before completing the rule list.

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 correctly: the identity ('Adversarial Unicode & Trojan Source gatekeeper') and the verb/resource scope come first, with the rule enumeration as supporting detail. The long comma-separated attack-class list is dense but each item distinguishes a real detection category; the only real defect is that the sentence is cut off at 'misplace', leaving it visibly incomplete.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 8 parameters, four mutually exclusive input modes, and remote archive fetching, the description covers purpose and detection scope well but stops short of the operational picture: no output/finding shape (there is no output schema to fall back on), no note that large repos produce skipped-file listings, and no mention of the path-exclusion default that `scanExcluded` flips. The truncation further weakens an otherwise promising definition.

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% and the schema is unusually rich, documenting `ref`, `diff` added-line-only semantics, `repo` archive reading and shallowest-first skipping, `prUrl`, `scanExcluded`, `identifierPolicy` enum, and `permittedScripts` defaults. The description adds no parameter-level meaning beyond restating the input modes, so the 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 specific verb ('Scans') over four explicitly enumerated input resources (public GitHub repo, pull request, unified diff, file list) and names the exact rule set it enforces (19 rules USC001-USC019 of dcondrey/unicode-safety-check). The list of detected character classes (bidi controls/Trojan Source, invisible characters, tag payloads, homoglyphs, confusables) makes it unmistakable against siblings like diff-gatekeeper without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description enumerates the four accepted input modes, which implicitly tells an agent the tool can be pointed at a repo, PR, diff, or file list, and the schema adds the exclusivity constraint ('Provide exactly one of files, diff, repo or prUrl'). It never states when to prefer this over an adjacent gatekeeper such as diff-gatekeeper, nor any prerequisite or exclusion beyond the rule-set scope, so usage is implied rather than prescribed.

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