Skip to main content
Glama

redflag-mcp

MCP-сервер, предоставляющий доступ к знаниям о «красных флагах» AML в виде инструментов для запросов. Специалисты по комплаенсу задают вопросы на естественном языке; сервер возвращает релевантные, подтвержденные источниками «красные флаги» из локальной векторной базы данных.

Обзор

Три отдельных рабочих процесса:

  1. Извлечение (Extraction) — извлечение «красных флагов» AML из PDF-файлов или веб-страниц с помощью LLM и сохранение их в формате YAML.

  2. Загрузка (Ingestion) — создание эмбеддингов для YAML-файлов и их загрузка в локальную векторную базу данных.

  3. Запрос (Query) — MCP-сервер отвечает на семантические поисковые запросы к этой базе данных.


Related MCP server: Financial Intelligence MCP Server

Конвейер извлечения

scripts/extract.py берет нормативный документ (PDF-файл или URL), отправляет его текст в модель OpenAI и записывает структурированный YAML-файл в data/source/. Каждая извлеченная запись включает source_url, ссылающийся на исходный документ.

Предварительные требования

uv sync --extra dev
export OPENAI_API_KEY=sk-...

Массовое добавление PDF-файлов (рекомендуемый рабочий процесс)

Пошаговая инструкция:

  1. Добавьте исходный URL в red_flag_sources/pdflinks.txt — по одному URL на строку, в последовательном порядке. Строка 1 → ключ 001, строка 2 → 002 и т. д.

  2. Скачайте PDF и сохраните его в red_flag_sources/pdf/ под именем NNN_краткое_описательное_имя.pdf, где NNN соответствует позиции строки в pdflinks.txt.

  3. Пересоздайте реестр: uv run python scripts/build_sources_registry.py

  4. Запустите извлечение: uv run python scripts/extract.py --parallel

Ключевое ограничение: префикс NNN_ в имени файла должен совпадать с номером строки в pdflinks.txt. Строка 1 = 001_*.pdf, строка 2 = 002_*.pdf и т. д. Именно так экстрактор связывает каждый PDF с его публичным исходным URL.


PDF-файлы хранятся в red_flag_sources/pdf/ и должны иметь имя с серийным префиксом, дополненным нулями:

red_flag_sources/pdf/
  001_fincen_alert_russian_sanctions_evasion.pdf
  002_ffiec_bsa_aml_examination_manual.pdf
  003_fatf_guidance_virtual_assets.pdf

Каждый серийный номер соответствует публичному URL исходного документа. Поддерживайте это соответствие в red_flag_sources/pdflinks.txt — по одному URL на строку, в последовательном порядке:

# FinCEN Russian Sanctions Evasion Alert
https://fincen.gov/sites/default/files/2022-06/Alert%20FIN-2022-Alert001_508C.pdf

# FFIEC BSA/AML Examination Manual
https://bsaaml.ffiec.gov/manual

# FATF Guidance on Virtual Assets
https://www.fatf-gafi.org/...

Пустые строки и строки, начинающиеся с #, игнорируются. После редактирования pdflinks.txt пересоздайте sources.yaml:

uv run python scripts/build_sources_registry.py

Затем запустите пакетное извлечение:

uv run python scripts/extract.py --parallel

Извлекаются только новые (необработанные) PDF-файлы — ранее обработанные источники пропускаются автоматически.

Команды пакетного извлечения

# Sequential batch
uv run python scripts/extract.py

# Parallel batch (4 workers by default)
uv run python scripts/extract.py --parallel

# Parallel batch with custom worker count
uv run python scripts/extract.py --parallel 8

# Force re-extract everything
uv run python scripts/extract.py --force --parallel

# Process only PDFs in a serial range (e.g. 001 through 005)
uv run python scripts/extract.py --range 001-005

# Range + parallel
uv run python scripts/extract.py --range 001-005 --parallel

# Force re-extract a range
uv run python scripts/extract.py --force --range 001-005 --parallel

Примечание: --range применяется только к пронумерованным PDF-файлам. Веб-ссылки в Weblinks.md исключаются, когда активен диапазон.

