Skip to content
Tinbox

Run outreach with an external agent

Drive a full cold-outreach run — create, source, draft, review, approve, launch, read replies — from an external agent over MCP or the CLI, using the same campaign tools the in-app assistant has.

Tinbox campaigns are managed by one tool manifest, and that manifest drives all three external surfaces at once — the in-app assistant, the /mcp endpoint (Claude, Cursor, any MCP client), and the generated tinbox CLI commands. There is no separate hosted dashboard requirement: agents can call the same typed API from local code. Shared tools cover the campaign preparation and review flow as well as the separate gated approval/dispatch steps.

This guide walks the full cold-outreach loop — create → source → draft → review → approve → launch → read replies — driven by an external agent. The same tool names work whether the agent calls them over MCP tools/call or you run them as CLI commands.

The safety rails are enforced in the engine, not the tool, so they hold on every surface: cold sends pass the configured cold-domain and transport checks, every send is approval-gated, and approve_prospects / launch_outreach are flagged destructive so an MCP client asks for confirmation and an autopilot defers to a human.

The tools

StepToolClass
Create a campaign draftcreate_outreach_campaignreversible
Start preparationmark_outreach_sourcingreversible
Add locally researched candidatesadd_outreach_prospectsreversible
Source + qualify prospectssource_prospectsreversible
Draft per-prospect bodiesdraft_all_pending (or draft_outreach_body)reversible
Submit the prepared batch for reviewsubmit_outreach_reviewreversible
Read the ranked review queuelist_review_queueread-only
Approve / deny prospectsapprove_prospects / deny_prospectsapprove = destructive
Launch the campaignlaunch_outreachdestructive
Check the funneloutreach_campaign_statusread-only
Triage repliesoutreach_replies_digestread-only

(Personalized warm broadcasts use the sibling tools personalize_campaign, list_personalized_review, and approve_personalized — same review-queue shape, fed by first-party usage stats instead of cold signal.)

Add locally researched prospects

Campaign creation and prospect preparation are available through code, the SDK, MCP, and the CLI. The CLI calls the deployment API; it is not an offline database. You can research and validate candidate JSON locally, then explicitly stage it on an existing draft campaign without running the technical domain qualifier:

await tinbox.api.outreach.addProspects.mutate({
  campaignId: "oc_draft",
  prospects: [{
    recipient: "ada@company.example",
    name: "Ada",
    orgDomain: "company.example",
    signal: {
      source: "local-research",
      sourceUrl: "https://company.example/team",
      findings: { role: "Office manager", fit: "Verified workplace event context" },
    },
  }],
  provenance: { surface: "sdk", asAgent: true },
});

The shared tool is add_outreach_prospects. The CLI accepts structured records as one quoted JSON array, preserving commas inside names and research text:

tinbox add-outreach-prospects --campaignId oc_draft \
  --prospects '[{"recipient":"ada@company.example","signal":{"source":"local-research"}}]' --json

Each call accepts up to 100 recipients. Research records are bounded to 8,000 characters each and 128,000 for the batch. signal.findings is a flat map of up to 30 string/number/boolean/null values; strings are limited to 2,000 characters. Names, addresses, domains, source URLs, and ranking metadata are validated too. Research data is not evidence of consent and cannot contain approval/run-state fields. Additions require the existing preparation authority, an unarchived pre-approval campaign, and an atomic current-campaign check.

Addresses/domains are normalized to lowercase. An existing campaign recipient is skipped without overwriting its prior facts or draft. Conflicting duplicates within one batch fail before insertion. A repeat does not create duplicate prospects. Existing known Contacts can be linked, but strangers stay campaign-only and no Contact is implicitly created. The server records the authenticated research author in provenance. This operation does not approve, launch, schedule, or send. Campaign creation still uses create_outreach_campaign; record its returned id before staging candidates. Approval and dispatch keep their existing separate gates. For a newly created cold campaign, explicitly call mark_outreach_sourcing (API outreach.markSourcing) before sourcing, then submit_outreach_review (API outreach.submitForReview) after drafting. The preparation tools do not advance the campaign status automatically. Read the live campaign before choosing a transition; do not approve a campaign that is still in draft/sourcing.

Over MCP

Connect an MCP client (see Connect an MCP client); the campaign/outreach tools appear in tools/list automatically. A run is a sequence of tools/call requests — the agent reads each structured result and decides the next step:

// 1. Create the campaign draft (nothing sends).
{ "method": "tools/call", "params": {
  "name": "create_outreach_campaign",
  "arguments": { "name": "YC W26 founders", "brief": "Seed-stage B2B founders hiring eng",
                 "sendingDomainId": "sd_cold", "fromEmail": "hi@cold.acme.dev" } } }

