Skip to main content
Glama

create_campaign_from_template

One-shot helper for the happy path: fork a starter template, optionally tweak the template strings, and create the campaign, all in a single tool call.

When to use this vs create_campaign:

  • Use create_campaign_from_template when the user's intent fits one of the 26 starters ('cold intro to founders', 'book a demo', 'recruiting a senior hire', 'investor outreach'). One call, one campaign.

  • Use the explicit list_sequence_templates → validate → preview → create_campaign loop when the user wants something custom enough that you need to show them a draft first.

Placeholders: some copy has [bracketed placeholders] only the sender can write. Fill them with placeholder_values (keys include the brackets; call list_sequence_templates to see which a template has). A campaign with an unfilled placeholder cannot be activated: asking for status 'active' returns an unfilled_placeholders error, and a draft is created with unfilled_placeholders listed in the response. To keep a bracket in a message on purpose, put a backslash before it: [Free webinar] is sent as [Free webinar].

Customizations the user typically asks for can be supplied via template_overrides, a map of step-id → new template string. Step ids are fixed by role: invite, view-profile, opener, follow-up-1, close-out, like-first, like-after-opener, with a '-connected' suffix on the copy that goes to people already connected (e.g. opener-connected), plus if-connection. Overrides replace the whole body, so a step with variables should keep them and you should also check the fallback with preview_messages. The validator runs before the API call; structural issues come back as { error: { code: 'validation_failed', issues: [...] } }.

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": {
      "name": "<name>",
      "template_key": "<template_key>",
      "accountIds": "<accountIds>"
    },
    "name": "create_campaign_from_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesCampaign name shown to the user
statusNo'draft' keeps the campaign editable; 'active' launches it after validation.draft
accountIdsYesLinkedIn sender account ids that will execute this campaign.
dailyLimitsNoDaily caps for THIS CAMPAIGN, e.g. { connection_invite: 20, follow_up_message: 30 }. Each number is a total per day across every sender on the campaign, not per account, and not a range the runner varies. Each sending account ALSO has its own daily caps (get_account with include daily_limits); a send needs room under both, so the lower one governs. Omit to leave the campaign uncapped, in which case the account limits alone govern, that is a safe default and usually the right one. Unknown action keys are rejected by the API rather than ignored, so spell them exactly: connection_invite, follow_up_message, inmail, profile_view, profile_follow, post_like_comment, withdraw_connection_request.
audienceDataNoe.g. { urls: [...] } for linkedin_urls, or { listId } for lead_list.
template_keyYesWhich starter template to fork: cold-intro, founder-to-founder, short-and-punchy, value-first, problem-led, referral-ask, warm-follow-up, re-engage, congratulations, thanks-after-meeting, book-a-demo, free-trial, case-study, agency-lead-gen, freelancer-intro, passive-candidate, senior-hire, referral-for-role, partner-intro, affiliate-reseller, webinar-invite, meetup-dinner, conference-pre-meet, investor-outreach, podcast-guest, customer-feedback. See list_sequence_templates. The old keys cold_intro, warm_followup and investor_outreach still work.
audienceSourceNoWhere the audience comes from: linkedin_urls, csv or lead_list. The shape of audienceData depends on it.
idempotency_keyNoOptional UUID for safe retries: send the same key when repeating a request so it is applied once.
placeholder_valuesNoFill the template's [placeholders]. Keys include the brackets, e.g. { '[what you help with]': 'outbound for B2B SaaS' }.
template_overridesNoMap of step-id → new body string. Customizes the forked sequence without rebuilding the tree. Ids are fixed by role (invite, opener, follow-up-1, close-out, with a '-connected' suffix for already-connected people); an id the template does not have is an error. Example: { 'invite': 'Hi {{firstName}}, my custom note...' }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / audienceData / description
      Previous value: -"e.g. { urls: [...] } for linkedin_urls, or { leadListId } for lead_list."New value: +"e.g. { urls: [...] } for linkedin_urls, or { listId } for lead_list."
  2. Changed1 schema field changed
    • changedInput schema / properties / dailyLimits / description
      Previous value: -"Daily caps for THIS CAMPAIGN, e.g. { connection_invite: 20, follow_up_message: 30 }. Each number is a total per day across every sender on the campaign, not per account, and not a range the runner varies. Each sending account ALSO has its own daily caps (get_account_daily_limits); a send needs room under both, so the lower one governs. Omit to leave the campaign uncapped, in which case the account limits alone govern, that is a safe default and usually the right one. Unknown action keys are rejected by the API rather than ignored, so spell them exactly: connection_invite, follow_up_message, inmail, profile_view, profile_follow, post_like_comment, withdraw_connection_request."New value: +"Daily caps for THIS CAMPAIGN, e.g. { connection_invite: 20, follow_up_message: 30 }. Each number is a total per day across every sender on the campaign, not per account, and not a range the runner varies. Each sending account ALSO has its own daily caps (get_account with include daily_limits); a send needs room under both, so the lower one governs. Omit to leave the campaign uncapped, in which case the account limits alone govern, that is a safe default and usually the right one. Unknown action keys are rejected by the API rather than ignored, so spell them exactly: connection_invite, follow_up_message, inmail, profile_view, profile_follow, post_like_comment, withdraw_connection_request."
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations (which only say non-read-only, non-destructive, not idempotent), it discloses that validation runs before the API call, that structural failures return { error: { code: 'validation_failed', issues: [...] } }, and that activation with unfilled placeholders errors while a draft records them. It does not cover permission/account requirements or the response payload of a successful create, so it stops short of the top score.

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 purpose and the use/when-not-choose block are front-loaded and the dense mechanics (placeholders, overrides, validator) follow in a logical order. It is long, and the placeholder paragraph packs escaping, error behavior and discovery into one block, but nearly every sentence carries actionable detail.

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?

For a 10-parameter, nested-object creation tool with no output schema, the description covers the tricky surfaces (placeholders, overrides, validation errors) well, but says nothing about audienceData/audienceSource pairing or how campaign dailyLimits interact with per-account caps. Those gaps are filled by the schema, so the description is adequate rather than complete.

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 100%, so the baseline is 3, but the description adds real meaning: placeholder_values keys must include the brackets and can be discovered via list_sequence_templates, template_overrides is step-id → full body replacement with a fixed id vocabulary and '-connected' suffix, and unknown ids are an error. Backslash escaping for literal brackets is a genuine addition not present in the schema.

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 verb and resource ('fork a starter template ... create the campaign') and pins the scope to a one-shot happy-path operation. It is explicitly contrasted with create_campaign and the manual list_sequence_templates → validate → preview loop, so an agent can distinguish it from siblings 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a positive selection rule (intent matches one of the 26 named starters, one call, one campaign) and a negative one (custom work needing a shown draft should use the explicit loop). Both the when and the when-not are stated, with the alternative tool named.

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.

Resources