Отдельный источник (ad hoc)

# Extract from a local PDF
uv run python scripts/extract.py red_flag_sources/pdf/001_fincen_alert.pdf

# Extract from a URL
uv run python scripts/extract.py https://example.com/regulatory-guidance

# Re-extract a source that was already processed
uv run python scripts/extract.py --force red_flag_sources/pdf/001_fincen_alert.pdf

Для отдельных PDF-файлов добавьте URL в pdflinks.txt и сначала запустите build_sources_registry.py, чтобы экстрактор мог заполнить source_url в выходных данных.

Что он делает

  1. Получает документ — скачивает веб-страницу (удаляет навигацию/футер/скрипты) или считывает текст из PDF через pdfplumber.

  2. Отправляет в OpenAI — запрашивает gpt-4o-mini (можно переопределить через OPENAI_EXTRACTION_MODEL) для извлечения каждого отдельного индикатора «красного флага» AML в виде структурированного JSON.

  3. Проверяет — каждый возвращенный флаг сверяется со схемой RedFlagSource; невалидные записи пропускаются с предупреждением.

  4. Записывает YAML — сохраняет в data/source/<slug>.yaml, по одной записи на «красный флаг».

  5. Обновляет манифест — записывает источник в data/source/.extracted_sources.yaml, чтобы предотвратить повторную обработку.

Схема выходных данных

Каждая запись в YAML-файле имеет следующие поля:

Поле

Тип

Обязательно

Описание

id

string

да

Уникальный идентификатор, например 001-fincen-alert-01

description

string

да

Самостоятельное описание индикатора «красного флага»

source_url

string

нет

Публичный URL исходного документа

product_types

list[string]

нет

Финансовые продукты, к которым это относится (например, depository, crypto, msb)

industry_types

list[string]

нет

Отрасли или секторы клиентов, к которым это относится (например, oil_and_gas, government_benefits)

customer_profiles

list[string]

нет

Типы клиентов, к которым это относится (например, small_business, charity_or_nonprofit)

geographic_footprints

list[string]

нет

Соответствующие географические регионы или коридоры (например, southwest_border, mexico)

regulatory_source

string

нет

Название исходного документа или органа (например, FinCEN Alert FIN-2022-Alert001)

risk_level

string

нет

high, medium или low

category

string

нет

Типология AML (например, structuring, sanctions_evasion, shell_company)

simulation_type

string

нет

Дополнительный код сложности симуляции (например, 1A, 2B)

Дедупликация

data/source/.extracted_sources.yaml отслеживает каждый обработанный источник по его каноническому пути или URL. Источники, уже имеющиеся в манифесте, пропускаются как в пакетном, так и в одиночном режиме. Используйте --force для принудительного повторного извлечения источника.


Загрузка (Ingestion)

После извлечения создайте эмбеддинги для YAML-файлов и загрузите их в векторную базу данных:

uv run python scripts/ingest.py

Для начального локального корпуса загрузите только три целевых файла:

uv run python scripts/ingest.py \
  data/source/001_federal_child_nutrition_fraud.yaml \
  data/source/002_oil_smuggling_cartels.yaml \
  data/source/003_bulk_cash_smuggling_repatriation.yaml

Это генерирует эмбеддинги с помощью nomic-embed-text-v1.5 и добавляет записи в LanceDB по адресу data/vectors/. Запустите загрузку перед подключением MCP-сервера к настольному клиенту; модель эмбеддингов скачивается при первом использовании и лучше кэшируется во время загрузки, чем при запуске сервера.

OPENAI_API_KEY является необязательным для загрузки. Если он установлен, загрузка может автоматически добавлять недостающие метаданные в производные записи LanceDB. Если он не установлен, загрузка сохраняет доступные метаданные YAML и оставляет пустые поля для расширенной консультации. Исходные YAML-файлы при загрузке не перезаписываются.


MCP-сервер

# Start server (stdio mode, for Claude Desktop / Claude Code)
uv run python -m redflag_mcp