// Start preparation explicitly; creation/sourcing do not advance state automatically.
{ "method": "tools/call", "params": {
  "name": "mark_outreach_sourcing", "arguments": { "id": "oc_123" } } }

// 2. Source + qualify prospects into the campaign.
{ "method": "tools/call", "params": {
  "name": "source_prospects",
  "arguments": { "campaignId": "oc_123", "domains": ["acme.dev", "globex.io"] } } }

// 3. Draft a personalized body for every sourced prospect.
{ "method": "tools/call", "params": {
  "name": "draft_all_pending", "arguments": { "campaignId": "oc_123" } } }

// Hand off the draft batch for review without approving or sending.
{ "method": "tools/call", "params": {
  "name": "submit_outreach_review", "arguments": { "id": "oc_123" } } }

// 4. Read the ranked review queue (hottest first) and pick winners.
{ "method": "tools/call", "params": {
  "name": "list_review_queue", "arguments": { "campaignId": "oc_123", "stage": "drafted" } } }

// 5. Approve the good ones (destructive — the MCP client confirms first).
{ "method": "tools/call", "params": {
  "name": "approve_prospects", "arguments": { "campaignId": "oc_123",
                                              "prospectIds": ["p_1", "p_2", "p_5"] } } }

// 6. Launch after readiness and review; sends fire on the throttled tick.
{ "method": "tools/call", "params": {
  "name": "launch_outreach", "arguments": { "id": "oc_123" } } }

// 7. Watch it. Replies thread into the campaign-tagged Inbox.
{ "method": "tools/call", "params": {
  "name": "outreach_campaign_status", "arguments": { "id": "oc_123" } } }
{ "method": "tools/call", "params": {
  "name": "outreach_replies_digest", "arguments": { "id": "oc_123" } } }

Over the CLI

The same tools are generated tinbox commands (snake_case → kebab-case). Every command takes --json for a stable, agent-parseable result, and the destructive ones require --yes:

# 1. Create the campaign draft.
tinbox create-outreach-campaign --name "YC W26 founders" \
  --brief "Seed-stage B2B founders hiring eng" \
  --sendingDomainId sd_cold --fromEmail hi@cold.acme.dev --json

# Start preparation.
tinbox mark-outreach-sourcing --id oc_123 --json

# 2. Source + qualify.
tinbox source-prospects --campaignId oc_123 --domains acme.dev,globex.io --json

# 3. Draft every pending body.
tinbox draft-all-pending --campaignId oc_123 --json

# Hand off the prepared batch.
tinbox submit-outreach-review --id oc_123 --json

# 4. Review the ranked queue.
tinbox list-review-queue --campaignId oc_123 --stage drafted --json

# 5. Approve (destructive → --yes required).
tinbox approve-prospects --campaignId oc_123 --prospectIds p_1,p_2,p_5 --yes --json

# 6. Launch (destructive → --yes; engine applies cold-domain and transport gates).
tinbox launch-outreach --id oc_123 --yes --json

# 7. Status + replies digest.
tinbox outreach-campaign-status --id oc_123 --json
tinbox outreach-replies-digest --id oc_123 --json

Over the SDK

In TypeScript, tools that forward to one API procedure without reshaping their input have generated aliases on tinbox.tools.*. The full typed router remains available at tinbox.api.*. Review paging and the combined replies digest are shared chat/MCP/CLI tools; use their underlying API procedures from the SDK:

const oc = await tinbox.tools.createOutreachCampaign({ name: "YC W26 founders", brief });
await tinbox.tools.markOutreachSourcing({ id: oc.id });
await tinbox.tools.sourceProspects({ campaignId: oc.id, domains: ["acme.dev"] });
await tinbox.tools.draftAllPending({ campaignId: oc.id });
await tinbox.tools.submitOutreachReview({ id: oc.id });
const queue = await tinbox.api.outreach.reviewQueue.query({
  campaignId: oc.id,
  stage: "drafted",
}); // Full draft bodies and provenance; the agent tool adds bounded chunks.
await tinbox.tools.approveProspects({ campaignId: oc.id, prospectIds: ["p_1", "p_2"] });
await tinbox.tools.launchOutreach({ id: oc.id });
const report = await tinbox.api.outreach.report.query({ id: oc.id });
const replyConversations = await tinbox.api.threads.list.query({
  campaign: oc.id,
  status: "all",
  limit: 10,
  offset: 0,
}); // Only conversations this credential can read; page using total/offset.

// list_outreach_campaigns takes no input, so it stays on the typed router:
const all = await tinbox.api.outreach.list.query();

Review warm campaign content and hand it off

Warm shared-body campaigns and personalized existing-client campaigns also work through the API, MCP, and CLI. get_campaign returns the configured sender, audience/segment, body mode, and bounded content plus serialized strategy/proposal provenance. Select contentFormat to read either stored Markdown or HTML:

