Skip to main content
Glama

campaigns_approve_messages

Bulk equivalent of messages_approve, scoped to one campaign step. Mirrors the UI Approve button on the /ws/outreach/campaign/<sqid>/step/<step_sqid>/created page. Typical flow after campaigns_generate_messages completes:

  1. campaigns_generate_messages on a set of leads → returns task_sqid.

  2. jobs_get(task_sqid) → wait for COMPLETED.

  3. campaigns_approve_messages with the same lead_sqids → flip all their freshly-generated messages NEW/REVIEW_REQUIRED → APPROVED; send scheduler picks them up on the next tick.

Input is Lead sqids, not Message sqids — the view resolves each lead to its current Message for this (campaign, step) pair. Reuses the same identifier the agent already has from the generate-messages call.

Synchronous, no cost. Approving just flips the Message status and computes scheduled_at via get_next_delivery_time (respecting per-mailbox daily / hourly limits). No connects are charged — the connects are already paid at generation time.

Idempotent. Approving an already-APPROVED message reschedules it (useful if you paused a campaign and want to restart sends with fresh delivery times). Messages in terminal states (SENT, DELIVERED, READ, BOUNCED, UNSUBSCRIBED, CANCELED) are skipped with reason already_finalized — no way to un-send an email.

Skip reason codes: not_found (no lead with that sqid in workspace), not_enrolled_on_step (no CampaignLog for this campaign+step+lead), no_message (CampaignLog exists but generation hasn't produced a Message yet — re-call campaigns_generate_messages first), already_finalized, compliance_blocked (a compliance rule excludes the lead — compliance_reason says which; the message was canceled).

Method: POST /api/v1/workspaces/{workspace_sqid}/campaigns/{sqid}/steps/{step_sqid}/approve-messages/

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>",
      "step_sqid": "<step_sqid>",
      "lead_sqids": "<lead_sqids>"
    },
    "name": "campaigns_approve_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqidYes
step_sqidYes
lead_sqidsYesLead sqids whose messages on this step should be approved for sending. Source these from `campaigns_step_logs` with status=10 (MESSAGE_CREATED / REVIEW_REQUIRED), or reuse the list you passed to `campaigns_generate_messages`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/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: it discloses synchronous execution, no connect cost, idempotency semantics, rescheduling of already-approved messages, the terminal-state skip list, and the complete skip reason vocabulary including `compliance_blocked` with its side effect (message canceled). It also explains how `scheduled_at` is derived via per-mailbox daily/hourly limits.

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?

Front-loaded with the one-line summary and its sibling relationship, then bolded lead-ins for each behavioral facet, which makes skimming effective. It is long, and a few sentences restate the same point (synchronous/no cost, idempotency), but nearly all content is decision-relevant.

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 mutation tool with zero annotations and no output schema, the description covers everything an agent needs: prerequisites, cost model, idempotency, failure/skip taxonomy, and side effects. Nothing essential to correct invocation is left implicit beyond the raw identifier semantics of the two path parameters.

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 only 33%, but the description compensates substantially by clarifying that input is Lead sqids rather than Message sqids and explaining the lead→current-Message resolution for the (campaign, step) pair, plus how to source the list. The `sqid` and `step_sqid` parameters are only inferable from the endpoint path rather than described outright.

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?

States a specific action (bulk approve) on a specific resource (messages in one campaign step) and explicitly positions itself as the bulk equivalent of `messages_approve`, so an agent can distinguish it from the single-message sibling 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?

Provides a numbered precondition flow (generate → jobs_get wait for COMPLETED → approve with the same lead sqids) and names the alternative (`messages_approve`) for single-message approval. It also notes the idempotent restart use case for already-approved messages, covering when it is appropriate to re-call.

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.