# Start in MCP inspector
uv run mcp dev src/redflag_mcp/server.py

# Start as HTTP server (for OpenAI agents or other HTTP clients)
MCP_TRANSPORT=http MCP_HOST=0.0.0.0 MCP_PORT=8000 uv run python -m redflag_mcp

Сервер предоставляет три инструмента: search_red_flags, get_red_flag и list_filters. После загрузки он полностью работает в автономном режиме — ключи API во время запроса не требуются.

Использование из Codex

Для локальных потоков Codex предпочтительнее использовать stdio, чтобы Codex запускал MCP-сервер автоматически:

codex mcp add redflag-mcp -- zsh -lc 'cd /Users/learningmachine/Documents/Python-dev/redflag-mcp && HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 uv run python -m redflag_mcp'

Проверьте регистрацию:

codex mcp list
codex mcp get redflag-mcp

Затем запустите новый поток Codex и запросите сервер по имени, например:

Use the redflag-mcp MCP server. List the available AML red flag filters.

Если у вас уже запущен HTTP-сервер, вы можете зарегистрировать его:

codex mcp add redflag-mcp-http --url http://127.0.0.1:8000/mcp

Локальные проверки работоспособности

После загрузки трех целевых файлов проверьте инструменты с помощью:

list_filters
search_red_flags(query="federal child nutrition program sponsor receives reimbursements inconsistent with its profile", product_types=["depository"])
search_red_flags(query="southwest border oil company wires for waste oil or hazardous materials")
search_red_flags(query="bulk cash moved by armored car service to Mexico")
get_red_flag(red_flag_id="001_federal_child_nutrition_fraud-01")

Для расплывчатого запроса, такого как «на что мне следует обратить внимание в бизнес-счетах?», вызывающий агент должен сначала задать краткий уточняющий вопрос, охватывающий продукт/канал, отрасль, профиль клиента, географию и канал или объем транзакций. Для конкретного запроса он должен выполнять поиск напрямую.

Разработка

uv sync --extra dev              # Install dependencies
uv run pytest tests/             # Run tests
uv run ruff check src/           # Lint
uv run mypy src/                 # Type check

Available Tools

7 tools
classify_red_flag_requestA

Classify an AML red flag request before searching when the user asks which red flags apply to a product, customer, geography, industry, scenario, transaction pattern, or institution profile. Returns one route: needs_more_context, metadata_filter, filtered_relevance_search, or direct_relevance_search, plus the recommended next tool and arguments. Use it for ambiguous 'what red flags apply' requests; skip it when the user already gives specific metadata filters or a concrete scenario.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
categoryNo
subjectsNo
risk_levelNo
product_typesNo
industry_typesNo
industry_groupsNo
customer_profilesNo
geographic_footprintsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/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 burden. It states the tool returns one route and recommended next tool, but lacks details on side effects, authentication requirements, rate limits, or idempotency. The read-only nature is implied but not confirmed.

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?

Two tightly written sentences: first for purpose, second for usage guidance. No redundant or superfluous information. Highly efficient.

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?

Given 10 parameters, no schema coverage, and an output schema (not shown), the description provides purpose and usage but omits parameter semantics and behavioral nuances. It is moderately complete for a classification tool but leaves gaps.

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

Parameters2/5

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

Schema coverage is 0%; the description does not explain individual parameters beyond the general notion of query content. The many optional parameters (limit, category, subjects, etc.) are not described, forcing reliance on schema enums alone.

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 the tool's purpose: to classify ambiguous AML red flag requests and return a route with recommended next tool. It distinguishes from siblings by specifying when to use (ambiguous requests) and when to skip (specific filters or concrete scenario).

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?

Explicitly provides when-to-use and when-not-to-use guidelines: 'Use it for ambiguous requests; skip it when the user already gives specific metadata filters or a concrete scenario.' This is clear and actionable.

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

filter_red_flagsA

