Skip to main content
Glama

campaigns_preflight

The compliance pre-flight report for a campaign: who the country, opt-out, personal-mailbox and evidence rules will exclude, and why. Covers the segment's NEW leads plus the leads already enrolled and not finished.

Show the user headline first: allowed of total contacts can be emailed, set_aside held back now, would_set_aside more once rules in warn mode are switched on (they are still emailed today), plus summary / would_summary, the one-line explanations to quote. groups is the same split by short label, each contact counted once (largest first).

Also returns totals (allowed = no finding at all, excluded = blocked by a rule in enforce mode, warned = would be excluded once that rule is enforced), tiers (country rule tiers), reasons (the details: one row per reason and country, with a short label and why/fix text, class, consent_can_lift, can_unlock — the customer can lift it per lead: a consent record, or for personal_mailbox (class business_use) an existing customer, a published business listing or leads_confirm_business_use — and a few example_lead_sqids), workspace_checks (sender details, GDPR legitimate-interest assessment and privacy notice when EU/EEA/UK leads are present), mailboxes (health of the campaign's mailboxes), report_hash, and acknowledgement (whether the user's acknowledgement still covers this report).

Lists over 20,000 leads are sampled evenly and the counts scaled (sample). The report is cached for two minutes; pass refresh=true after fixing something. Excluded leads are dropped automatically at generate, approve and send — this report makes that visible.

Typical flow: show the report to the user, then campaigns_preflight_acknowledge with its report_hash, then campaigns_activate.

Method: GET /api/v1/workspaces/{workspace_sqid}/campaigns/{sqid}/preflight/

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sqid": "<sqid>"
    },
    "name": "campaigns_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqidYes
refreshNoRebuild the report instead of using the 2-minute cache.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/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 does so: two-minute caching, refresh to bypass it, even sampling with scaled counts above 20,000 leads, and the downstream consequence that excluded leads are dropped automatically at generate, approve and send. It also discloses the acknowledgement-state field, which determines whether the report is still valid for activation.

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

Conciseness3/5

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

The purpose is front-loaded, but the middle is a dense, parenthetical-heavy recital of every return field and its sub-properties, which is hard to scan. The critical agent-facing instruction (the acknowledge-then-activate flow) is buried at the end and would serve better near the top.

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?

There is no output schema, so the description legitimately must explain return values, and it covers headline, groups, totals, tiers, reasons, workspace_checks, mailboxes, report_hash, acknowledgement and the sample marker. For a read-only reporting tool with no mutation risk, nothing an agent needs in order to call or interpret it 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?

Only two parameters and the schema already documents refresh as rebuilding instead of using the cache; the description repeats that and adds the timing hint 'after fixing something'. The required sqid is never characterized in the schema or description beyond the method path, so with 50% coverage the description adds only marginal parameter-level meaning.

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 artifact (compliance pre-flight report for a campaign) and enumerates exactly what it explains: country, opt-out, personal-mailbox and evidence rule exclusions. It also scopes the population covered (NEW leads plus enrolled-and-unfinished leads), so an agent can distinguish it from campaigns_get or campaigns_stats without opening a schema.

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 an explicit ordered flow: show the report, then campaigns_preflight_acknowledge with report_hash, then campaigns_activate, and it tells the agent to pass refresh=true after fixing something. It never states when this tool should be skipped (e.g. a campaign already activated or with no leads), which keeps it short of a 5.

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.