Skip to main content
Glama

Google Ads & Meta Ads

LinkedIn Ads: Update Campaign Targeting

linkedin_update_campaign_targeting
DestructiveIdempotent

Add, remove or replace targeting entities on one LinkedIn campaign in the user's own ad account, facet by facet (locations, titles, seniorities, industries, employers, staffCountRanges, skills, ...), on the include or the exclude side. Every other part of the campaign's targeting is preserved exactly; a targeting expression that cannot be edited without rewriting it is refused, and so is a result with no included audience or with fewer than 300 members, which LinkedIn will not serve. Entities are URNs: resolve names with linkedin_search_targeting_entities and read the current targeting with linkedin_get_campaign. LinkedIn does not allow targeting that discriminates by age, gender or other protected characteristics for housing, employment, education or credit ads. Changing targeting changes who sees the ads, so get the user's approval first. Supports dry_run.

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>",
      "changes": "<changes>"
    },
    "name": "linkedin_update_campaign_targeting"
  }
}

Input Schema

NameRequiredDescriptionDefault
changesYesTargeting edits to apply, in order.
dry_runNotrue: read the object and report the field-level changes this call would make, changing nothing. Default false. Show the user the proposal and get their approval before calling without dry_run.
campaign_idYesNumeric campaign id (or its urn:li:sponsoredCampaign URN), from linkedin_list_campaigns.
ad_account_idNoLinkedIn ad account to change: numeric account id or exact account name. Required when you have several ad accounts — the stored default is never used for a change then.

Output Schema

NameRequiredDescriptionDefault
dryRunYesTrue when the call only previewed the change.
changedYesTrue only when this call changed LinkedIn Ads.
changesYesField-level changes: made, or proposed on a dry run.
currencyNoISO currency code that every money field in this result is denominated in, e.g. UAH or USD. Null when it could not be resolved — do not assume a currency then.
objectIdYesNumeric id of the object.
verifiedNoWhether LinkedIn's read-back holds every requested value; null when nothing was written or the read-back failed.
warningsYesSide effects and limits the user should hear about.
operationYesWhat happened: updated, no_change, or dry_run.
objectNameNoThe object's name, when it has one.
objectTypeYesKind of object addressed.
adAccountIdYesLinkedIn ad account the object is in.
audienceSizeNoLinkedIn's approximate member count for the resulting targeting; null when it could not be counted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructive=true, idempotent=true and openWorld=true, and the description adds substantive context beyond them: untouched targeting is preserved exactly, certain expressions are refused rather than rewritten, LinkedIn's minimum audience and protected-characteristic policies apply, and dry_run is available. This is unusually rich behavioral disclosure for a mutation tool.

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 mutation and its scope are front-loaded, and the follow-on sentences cover edits preservation, refusals, URN resolution, policy limits and approval — all load-bearing. It is long but dense; only the trailing 'Supports dry_run' is slightly redundant since the schema already explains dry_run.

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 destructive, multi-facet mutation with an output schema, the description covers everything an agent needs: what is changed, what is preserved, what causes a refusal, how to resolve entities, and the approval/dry_run protocol. Return values need not be explained because an output schema exists.

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?

Schema description coverage is 100%, so each parameter, including the nested side/facet/operation/entity_urns fields, is already documented in the schema. The description echoes the URN requirement and facet examples but adds no syntax, ordering or edge-case detail beyond what the schema provides, so the baseline 3 applies.

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 set and resource: 'Add, remove or replace targeting entities on one LinkedIn campaign', and names the scope (facet by facet, include/exclude side). This clearly separates it from siblings like linkedin_update_campaign_delivery, linkedin_update_campaign_schedule and linkedin_update_budget.

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 explicitly routes the agent to linkedin_search_targeting_entities for URN resolution and linkedin_get_campaign for reading current targeting, and mandates user approval before applying changes. It also states when a call will be refused (non-editable expression, empty included audience, fewer than 300 members), which is exactly the when-not guidance an agent needs.

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