Return AML red flags for exact metadata criteria without ranked relevance search. Use this for exact metadata requests, broad investigative subjects, and broad industry groups, such as high-risk depository structuring red flags, FINTRAC human trafficking red flags with subjects, trade logistics red flags with industry_groups, or red flags from regulators in France. category is the primary record classification; subjects is a broader eligibility layer that catches cross-category flags; typology_family is a broader proceeds or typology grouping. For example, a human-trafficking-relevant darknet crypto flag can have category="virtual_currency" while matching subjects=["human_trafficking"]. Paginate with next_cursor whenever truncated is true; search_red_flags is ranked and limit-based, with no cursor. For country or jurisdiction requests, translate names to ISO-style regulator_jurisdiction codes before filtering: France -> FR, Singapore -> SG, Australia -> AU, United Kingdom/UK -> GB, United States/US -> US, and European Union/EU regulators -> EU. Prefer filter_red_flags(regulator_jurisdiction="FR") for requests like "red flags from regulators in France." regulator_jurisdiction describes issuer jurisdiction; geographic_footprints describes affected geography or typology geography. Use search_red_flags instead for open-ended relevance questions. Successful responses include table-ready display hints in display and a portable Markdown fallback in markdown_table; clients decide how to render them.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
cursorNo
detailNofull
categoryNo
subjectsNo
regulatorNo
source_idNo
risk_levelNo
source_urlNo
issued_afterNo
issued_beforeNo
product_typesNo
industry_typesNo
industry_groupsNo
typology_familyNo
customer_profilesNo
regulatory_sourceNo
transaction_patternsNo
geographic_footprintsNo
regulator_jurisdictionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.5/5.0
Behavior5/5

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

Without annotations, the description carries full burden. It explains that the tool performs exact matching, not ranked search; defines how category, subjects, and typology_family interact; provides country code translation rules; and notes pagination. It also mentions response includes display hints and markdown_table. This is thorough 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 relatively long but every sentence serves a purpose: purpose, usage, parameter explanations, pagination, country codes, alternative tool. It is well-structured and front-loaded with the core purpose. Slight wordiness in examples could be trimmed but overall effective.

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 20 parameters, 0% schema coverage, and no annotations, the description covers the most critical aspects (core parameters, pagination, output format). It assumes an output schema exists, which handles return values. While not exhaustive for every parameter, it provides enough context for correct usage of the tool's main features.

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?

Given 0% schema description coverage, the description must compensate. It explains key parameters (category, subjects, typology_family, regulator_jurisdiction, geographic_footprints) with examples and contrasts. However, many parameters (limit, cursor, detail, regulator, source_id, risk_level, etc.) are not mentioned, leaving gaps. It adds value for the most important ones but is not complete.

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 'Return AML red flags for exact metadata criteria without ranked relevance search,' clearly stating the verb ('Return'), resource ('AML red flags'), and distinguishing it from the sibling tool search_red_flags. It is specific and leaves no ambiguity about what the tool does.

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 explicitly provides usage scenarios ('Use this for exact metadata requests...') and gives concrete examples (e.g., 'high-risk depository structuring red flags'). It also states when to use the alternative tool ('Use search_red_flags instead for open-ended relevance questions') and covers pagination behavior with next_cursor. This is comprehensive guidance.

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

get_red_flagB

Return one AML red flag by id, including source and citation metadata.

ParametersJSON Schema
NameRequiredDescriptionDefault
red_flag_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.3/5.0
Behavior2/5

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

No annotations provided, so description carries full burden. It mentions returning source and citation metadata but does not disclose authentication needs, rate limits, or error behavior (e.g., missing ID).

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?

Single sentence, highly concise, no wasted words. Front-loaded with the core action.

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?

With output schema present, return values are covered. However, missing guidance on usage, potential errors, and what 'source and citation metadata' entails reduces completeness for a retrieval tool.

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

Parameters2/5

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

Schema coverage is 0%, so description must compensate. It only adds 'by id' but provides no format or constraints for the red_flag_id parameter, missing an opportunity to clarify value semantics.

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?

Description clearly states it returns a single AML red flag by ID, including source and citation metadata. It distinguishes from sibling tools like search_red_flags and filter_red_flags.

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?

No explicit when to use vs alternatives. The description implies use for fetching one specific flag by ID, but no guidance on not using it for multiple flags or which sibling to use instead.

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

get_sourceA

Return bounded detail for one source by source_id, including citations, aggregate metadata, related red flag IDs, and short snippets. Use get_red_flag when full text for one red flag is needed.

ParametersJSON Schema
NameRequiredDescriptionDefault
source_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

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

No annotations provided, so description carries the burden. Mentions 'bounded detail' but does not explain what 'bounded' means operationally. Does not explicitly state read-only behavior or side effects, though implied by 'return'.

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?

Two sentences, front-loaded with action and key details. No unnecessary words. Efficient and easy to parse.

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?

Given output schema exists, return values need not be fully described. Covers key output elements and sibling distinction. Lacks error handling or precondition notes, but acceptable for a simple retrieval tool.

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 has one parameter (source_id) with 0% coverage. Description references source_id but adds no further semantics (e.g., format, source, or how to obtain valid IDs). Adds minimal value beyond the parameter name.

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?

Clearly states the verb 'Return' and resource 'one source by source_id'. Lists included elements (citations, metadata, red flag IDs, snippets) and distinguishes from sibling get_red_flag.

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?

Explicitly directs when to use get_red_flag instead for full text, providing a clear alternative. Does not address other siblings or general when-not-to-use scenarios, but sufficient for the simple context.

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

list_filtersA

List available filter values for product_types, industry_types, industry_groups, customer_profiles, geographic_footprints, subjects, typology_family, transaction_patterns, category, risk_level, regulator, and regulator_jurisdiction. Agents should call this before or during consultation when they need valid local filter values. category is the primary record classification; subjects is the broad investigative eligibility layer; typology_family is a broader proceeds or typology grouping. regulator_jurisdiction describes issuer jurisdiction; geographic_footprints describes affected geography or typology geography.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden. It explains that the tool returns available filter values and adds semantic clarifications for several fields (e.g., category, subjects, typology_family). This provides useful behavioral context beyond a simple listing.

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 concise with three sentences: first states the action, second gives usage guidance, third clarifies key field semantics. No wasted words.

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?

Given the tool has no parameters and an output schema exists, the description adequately explains the purpose and some field meanings. It could be more complete by describing the expected output format or mentioning that the output is a list of valid values.

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 no parameters, so the schema coverage is complete. The description adds value by explaining the meaning of the fields that will appear in the output, which compensates for the lack of parameter documentation.

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 clearly states it lists available filter values for a specific set of fields. While it distinguishes from sibling tools implicitly (sibling tools focus on red flags and sources), it does not explicitly differentiate itself.

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 call this before or during consultation when valid local filter values are needed. It provides clear context but does not mention when not to use it or suggest alternatives.

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

list_sourcesA

List ingested AML red flag source coverage with citation URLs, source counts, aggregate metadata, and red flag IDs. Use when users ask what sources or citations the corpus covers.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior2/5

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

No annotations provided, and the description does not disclose any behavioral traits (e.g., side effects, authorization, rate limits). For a read-only list tool, the omission is a minor gap but still reduces transparency.

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?

Two concise sentences with no filler; front-loads the purpose and usage guidance.

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?

Has output schema (not shown) and description lists key elements returned. For a zero-parameter list tool with rich output schema, completeness is high.

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?

Zero parameters (schema coverage 100%), so baseline is 4. No additional parameter meaning needed.

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 explicitly states the tool lists AML red flag source coverage with specific outputs (citation URLs, source counts, aggregate metadata, red flag IDs), and differs from sibling tools like get_source (single source) and search_red_flags.

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?

Includes explicit when-to-use instruction: 'Use when users ask what sources or citations the corpus covers.' Does not specify when not to use, but the context is clear given siblings.

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

search_red_flagsA

Search AML red flags using natural-language context and optional filters.

Successful responses include table-ready display hints in display and a portable Markdown fallback in markdown_table; clients decide how to render them.

Agent guidance: use classify_red_flag_request before searching for ambiguous "what red flags apply" requests; skip that extra call when the user already gives specific metadata filters or a concrete scenario. If the user's request is vague, briefly ask for product/channel, industry, customer profile, geography, and transaction channel or volume before searching. If the request already names those details or has a specific scenario, search directly. Call list_filters when you need valid filter values. Use filter_red_flags for exact metadata requests and exhaustive enumeration; use search_red_flags for ranked relevance questions and increase limit for more ranked results because search has no cursor. For broad investigative topics such as human trafficking red flags, use subjects as an eligibility filter. Category is the primary record classification; subjects is a broader eligibility layer that catches cross-category flags; typology_family is a broader proceeds or typology grouping. For example, a human-trafficking-relevant darknet crypto flag can have category="virtual_currency" while matching subjects=["human_trafficking"]. For broad sector requests such as trade logistics red flags, use industry_groups as an eligibility filter. regulator_jurisdiction describes issuer jurisdiction; geographic_footprints describes affected geography or typology geography. For country or jurisdiction requests about issuing regulators, translate names to regulator_jurisdiction codes before filtering, such as France -> FR, Singapore -> SG, Australia -> AU, United Kingdom/UK -> GB, United States/US -> US, and European Union/EU regulators -> EU.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
categoryNo
subjectsNo
risk_levelNo
product_typesNo
industry_typesNo
industry_groupsNo
customer_profilesNo
geographic_footprintsNo
regulator_jurisdictionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.8/5.0
Behavior5/5

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

No annotations provided, so description fully carries the burden. Discloses response format (display hints, markdown table), lack of cursor (increase limit for more results), and explains semantics of key filters like category, subjects, typology_family, regulator_jurisdiction, geographic_footprints.

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?

Relatively long (~300 words) but well-structured with clear sections: purpose, response format, agent guidance. Each sentence adds value; no fluff. Slightly verbose but efficient.

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?

Thorough guidance for a tool with 11 parameters, no schema descriptions, and 7 siblings. Covers usage scenarios, parameter semantics, response details, and even country code mappings. Fully compensates for missing schema descriptions.

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 0%, but description adds significant semantics: explains difference between category, subjects, and typology_family; clarifies regulator_jurisdiction vs geographic_footprints; gives examples of country code translations. Does not cover every parameter individually but compensates well.

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?

Clearly states the tool searches AML red flags using natural-language context and optional filters. Differentiates from siblings like classify_red_flag_request, filter_red_flags, and list_filters by specifying distinct use cases.

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?

Provides explicit guidance on when to use this tool vs alternatives: use classify_red_flag_request for ambiguous requests, skip for specific metadata filters; use filter_red_flags for exact metadata; use list_filters for valid values. Also advises on handling vague requests.

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.

  1. 7 tool updatesv0.1.0
    • First observedclassify_red_flag_request
    • First observedfilter_red_flags
    • First observedget_red_flag
    • First observedget_source
    • First observedlist_filters
    • First observedlist_sources
    • First observedsearch_red_flags

TDQS

A4.2/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: classification, exact filtering, single retrieval, source retrieval, listing filters, listing sources, and semantic search. No overlap or ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (classify_red_flag_request, filter_red_flags, etc.), with predictable verbs like get_, list_, search_.

Tool Count5/5

7 tools is well-scoped for the AML red flag domain, covering classification, filtering, retrieval, and metadata browsing without unnecessary bloat.

Completeness5/5

The tool set provides a complete read-only surface: routing ambiguous requests, exact filtering, single record lookup, source detail, filter values, source coverage, and full-text search. No obvious gaps.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A production-grade MCP server that provides financial ML tools including RAG search, anomaly detection, contract summarization, vendor graph analysis, and model drift monitoring using entirely free, open-source components.
    1
    -
  • F
    license
    A
    quality
    B
    maintenance
    An MCP server for anti-money laundering (AML) compliance, including customer due diligence, transaction monitoring, and SAR filing, compliant with 6AMLD, UK MLR 2017, and FinCEN.
    4
    48 PyPI
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Retrieval Augmented Generation MCP server that ingests documents into a local vector database and enables semantic search queries.
    10
    -