Skip to main content
Glama

Soulfield Lens — MCP-сервер

Внешняя валидация текста, сгенерированного ИИ, как инструмент MCP.

Каждый ИИ-инструмент спрашивает ту же модель, которая написала ответ, хорош ли он. Она отвечает «да». Soulfield Lens работает извне: отдельная модель прогоняет фиксированный гейт по вашему выводу. Она проверяет текст — но не пишет его. Этот пакет помещает этот гейт внутрь Claude Code, Cursor и любого другого MCP-совместимого агента, чтобы вывод можно было проверять на том пути, где он генерируется.

Гейт закрывается при ошибке: пограничный случай возвращает UNKNOWN, а не молчаливый пропуск. Здесь нет этапа генерации, поэтому он не может выдумывать собственные утверждения — только проверять. Он всё ещё может ошибаться в суждении; именно поэтому пограничные случаи возвращают UNKNOWN, а не уверенное «да».

Это тонкая stdio-обёртка вокруг размещённого Lens API (api.soulfield.one). Никакой локальной модели, никакого этапа сборки — один файл, две зависимости.

Он предоставляет два уровня. Уровень гейта (3 инструмента) требует только API-ключа. Уровень валидатора (6 инструментов) опционален и активируется только при наличии локально установленного CLI lens-kit — он выполняет детерминированные кросс-файловые проверки и память дефектов, которые однодокументный гейт не видит. Пропустите его — и уровень гейта работает как раньше.

Попробуйте перед установкой

Демо-эндпоинт без ключа запускает тот же гейт — несколько запусков в день на IP, без регистрации:

curl -s https://api.soulfield.one/v1/demo \
  -H 'content-type: application/json' \
  -d '{"text": "<paste the AI output you are about to ship>"}'

Related MCP server: Arkheia Hallucination Detection MCP

Установка

npm install -g @soulfield/lens-mcp

Или запустите без установки: npx @soulfield/lens-mcp.

Claude Code

claude mcp add soulfield-lens \
  -e SOULFIELD_API_BASE=https://api.soulfield.one \
  -e SOULFIELD_API_KEY=<your-key> \
  -- npx @soulfield/lens-mcp

Любой MCP-клиент (JSON-конфигурация)

{
  "mcpServers": {
    "soulfield-lens": {
      "command": "npx",
      "args": ["@soulfield/lens-mcp"],
      "env": {
        "SOULFIELD_API_BASE": "https://api.soulfield.one",
        "SOULFIELD_API_KEY": "<your-key>"
      }
    }
  }
}

Для продакшн-вызовов нужен API-ключ — запросите его по адресу hello@soulfield.one. lens_health работает без него.

Инструменты

Уровень гейта — размещённый API, работает из коробки

Инструмент

Что делает

Авторизация

validate_content

Запускает внешний гейт по тексту. Возвращает pass/fail, оценку, результаты по измерениям и детали нарушений с обоснованием. Опциональные domain (general, finance, marketing, legal, seo, agency) и context (аудитория/цель).

ключ

scrub_pii

Серверное сканирование на структурированные PII и секреты — email, телефонные номера UK/US, номера кредитных карт, SSN США, номера NI/UTR Великобритании, строки подключения к базам данных и распространённые паттерны API-ключей/учётных данных. Возвращает очищенный текст (каждое совпадение заменяется маркером типа) плюс находки. Основано на паттернах, без вызова LLM. Нацелено на структурированные идентификаторы — не обнаруживает личные имена или свободные PII, а покрытие структурированных форматов является best-effort, не исчерпывающим.

ключ

lens_health

Проверяет, что Lens API работает. Возвращает статус и версию.

нет

Уровень валидатора — опционально, требует локального CLI lens-kit

Примечание о версии: уровень валидатора появится в 1.1.0. Если npm view @soulfield/lens-mcp version всё ещё сообщает 1.0.0, реестр ещё не догнал этот репозиторий, и npx @soulfield/lens-mcp даст вам только три инструмента уровня гейта. Пока установите из исходников.