tinbox get-campaign --id nl_123 --contentFormat markdown \
  --bodyLimit 4000 --provenanceLimit 4000 --json
# Continue with the independent nextBodyOffset / nextProvenanceOffset values.
tinbox get-campaign --id nl_123 --contentFormat html --bodyLimit 4000 --json

list_personalized_review preserves the recipient id, subject, and stage, and also returns bounded draft HTML and provenance. Its default page contains five rows, with 500 body characters and 300 provenance characters per row. Page rows with nextOffset, then select a row to read all of its content:

tinbox list-personalized-review --id nl_123 --limit 5 --json
tinbox list-personalized-review --id nl_123 --recipientRowId nr_123 \
  --bodyLimit 4000 --provenanceLimit 4000 --json

Follow nextBodyOffset and nextProvenanceOffset independently, retaining the same row selection and content format. Concatenating provenance chunks restores its JSON. An absent continuation marks the end of that value. Read all required content before approval. If the model view is trimmed, select one row or reduce the chunk sizes. These reads use the existing campaign read gate; selection cannot retrieve a row from another campaign or stage filter.

submit_campaign_review is the explicit warm preparation handoff. It maps to campaigns.submitForReview and moves an existing draft to in_review. A token with delegated campaign preparation permission can use it without receiving approval, scheduling, or dispatch permission:

tinbox submit-campaign-review --id nl_123 --json

Warm approval is a separate approve_campaign call after submission. It no longer submits implicitly. approve_campaign and schedule_campaign require human confirmation through the shared tools; the CLI requires --yes for both. Scheduling arms a future real send. The server still enforces the separate newsletter:send capability for approval and scheduling.

personalize_campaign can replace existing unapproved bodies with fresh model output. It is not an idempotent retry: read current drafts before retrying it.

The SDK exposes this unchanged-input wrapper as tinbox.tools.submitCampaignReview({ id }). The bounded campaign/review tools reshape their input, so use tinbox.api.campaigns.get.query({ id }) and tinbox.api.campaigns.personalizedReview.query({ id, reviewStage }) from local TypeScript to retrieve their full authorized source results.

The composite create_campaign tool first creates a draft and then saves its content. If content saving fails, the result retains the created campaign id, sets contentSaved: false, and includes preparationError plus a resume target. Read that draft, then use update_campaign with the same id and content, or call campaigns.setContent. Do not create another campaign to retry the content step. Campaign creation has no server idempotency key, so if the initial create request itself has an ambiguous network failure, inspect live campaigns before retrying.

For local authoring and guarded recipient draft saves, see Agent-authored campaigns.

Where replies go

Outreach never hosts the conversation. When a human replies, the thread lands in your Inbox, tagged campaign:<id>, and the prospect flips to replied (which stops the sequence). outreach_replies_digest is the triage summary — how many replied, of how many sent — with a pointer to the Inbox where you (or the assistant) actually respond. That keeps the cold-outreach machine and the real conversation cleanly separated.

Read the full draft before approval

create_outreach_campaign accepts a bounded sequence array. Each step has step (zero-based), instruction, waitDays, and optional subjectHint. Sequence configuration is authoring only; it does not approve or launch a campaign.

list_review_queue returns draft HTML and serialized JSON provenance, rather than only indicating that a draft exists. The default page has five prospects, 500 body characters and 300 provenance characters each. Continue with nextOffset, or select one prospect and read its content chunks independently:

tinbox list-review-queue --campaignId oc_123 --prospectId p_1 \
  --bodyLimit 4000 --provenanceLimit 4000 --json
# Follow nextBodyOffset / nextProvenanceOffset from that result.
tinbox list-review-queue --campaignId oc_123 --prospectId p_1 \
  --bodyOffset 4000 --provenanceOffset 4000 \
  --bodyLimit 4000 --provenanceLimit 4000 --json

Use the returned offsets, rather than assuming both chunks have the same length. Concatenating the provenance chunks reconstructs its JSON. If a model view is trimmed, select one prospect or reduce the page/chunk size. Read all content needed for review before approving.

outreach_replies_digest returns the campaign counts plus stored conversation pointers from the existing campaign-tagged Inbox view. threads contains actual threadId and inboxId values; use get_thread to inspect the exchange. Follow nextOffset for further conversations. Inbox permissions and the conversation's inbox scope still apply, so a campaign count can exceed the conversations a credential can read. An empty pointer list is not proof that nobody replied.

Domain verification, transport configuration, and classification are reported by readiness. The current cold-binding logic can report an unverified bound domain as a warning; these tools do not create a stronger verification guarantee than the engine implements. Check the live readiness result before dispatch.