Skip to main content
Glama

add_leads_to_campaign

Idempotent

Add people to an existing campaign from any audience source the app supports. The backend materializes each entry into a prospect (deduped by LinkedIn URL within the campaign); people already in the campaign or blocklisted are skipped. Provide an audienceSource + audienceData, the same shapes create_campaign uses: linkedin_urls ({ urls }), csv ({ rows } with per-lead fields and custom variables), lead_list ({ listId }, adds everyone in a lead list) or linkedin_search ({ url } with a Sales Navigator people-search URL, adds the first ~125 people of that search, run on the campaign's first sending account). To import a whole search (up to ~2,500), make it the campaign's audience instead (update_campaign while paused) or build a list with create_lead_list with search_url and add that list. Returns counts { added, updated, skipped, failed } for linkedin_urls and csv: skipped includes blocklisted contacts and people already in the campaign; failed = invalid URL. Also returns truncated and truncatedTokens when a personalization value ran past the 500 character cap and was stored cut, which is a successful add whose copy was altered rather than a failure, so it needs checking separately from the counts above.

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": {
      "campaign_id": "<campaign_id>",
      "audienceData": "<audienceData>"
    },
    "name": "add_leads_to_campaign"
  }
}

Input Schema

NameRequiredDescriptionDefault
campaign_idYesId of the campaign (from list_campaigns).
audienceDataYeslinkedin_urls: { urls: ["https://www.linkedin.com/in/..."] }. csv: { rows: [{ linkedinUrl, fullName, company, jobTitle, email, custom: { ... } }] }. lead_list: { listId } (the id from list_lead_lists or create_lead_list). linkedin_search: { url }. IMPORTANT: per-lead personalization values must be NESTED under `custom` on each row. A loose top-level key is accepted by the request and then silently dropped, which returns 200 with a correct `added` count and no personalization at all. Each value is trimmed and truncated at 500 characters. That is no longer silent: the response reports `truncated` (how many values were cut) and `truncatedTokens` (which variables), which matters most when the value is a whole written message rather than a short phrase.
audienceSourceNoType of audience being added: linkedin_urls (default), csv, lead_list or linkedin_search.linkedin_urls
idempotency_keyNoOptional UUID for safe retries: send the same key when repeating a request so it is applied once.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / audienceData / description
      Previous value: -"linkedin_urls: { urls: [\"https://www.linkedin.com/in/...\"] }. csv: { rows: [{ linkedinUrl, fullName, company, jobTitle, email, custom: { ... } }] }. lead_list: { leadListId }. linkedin_search: { url }. IMPORTANT: per-lead personalization values must be NESTED under `custom` on each row. A loose top-level key is accepted by the request and then silently dropped, which returns 200 with a correct `added` count and no personalization at all. Each value is trimmed and truncated at 500 characters. That is no longer silent: the response reports `truncated` (how many values were cut) and `truncatedTokens` (which variables), which matters most when the value is a whole written message rather than a short phrase."New value: +"linkedin_urls: { urls: [\"https://www.linkedin.com/in/...\"] }. csv: { rows: [{ linkedinUrl, fullName, company, jobTitle, email, custom: { ... } }] }. lead_list: { listId } (the id from list_lead_lists or create_lead_list). linkedin_search: { url }. IMPORTANT: per-lead personalization values must be NESTED under `custom` on each row. A loose top-level key is accepted by the request and then silently dropped, which returns 200 with a correct `added` count and no personalization at all. Each value is trimmed and truncated at 500 characters. That is no longer silent: the response reports `truncated` (how many values were cut) and `truncatedTokens` (which variables), which matters most when the value is a whole written message rather than a short phrase."
  2. Changed3 schema fields changed
    • changedInput schema / properties / audienceData / description
      Previous value: -"linkedin_urls: { urls: [\"https://www.linkedin.com/in/...\"] }. csv: { rows: [{ linkedinUrl, fullName, company, jobTitle, email, custom: { ... } }] }. IMPORTANT: per-lead personalization values must be NESTED under `custom` on each row. A loose top-level key is accepted by the request and then silently dropped, which returns 200 with a correct `added` count and no personalization at all. Each value is trimmed and truncated at 500 characters. That is no longer silent: the response reports `truncated` (how many values were cut) and `truncatedTokens` (which variables), which matters most when the value is a whole written message rather than a short phrase."New value: +"linkedin_urls: { urls: [\"https://www.linkedin.com/in/...\"] }. csv: { rows: [{ linkedinUrl, fullName, company, jobTitle, email, custom: { ... } }] }. lead_list: { leadListId }. linkedin_search: { url }. IMPORTANT: per-lead personalization values must be NESTED under `custom` on each row. A loose top-level key is accepted by the request and then silently dropped, which returns 200 with a correct `added` count and no personalization at all. Each value is trimmed and truncated at 500 characters. That is no longer silent: the response reports `truncated` (how many values were cut) and `truncatedTokens` (which variables), which matters most when the value is a whole written message rather than a short phrase."
    • changedInput schema / properties / audienceSource / description
      Previous value: -"Type of audience being added. For a lead list or a LinkedIn search, use add_audience_to_campaign instead."New value: +"Type of audience being added: linkedin_urls (default), csv, lead_list or linkedin_search."
    • changedInput schema / properties / audienceSource / enum
      Previous value: -[
      -  "linkedin_urls",
      -  "csv"
      -]New value: +[
      +  "linkedin_urls",
      +  "csv",
      +  "lead_list",
      +  "linkedin_search"
      +]
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare idempotent, non-destructive, non-read-only behavior, but the description adds substantial context: dedup by LinkedIn URL within the campaign, skipping blocklisted and already-present people, materializing prospects, the ~125 cap and first-sending-account execution for linkedin_search, and the returned count breakdown including truncated/truncatedTokens as a success-with-altered-copy case. The only gap is that it does not describe failure or rate-limit behavior beyond the counts.

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 purpose, then sources, then limits, then return shape — a logical order with no filler sentences. It is dense and somewhat long, and the truncation explanation repeats detail already in the audienceData schema description, so a little redundancy keeps it short of a 5.

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?

With no output schema, the description carries the return contract and does so thoroughly: counts { added, updated, skipped, failed } with the meaning of skipped and failed, plus truncated/truncatedTokens and why they must be checked separately. Combined with 100% schema coverage and clear annotations, an agent has everything needed to call and interpret this tool.

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; the description earns more by explaining operational meaning behind audienceSource choices not captured in the schema, such as linkedin_search running on the campaign's first sending account and covering only the first ~125 people. It also restates the custom-nesting truncation semantics, which is largely duplicative of the schema but reinforces the consequence.

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 opens with a specific verb and resource: 'Add people to an existing campaign from any audience source the app supports.' It distinguishes itself from creation flows by noting the audience shapes mirror create_campaign and that a full search import belongs in update_campaign or create_lead_list instead, so an agent can route correctly without opening sibling 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?

It gives explicit per-source guidance (when to use linkedin_urls, csv, lead_list, linkedin_search) and an explicit exclusion with alternatives: for imports over ~125, use update_campaign while paused or build a list via create_lead_list with search_url. That is a clear when/when-not/alternative mapping.

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