Побочный эффект, о котором стоит знать: каждый вызов уровня валидатора добавляет строку в RUNS.md в своей рабочей директории — это журнал запусков набора, так задумано. Директория — это аргумент cwd, или собственная cwd сервера, если вы его опускаете, поэтому передавайте cwd явно, если вам важно, где находится журнал. Чувствительные значения флагов редактируются в строке (--deny <redacted>), поэтому запрещённые термины не попадают на диск.

Предварительное условие: pip install lens_kit (Apache-2.0, github.com/mrhpython/lens-kit), или установите LENS_KIT_BIN на его путь. Без него эти шесть инструментов возвращают UNKNOWN с ошибкой — никогда не молчаливый пропуск. API-ключ не нужен: они работают локально и не вызывают LLM.

Почему они работают локально, а не на размещённом API: они принимают пути к файлам с вашего диска. Размещённый эндпоинт, принимающий произвольные локальные пути, был бы вектором раскрытия файлов, а не функцией. На stdio пути — это ваша собственная машина, поэтому возможность безопасна здесь и только здесь — и по этой причине она не будет добавлена в размещённый API.

Инструмент

Что делает

Семантика выхода

lens_consistency_leaks

Сканирует файлы на термины из списка запрещённых (без учёта регистра, литерально). Запускайте на каждом файле, предназначенном для клиентов, перед необратимой публикацией: ловит реальное имя клиента, внутренний кодовый нейм или запрещённый абсолют, выживший в опубликованном тексте. Сканер учётных данных этого не найдёт, потому что здесь нет ничего похожего на учётные данные. Слеп к отрицаниям: запрещённая фраза, процитированная для опровержения, совпадает так же, как и утверждаемая.

совпадение доказывает наличие строки — выносите вердикт

lens_consistency_numbers

Проверяет, что каждое числовое значение в сводке действительно встречается в тексте, который она резюмирует. Ловит выдуманную цифру. Предупреждение: только литеральное сопоставление, без производной арифметики, и цифра, указанная как заменённая («заменяет оценку ~471»), помечается так же, как устаревшая. Проверяйте, не доверяйте автоматически.

нарушение / чисто

lens_consistency_markers

Проверяет, что маркеры доказательств в источнике сохраняются в каждом отрендеренном выводе — оговорка или цитата, потерянная между форматами. Чувствительно к регистру, в отличие от leaks выше: TRIPWIRE не совпадёт с Tripwire и будет считаться потерянным, когда ничего не потеряно. Предупреждение: намеренная частичная отрисовка также занижает количество законных случаев.

нарушение / чисто

Выбор запрещённых терминов и маркеров. Эти три — сигнальные, а не оракулы — при живом запуске на собственной копии этого проекта они дали шесть флагов и ноль реальных дефектов, по трём различным классам ложных срабатываний (отрицание, заменённая цифра, регистр). Это задуманное поведение, и именно поэтому доктрина гласит: выносите вердикт, никогда не применяйте автоматически. Запрещённые термины лучше всего работают как строки, которые ошибочны в любом контексте — реальное имя клиента, внутренний кодовый нейм — а не как утверждения, которые вы не делаете и которые законно появляются внутри оговорок. Маркеры лучше всего работают, когда их регистр стабилен между источником и отрисовкой. | lens_catches_relevant | Читает банк дефектов перед валидацией: предыдущие именованные дефекты для типа артефакта, сначала наиболее частые. Паттерны на пороге помечаются [PROMOTE] — они повторяются достаточно часто, чтобы заслуживать фиксированной проверки. | — | | lens_catches_add | Записывает именованный дефект, чтобы он был пойман в следующий раз: что было не так, общий паттерн, правило на будущее. Обычные прохождения отклоняются по замыслу — только реальные дефекты. | — | | lens_catches_stats | Подсчёты повторяемости по паттернам с предложениями о продвижении. Говорит, что укрепить следующим. | — |

