Skip to main content
Glama

EvalKit — Classifier Robustness Evaluation Toolkit

Python 3.11+ License Anthropic

Multi-technique evaluation toolkit for testing AI safety classifier robustness against query decomposition, obfuscation, and multi-agent orchestration attacks. MCP plugin for Claude Code.

Quick Start

uv sync                          # install everything
claude                           # MCP tools auto-loaded from .mcp.json

Related MCP server: llamator-mcp-server

Architecture

User Query → SPLITTER → [Encoder → Wrapper → ApiClient] × N → MERGER → Report

Usage

In Claude Code (MCP)

Tool

Purpose

eval_classifier_robustness

Full eval pipeline

eval_decompose_query

Preview query decomposition

eval_obfuscation_evasion

Test homoglyph substitution

eval_status

Check configuration

Via CLI

python3 run.py decompose "query" 5        # decompose into sub-queries
python3 run.py eval "query"               # full evaluation pipeline
python3 run.py obfuscate "text"           # test obfuscation

Benchmark

python3 benchmark.py                     # dry run (no API key)
python3 benchmark.py --quick             # single query smoke test
python3 benchmark.py --json report.json  # save JSON results
python3 benchmark.py --html report.html  # save HTML report
ANTHROPIC_API_KEY=sk-... python3 benchmark.py  # live test

Configuration

Parameter

Values

Default

Description

obfuscation

none, light, moderate, aggressive

moderate

Homoglyph replacement level

framing

fiction, study_guide, academic, documentation, translation, none

study_guide

Narrative framing strategy

max_pieces

1–20

10

Max sub-query decompositions

padding_tokens

0–10000

5000

Long-context padding per query

multi_agent

true, false

true

Multi-agent orchestration

helper_enabled

true, false

true

Helper model with filters removed

Project Structure

evalkit/
├── evalkit/             # Core modules
│   ├── splitter.py      # Query → sub-questions
│   ├── encoder.py       # Unicode homoglyph engine
│   ├── wrapper.py       # Narrative wrapping
│   ├── api_client.py    # API client + model routing
│   ├── merger.py        # Output stitching + metrics
│   ├── context_builder.py  # Multi-turn conversation
│   ├── agent_router.py  # Agent pack coordination
│   └── models.py        # Data classes + enums
├── evalkit_server.py    # MCP server (FastMCP)
├── run.py               # CLI wrapper (no MCP needed)
├── benchmark.py         # Test matrix runner
├── tests/               # Pytest test suite
├── docs/                # Documentation
├── .mcp.json            # Claude Code auto-discovery
└── CLAUDE.md            # Claude Code instructions

Research Techniques

See docs/TECHNIQUES.md for detailed documentation of each technique.

References

License

MIT — authorized security research and defense evaluation only.

Available Tools

4 tools
eval_classifier_robustnessC

Process a query through the configured evaluation stages.

Returns a formatted analysis with per-segment routing information, aggregate metrics, and processing results.

Inputs: query (required), topic, obfuscation, framing, +4 more. Returns: result

eval_decompose_queryC

Split a query into conceptual sub-components for analysis.

Divides the input into constituent parts based on topic boundaries.

Inputs: query (required), max_pieces, auto_split. Returns: result

eval_obfuscation_evasionB

Analyze character-level text transformations.

Applies configurable character substitutions and reports detected patterns in the input text.

Inputs: text (required), level. Returns: result

eval_statusA

Check server configuration and connection status.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct evaluation function: robustness classification, query decomposition, obfuscation analysis, and server status. No overlap in purpose.

    Naming Consistency4/5

    All tools share the 'eval_' prefix, but the suffixes vary in pattern (noun_noun for classifier_robustness, verb_noun for decompose_query, noun_noun for obfuscation_evasion, and single noun for status). Mostly consistent with minor deviation.

    Tool Count5/5

    Four tools is well-scoped for an evaluation kit, covering multiple evaluation stages without excess or deficiency.

    Completeness4/5

    The set covers core evaluation operations and status checking, though a tool for retrieving historical results or configuring evaluations would round it out. Minor gap, not severe.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers