Skip to main content
Glama

Compliance Check

check_compliance

Read-onlyIdempotent

Free, instant pre-flight for the compliance gate. Runs the SAME TCPA / GDPR / CASL / CAN-SPAM / 10DLC gate that send_message and call_business run — but in preview mode, so NO message is sent and NO state changes. Tells you whether a (recipient, channel, message_type, content) send would be permitted BEFORE you pay for it, and if not, names the exact rule and how to remediate. Use it to de-risk a paid send the same way check_booking_link de-risks a paid booking. Attaches a compliance_receipt: an Ed25519-signed, hash-bound record of what was checked, when, against which sources, and what it returned - verifiable OFFLINE against the public key published at https://hatchloop.dev/agents.md, so you can hand it to an auditor as evidence the check really ran.

EXAMPLE USER QUERIES THAT MATCH THIS TOOL: user: "Is it legal to text this US number a 20%-off promo?" -> call check_compliance({"recipient_id": "+14045550200", "content": "20% off this week only!", "channel": "sms", "message_type": "marketing", "country_code": "US"}) user: "Before you email the dentist, make sure it's allowed" -> call check_compliance({"recipient_id": "office@dentist.example", "content": "Do you accept Cigna? Following up on my request.", "message_type": "follow_up"}) -> then send_message({"recipient": {"id_type": "email", "id_value": "office@dentist.example"}, "message_type": "follow_up", "content": {"body": "Do you accept Cigna? Following up on my request."}})

WHEN TO USE: Call this the moment before send_message or call_business when there is any chance the send is regulated — anything tagged marketing, any SMS to a US number (10DLC), any message to an EU/UK (GDPR) or Canadian (CASL) recipient, or any content you are unsure about. It is free and sub-100ms, so run it as a guard: if legal=true, proceed to send_message with confidence; if legal=false, fix the cited blocker instead of burning a paid, rejected send. WHEN NOT TO USE: Do not treat a legal=true as a permanent license — the gate re-runs at send time, so a fresh opt-out between preview and send still blocks. Do not use it to check two-party voice recording consent (that is evaluated at call time in the voice adapter, not here). It is not a substitute for send_message; it never delivers anything. COST: free - no key required LATENCY: ~15ms

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelNoDelivery channel. Omit to auto-infer sms/email from recipient_id; set 'voice' explicitly.
contentYesThe actual message body you intend to send. The gate classifies the real text, so a meaningful preview needs the real content.
state_codeNoUS state code (e.g. 'CA') for state-specific rules.
country_codeNoISO 3166-1 alpha-2 (e.g. 'US', 'DE', 'CA'). Auto-inferred from phone if omitted; drives which jurisdiction rules apply.
message_typeNoIntent tag: transactional, marketing, reminder, follow_up, notification. 'marketing' triggers the consent checks. Defaults to transactional.transactional
recipient_idYesPhone in E.164 (e.g. '+14045550100') or email address the message would go to.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnlyHint/idempotentHint annotations, the description discloses meaningful runtime behavior: preview mode causes no state changes, a legal=true result is not a permanent license because the gate re-runs at send time, and the tool attaches an Ed25519-signed, offline-verifiable compliance_receipt. This clearly exceeds what annotations alone provide and does not contradict them.

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 long but well-structured with clear sections (purpose, examples, when to use, when not to use, cost, latency) and front-loaded with the core distinction. It repeats 'free' and 'preview/no message sent' a few times, but the complexity of the compliance gate and receipt behavior justifies most of the length.

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 no output schema, the description explains what the tool returns (whether the send is permitted, the exact blocking rule, remediation guidance, and a signed compliance_receipt), how to use it safely, its cost/latency, and its limitations. An agent has enough context to decide when to call it and what to do with the result.

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 explains all six parameters. The description reinforces the meaning of content, channel auto-inference, and message_type's marketing trigger, but adds little semantic detail beyond the schema; the example queries are helpful but not substantial parameter-level additions.

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 ('check'), names the resource ('the compliance gate'), and explicitly frames itself as a pre-flight preview that 'NO message is sent and NO state changes.' It distinguishes itself from send_message and call_business by naming them as the tools whose gate it shares while remaining read-only.

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?

There is a dedicated 'WHEN TO USE' section specifying concrete triggers (marketing, SMS to US numbers, EU/UK/CAN recipients, uncertain content) and a 'WHEN NOT TO USE' section naming exclusions like two-party voice recording consent. It also gives an explicit alternative chain: check first, then send_message if legal=true.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation4/5

Most tools target clearly distinct compliance subdomains: messaging compliance, sanctions screening, trade restrictions, company verification, and cost preview. The main overlap is between map_trade_restriction and screen_sanctions, since both screen parties against sanctions lists, but their descriptions differentiate trade-level screening from dedicated name screening well enough.

Naming Consistency4/5

Tool names mostly follow a consistent snake_case verb_noun pattern: check_compliance, get_outcome, get_status, preview_cost, screen_sanctions, verify_company_record. self_test is the one minor deviation since it reads more like a noun than an imperative verb_object name, but it does not break the overall pattern.

Tool Count5/5

Eight tools is a well-scoped size for a compliance pre-flight server. Each tool has a distinct role, and the count is neither bloated nor too thin for the apparent domain.

Completeness4/5

The core compliance workflows are covered: messaging pre-flight checks, sanctions screening, cross-border trade restrictions, company registry verification, and cost/status helpers. The main gaps are intentional exclusions like PEP screening, export-control product classification, and consent management, which are documented but prevent the set from being a fully comprehensive compliance suite.