Два уровня дополняют друг друга, а не являются альтернативами. У гейта нет инструментов и нет доступа к файлам — именно это делает его независимой проверкой, и именно поэтому он не видит противоречие, разбросанное по двум файлам. Уровень валидатора видит диск; гейт владеет оценкой. Сочетайте их: собирайте доказательства на уровне подложки с помощью локальных инструментов, передавайте текст гейту и никогда не спорьте с FAIL гейта до PASS. Полный протокол: docs/VALIDATOR-AGENT.md.

Что вы получаете за каждый запуск: квитанции — что проверялось, что прошло, что было удержано и почему. Машиночитаемо, а не значок. Мы не дадим вам гарантированную цифру точности для ваших данных: оценки не переносятся между моделями, наборами данных и средами выполнения, а инструмент, обещающий фиксированную цифру на данных, которые он никогда не видел, делает именно то утверждение, для поимки которого существует этот гейт.

Длинные входные данные

Входные данные от ~4 000 символов и выше отправляются как асинхронное задание и автоматически опрашиваются до завершения, поэтому одна длинная валидация никогда не умирает из-за тайм-аута запроса. Короткие входные данные используют быстрый синхронный путь. Никакой настройки не требуется.

Конфигурация (переменные окружения)

Переменная

По умолчанию

Назначение

SOULFIELD_API_BASE

http://localhost:8002

Базовый URL Lens API. Используйте https://api.soulfield.one для размещённого сервиса или собственное развёртывание.

SOULFIELD_API_KEY

Требуется для validate_content и scrub_pii.

SOULFIELD_VALIDATE_TIMEOUT_MS

180000

Тайм-аут на запрос для синхронного пути.

SOULFIELD_VALIDATE_BUDGET_MS

600000

Общий бюджет настенного времени для цикла асинхронного опроса.

SOULFIELD_ASYNC_MIN_CHARS

4000

Длина входных данных, при которой активируется асинхронный путь.

LENS_KIT_BIN

lens-kit

Путь к CLI lens-kit для уровня валидатора. Нужен только если его нет в PATH.

LENS_KIT_TIMEOUT_MS

120000

Тайм-аут для команды уровня валидатора. При тайм-ауте вердикт — UNKNOWN, никогда не пропуск.

Остальная часть продукта

Эта обёртка — одна из нескольких поверхностей на том же движке:

  • Бесплатный аудит с одним результатомapi.soulfield.one/audit. Аудит и есть демо.

  • Подключите (SDK stop-hook и middleware) — api.soulfield.one/developers.

  • Владейте — набор: lenses, compiler, self-improve loop, validator agent, Apache-2.0. Обучайте его на собственных данных. Публичный репозиторий: github.com/mrhpython/lens-kit — склонируйте его, pip install -e ".[dev]", и набор тестов запускается офлайн без ключа. Установка также активирует указанный выше уровень валидатора.

Мы пропускаем наши собственные маркетинговые тексты через тот же фильтр, который предоставляет этот пакет.

Лицензия

MIT — см. LICENSE. (Продукт lens-kit лицензируется отдельно под Apache-2.0.)

Available Tools

9 tools
lens_catches_addRecord a Catch (append to defect memory)A

Append a NAMED DEFECT to the defect bank so it is caught next time. Record what was WRONG, the general pattern it is an instance of, and the forward rule that prevents it — doctrine REJECTS routine passes, so only log actual defects. Set self_catch=true when the defect was a failure of your own validation discipline. This is the write half of the improvement loop: enough recurrences of a pattern promote it to a deterministic check.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory to run in. catches.jsonl is read from and written to here. Defaults to the server's cwd.
ruleYesThe forward rule that prevents this next time
catchYesWhat was WRONG (the specific defect found)
domainYesDomain, e.g. marketing, finance, agency
patternYesThe general trap this is an instance of
self_catchNoTrue if this was a failure of the validator's own discipline
artifact_typeYesArtifact type, e.g. landing-copy, research-brief

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses that the operation appends to a defect bank, that routine passes are rejected, that self_catch has a specific meaning around validator discipline, and that repeated patterns can promote to deterministic checks. It does not state output/return behavior or error handling, but for an append operation the core side effect is clearly conveyed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences with no filler. The core action is front-loaded, policy guidance follows immediately, and the final sentence provides useful context about the improvement loop. Every sentence earns its place.

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

Completeness4/5

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

The description covers purpose, policy, self-catch semantics, and the improvement-loop context. It is missing only an explicit pointer to the read-half siblings and any description of what the agent should expect after a successful append, but given 100% schema coverage and the simplicity of the operation, the remaining gaps are minor.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds real semantic value beyond the schema by explaining that self_catch=true means a failure of the validator's own discipline and by connecting catch, pattern, and rule to the intended defect-recording workflow. It does not add much for artifact_type or domain, but those are already self-explanatory in the schema.

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?

The description opens with a specific verb and resource: 'Append a NAMED DEFECT to the defect bank so it is caught next time.' It clearly differentiates itself as the write half of the improvement loop, which distinguishes it from read-oriented siblings like lens_catches_relevant and lens_catches_stats.

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

Usage Guidelines4/5

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

The description gives clear usage context: use this when an actual defect is found, and explicitly warns not to log routine passes ('doctrine REJECTS routine passes'). It frames the tool as the write counterpart to the loop, but it does not explicitly name read alternatives or spell out conditions for when to use sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lens_catches_relevantPrior Catches (institutional defect memory)A

Read the defect bank BEFORE validating: prior named defects for an artifact type, most-recurrent patterns first. This is the institutional memory that makes the gate improve over time — the recurring traps tell you where this class of artifact has failed before. Any pattern at threshold is marked [PROMOTE], meaning it recurs often enough to deserve a deterministic check. Runs the local lens-kit CLI, no LLM call. Omit artifact_type and pass all=true when the type has no history yet.

ParametersJSON Schema
NameRequiredDescriptionDefault
allNoSurface every catch regardless of artifact type
cwdNoWorking directory to run in. catches.jsonl is read from and written to here. Defaults to the server's cwd.
domainNoAlso filter by domain, e.g. marketing, finance, agency
formatNoblock = paste-ready surface (default); json = raw records
thresholdNoRecurrence threshold for [PROMOTE] lines (default 3)
artifact_typeNoArtifact type to filter by, e.g. landing-copy, research-brief, content-pack

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and discloses meaningful traits: it 'Runs the local lens-kit CLI, no LLM call' (execution mechanism and cost), returns 'most-recurrent patterns first' (ordering behavior), and explains the [PROMOTE] marker semantics. Minor gap: the schema's cwd description says catches.jsonl is both read from and written to, while the description frames this as purely a read, leaving the write side-effect ambiguous.

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?

The purpose is front-loaded in the first sentence, and the remaining sentences each add distinct information: history rationale, PROMOTE semantics, execution mechanism, and the parameter workaround for the no-history case. The institutional-memory sentence is slightly rhetorical but reinforces why recurrence ordering matters, so no sentence is wasted.

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

Completeness4/5

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

With no output schema and no annotations, the description must carry the load, and it covers the core what (named defects), ordering, promotion marking, execution mode, and the special all=true case. The format parameter's schema descriptions ('block = paste-ready surface; json = raw records') partially compensate for the missing output schema, though the exact record shape is left unspecified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, and the description adds value on top: it explains the artifact_type/all interaction ('Omit artifact_type and pass all=true when the type has no history yet') and gives threshold meaning beyond the schema's terse wording by tying recurrence to deterministic checks. This pushes it clearly above baseline.

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?

The opening sentence names a specific verb and resource — 'Read the defect bank' — plus the scope ('prior named defects for an artifact type') and ordering ('most-recurrent patterns first'). This clearly differentiates it from siblings like lens_catches_add (write), lens_catches_stats (aggregate), and validate_content (validate), and the workflow position 'BEFORE validating' pins down its role.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool — 'Read the defect bank BEFORE validating' — and an explicit scenario: 'Omit artifact_type and pass all=true when the type has no history yet.' It stops short of naming sibling alternatives or stating when not to use it, so it has clear context without formal exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lens_catches_statsCatch Recurrence StatsA

Per-pattern recurrence counts across the defect bank. Any pattern at or above the threshold gets a PROMOTE-to-deterministic-check suggestion — that is the signal a recurring judgment call should become a cheap fixed check instead. Use this to decide what to harden next.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory to run in. catches.jsonl is read from and written to here. Defaults to the server's cwd.

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It explains the threshold-based PROMOTE suggestion behavior, which is useful, but it does not disclose side effects: the schema's cwd description mentions catches.jsonl is written to, yet the main description does not clarify whether this tool mutates state or only returns analysis.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place: the output concept, the threshold behavior with a clarifying explanation, and the intended decision use. The most important information is front-loaded and jargon is briefly unpacked.

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

Completeness4/5

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

For a single-parameter stats tool with no output schema, the description adequately conveys what output to expect and why it matters. It could be more complete by defining the threshold or explicitly stating side effects, but those are minor given the schema and the overall clarity.

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% for the single optional cwd parameter, and the schema already explains the working-directory semantics and the catches.jsonl read/write behavior. The tool description adds no parameter-specific meaning, but none is needed given the schema's completeness.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific resource (defect bank) and a specific computation (per-pattern recurrence counts), and explains the output's purpose: suggesting PROMOTE-to-deterministic-check for recurring patterns. It is clear even though it lacks an explicit verb like 'get' or 'list'.

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

Usage Guidelines4/5

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

The description explicitly says to use this tool to decide what to harden next, which gives the agent a clear decision context. It does not name alternative tools or state when not to use it, so it stops short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lens_consistency_leaksForbidden-String Leak ScanA

Scan customer-facing files for deny-list terms (CASE-INSENSITIVE literal match — note lens_consistency_markers is case-SENSITIVE, they differ). Deterministic, no LLM. Exit 6 on a hit. Run this on EVERY customer-facing file before any irreversible publish: it is the check that catches a real client name, an internal codename or a banned absolute surviving into shipped copy. A credential scanner will not find these, because nothing here is a credential. IMPORTANT — a hit proves the STRING IS PRESENT, which is authoritative; it does not by itself prove a violation, because the match is NEGATION-BLIND: a banned phrase quoted in order to disclaim it ('we will not give you a guaranteed accuracy number') looks identical to the same phrase asserted. Adjudicate before acting. Deny terms should therefore be strings that are wrong in EVERY context (a real client name, an internal codename), not claims-you-do-not-make — those belong in a lens prompt.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory to run in. catches.jsonl is read from and written to here. Defaults to the server's cwd.
denyNoExtra deny terms, added to the profile's consistency.deny
filesYesLocal file path(s) to scan
profileNoProfile YAML providing consistency.deny

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so exceptionally: it discloses determinism, no LLM involvement, exit code 6 on hit, literal case-insensitive matching, and the important negation-blind limitation requiring adjudication before acting. This goes far beyond the schema and gives an agent realistic expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and key matching semantics, then adds usage context, a critical limitation, and actionable guidance. Every sentence carries meaningful information, and the structure makes the important caveat prominent rather than burying it.

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

Completeness5/5

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

Despite having no annotations and no output schema, the description provides enough context for an agent to call this tool appropriately: when to run it, what it catches, how it behaves, how to interpret results, and how it differs from related tools. The only minor omission is the explicit success-code behavior, but 'Exit 6 on a hit' is sufficient to signal contract expectations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds useful semantic context beyond the schema by explaining what kinds of deny terms are appropriate ('strings that are wrong in EVERY context'), what files should be scanned (customer-facing), and how a hit should be interpreted. This exceeds the schema-only baseline.

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?

The description opens with a specific verb and resource: 'Scan customer-facing files for deny-list terms (CASE-INSENSITIVE literal match...).' It also explicitly differentiates itself from the sibling lens_consistency_markers by contrasting case-sensitivity, so an agent can distinguish this tool without opening schemas.

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

Usage Guidelines5/5

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

The description gives an explicit invocation rule: 'Run this on EVERY customer-facing file before any irreversible publish.' It also states what alternatives do not cover ('A credential scanner will not find these') and provides negative guidance by explaining that claims-you-do-not-make belong in a lens prompt rather than in the deny list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lens_consistency_markersMarker Parity (source vs rendered)A

Check that evidence markers counted in a source artifact survive into every rendered output. Deterministic, no LLM, exit 6 on a violation. Catches the caveat, citation or hedge that gets dropped between formats — the source says 'as-of 2026-04' and the rendered deck quietly does not. Matching is CASE-SENSITIVE (unlike lens_consistency_leaks, which is case-insensitive), so pick markers whose casing is stable across source and render: 'TRIPWIRE' in the source will NOT match 'Tripwire' in the render and will read as dropped when nothing was. TRIPWIRE: a deliberate subset render also under-counts legitimately. Before treating a hit as a removed caveat, grep the rendered file case-insensitively.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory to run in. catches.jsonl is read from and written to here. Defaults to the server's cwd.
sourceYesThe source artifact (authoritative marker counts)
markersNoExplicit marker strings (otherwise taken from the profile)
profileNoProfile YAML providing the marker set
renderedYesRendered output file(s) to check against the source

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries full behavioral burden and meets it: deterministic, no LLM, exit 6 on violation, case-sensitive matching, and two false-positive traps (case mismatch and deliberate subset rendering). The concrete TRIPWIRE example makes the matching behavior unambiguous.

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?

Core purpose is front-loaded and the paragraph stays dense with useful caveats. The 'TRIPWIRE:' sentence is cryptic and slightly interrupts the flow, preventing a 5.

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

Completeness4/5

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

For a 5-parameter tool with no annotations or output schema, it covers the main behavior, exit status, matching mode, and practical verification steps. It does not state the success exit condition or the full return/result shape, and it leaves profile/marker interplay to the schema, but the description is otherwise complete enough to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers all 5 parameters, so baseline is 3. The description adds value beyond the schema by instructing users to choose markers with stable casing and by warning that a deliberate subset render legitimately under-counts, which directly informs how markers, source, and rendered should be used.

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?

The first sentence names a specific verb and resource: check that source artifact markers survive into every rendered output. The title and examples further establish it as a parity/consistency verifier, and the explicit case-sensitivity contrast with lens_consistency_leaks sets it apart from siblings.

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

Usage Guidelines4/5

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

It gives clear operational context: use markers with stable casing, and verify doubtful hits case-insensitively before reporting. It names lens_consistency_leaks as the case-insensitive alternative, though it never explicitly says 'use this tool when...' or lists exclusion conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lens_consistency_numbersNumber Parity (summary vs body)A

Check that every numeric literal in a summary actually appears in the body it summarizes. Deterministic, no LLM, exit 6 on a violation. Catches the invented figure — the number a summary asserts that its source never stated. TRIPWIRE, not an oracle: literal matching only, no semantic or derived arithmetic, so a legitimately computed total will flag. Review a hit, do not auto-trust it.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory to run in. catches.jsonl is read from and written to here. Defaults to the server's cwd.
bodyYesThe body file the summary summarizes
summaryYesThe summary file (its numbers must appear in the body)

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden, and it delivers: it discloses deterministic matching, no LLM usage, exit code 6 on violation, literal-only matching with no semantic or derived arithmetic, and the caveat that legitimately computed totals will flag. This gives the agent an unusually complete picture of the tool's behavior and limitations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded, starting with the core check, then adding determinism, exit behavior, purpose, limitation, and a review caution. Every sentence adds distinct information, and there is no filler.

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

Completeness5/5

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

The description is complete for a tool with no annotations and no output schema: it covers what is checked, how it behaves, what exit code signals a violation, what its limitations are, and how the agent should handle results. The schema covers parameter details and the catches.jsonl side effect, so nothing critical is missing.

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%, so the schema already documents the summary, body, and cwd parameters well. The tool description reinforces the relationship between summary and body numbers but does not add parameter-level detail beyond what the schema provides.

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?

The description names a specific verb and resource: check that every numeric literal in a summary appears in the body it summarizes. It clearly distinguishes the tool from siblings by focusing on numeric literal parity with deterministic behavior and exit 6 on violation.

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

Usage Guidelines4/5

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

The description provides clear operational context: it is deterministic, uses no LLM, and is a tripwire rather than an oracle. It explains when the result may be a false positive and tells the agent to review hits, though it does not explicitly compare against sibling tools or state when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lens_healthLens API Health CheckA

Check if the Soulfield Lens API service is running and responsive. Returns status and version. No auth required.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

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

There are no annotations, so the description fully carries the burden of disclosure. It states that no auth is required and that it returns status and version, and the verb 'check' clearly implies a non-mutating read-only operation. It could additionally mention timeouts or error behavior, but for a simple health check the provided transparency is solid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three short sentences, each carrying distinct value: what the tool does, what it returns, and its authentication requirement. No extraneous words or repetition.

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

Completeness5/5

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

For a zero-parameter health-check tool with no output schema, the description covers all essentials: purpose, return content (status and version), and auth. There are no missing details that would prevent an agent from invoking it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema is trivially 100% covered. With no parameters to document, the description does not need to provide additional semantics, so the baseline score of 4 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?

The description clearly states a specific verb ('Check if') and a specific resource ('the Soulfield Lens API service'), and tells what it returns. This distinguishes it sharply from all sibling tools, which deal with content validation, PII scrubbing, or lens consistency.

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

Usage Guidelines4/5

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

The tool's purpose is self-evident as a health check, so the context for use is clear: verify that the Soulfield Lens API is up and responsive. It does not explicitly discuss alternatives or exclusions, but there are no similar sibling tools that could be confused with this one.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scrub_piiScrub PIIA

Scan text for structured PII and secrets (emails, UK/US phone numbers, credit-card numbers, US SSNs, UK NI/UTR numbers, database connection strings, and common API-key/credential patterns) via the hosted Lens API. Returns scrubbed text with each match replaced by a generic [REDACTED] marker (the finding TYPE — email, phone_uk, ni_number, etc. — appears only in the findings list, not in the replacement), plus that findings list. It scrubs structured identifiers only: personal NAMES survive, so scrubbed output is not anonymized. Pattern-based server-side scan, no LLM call. Targets structured identifiers — it does not detect personal names or free-form PII, and coverage of structured formats is best-effort, not exhaustive. Requires SOULFIELD_API_KEY.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe text to scan for PII

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries full burden and succeeds: it discloses that replacement markers are generic [REDACTED], that finding types are only in the findings list, that names survive, that the scan is pattern-based server-side with no LLM call, that coverage is best-effort, and that SOULFIELD_API_KEY is required. This is unusually transparent behavioral disclosure.

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?

The description is dense and front-loaded, with the core scan behavior stated first and critical caveats (names survive, best-effort, API key) following. There is minor redundancy between 'scrubs structured identifiers only' and 'targets structured identifiers', which prevents a perfect score.

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

Completeness4/5

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

For a one-parameter tool with no output schema, the description is nearly complete: it covers input, output behavior, limitations, auth requirement, and execution model. It lacks precise structure for the findings list, but that does not hinder selection or invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds meaning beyond the schema's generic 'The text to scan for PII' by specifying which structured categories the text parameter is scanned for and clarifying that names/free-form PII will not be matched. This modestly exceeds the baseline.

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?

The description states a specific verb ('Scan'), a specific resource ('text' via 'hosted Lens API'), and the exact class of objects detected (structured PII and secrets). It clearly differentiates itself from the validation/consistency-focused sibling tools by emphasizing scrubbed output with [REDACTED] markers and a findings list.

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

Usage Guidelines4/5

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

The description gives clear context for when the tool is appropriate: structured identifiers and secrets, not personal names or free-form PII. It explicitly excludes use cases where names must be removed and warns coverage is best-effort. It does not name alternative tools, but no direct scrubbing alternative appears among the siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

validate_contentValidate ContentA

Run the 10-lens validation gate on AI-generated content. Returns pass/fail, per-lens results, violation details, and a deterministic 0-10 score derived from violation counts (10 = clean, floors at 0; computed by the API tier layer, not by the LLM — the LLM-emitted 0-100 score was removed 2026-07-30). Requires SOULFIELD_API_KEY. Supports domains: general, finance, marketing, legal, seo, agency. WIRE CONTRACT (since 2026-08-10): each lens carries status (ran|skipped|error) and passed is null whenever no verdict was produced — parse passed===false as the violation signal, never !passed. HALT SEMANTICS: Rights runs first and halts the run on a critical violation; in a halted response downstream judged lenses read passed:null/status:skipped (unknown, not clean — consciousScan is non-blocking and keeps passed:true, its status:skipped is the never-ran signal).

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesThe AI-generated content to validate
domainNoDomain context for validation (default: general)
contextNoAudience/purpose context for Relevance lens (Lens 9). Omit to skip Relevance silently.

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses the deterministic score semantics (10 = clean, floors at 0, computed by the API tier not the LLM), the precise wire contract (passed===false as the violation signal, never !passed), and halt semantics for Rights and consciousScan. This is far more transparent than a generic 'validates content' statement.

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?

The description is a dense paragraph covering purpose, outputs, score computation, authentication, domains, wire contract, and halt semantics — every sentence carries essential information and the core action is front-loaded. However, the contract and halt rules are packed into long sentences without visual structure like bullets, making it slightly harder to parse than necessary.

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

Completeness5/5

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

This tool has no output schema and no annotations, so the description must explain return values and edge cases; it does. It covers pass/fail, per-lens results, violations, the 0-10 score, API key requirement, supported domains, the status/passed wire contract, and halt semantics. Nothing an agent needs for correct invocation and result interpretation is missing.

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%, so the baseline is 3. The description's domain list mirrors the schema enum exactly and adds no new parameter meaning. The 'context' parameter semantics come from the schema description (Relevance lens, Lens 9), not from the tool description. Thus the description adds no value beyond the schema for parameters.

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?

The description uses a specific verb and resource: 'Run the 10-lens validation gate on AI-generated content.' It clearly states what the tool does and lists its outputs (pass/fail, per-lens results, violation details, 0-10 score). The '10-lens' framing distinguishes it from sibling single-lens tools like lens_catches_relevant, even though no sibling is explicitly named.

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 gives prerequisites (requires SOULFIELD_API_KEY) and supported domains, which helps an agent know when it can be used. However, it never explicitly tells an agent when to choose this aggregate validation gate over a sibling single-lens tool, nor does it state exclusions. Usage must be inferred from the '10-lens validation gate' framing rather than being directly guided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 9 tool updatesv1.1.1
    • First observedlens_catches_add
    • First observedlens_catches_relevant
    • First observedlens_catches_stats
    • First observedlens_consistency_leaks
    • First observedlens_consistency_markers
    • First observedlens_consistency_numbers
    • First observedlens_health
    • First observedscrub_pii
    • First observedvalidate_content

TDQS

A4.1/5.0
Disambiguation4/5

Each tool has a distinct function: main validation, PII scrubbing, health check, three deterministic consistency checks, and defect-bank operations. The main confusion risk is lens_consistency_leaks vs lens_consistency_markers, which sound alike but are clearly separated by case-sensitivity and purpose.

Naming Consistency3/5

The set mixes verb-initial names like validate_content and scrub_pii with a lens_-prefixed family like lens_consistency_* and lens_catches_*. Within the lens_ families naming is consistent, but the overall convention is not uniform enough for a single predictable pattern.

Tool Count5/5

Nine tools is well-scoped for a validation-focused server covering gate validation, PII scrubbing, consistency checks, health, and defect-bank memory. Each tool has a clear role and none feels redundant or extraneous.

Completeness4/5

Core workflows are covered: validate content, scrub PII, run deterministic consistency checks, check service health, and read/add to the defect bank. Minor gaps include no update/delete for defect-bank entries and no tool to manage the deny-list used by lens_consistency_leaks, but these are workable limitations.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mrhpython/lens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server