set_search_channel_locations
Set the geographic targeting of a wizard campaign's search channel (Google Ads or Microsoft Ads) — which countries/states the campaign serves in, and which countries to exclude.
Destructive search
Deletes, archives, launches or moves budget. Do not give an agent this one without a human gate.
What it does
Set the geographic targeting of a wizard campaign's search channel (Google Ads or Microsoft Ads) — which countries/states the campaign serves in, and which countries to exclude.
Matches the platform UI's "Location" picker under the Google Ads / Microsoft Ads channel SETTINGS panel, plus the "Negative Locations" editor under that channel's Advanced Settings.
⚠️ NEW SEARCH CAMPAIGNS DEFAULT TO UNITED STATES. The platform seeds the Location
field with United States, so a campaign created without calling this tool serves in
the US only. Whenever the user names a geography — "target Canada and the UK",
"run this in EMEA", "exclude India" — set it explicitly; do not assume the default
is what they want.
KEYWORDS: geo, geos, geo targeting, geotargeting, geographic, geography, location,
locations, location targeting, country, countries, state, states, region, territory,
market, target location, exclude location, exclude geo, exclude country,
negative location, negative locations, location exclusion, excluded locations,
where the campaign runs, google ads, google, microsoft ads, microsoft, bing,
search channel, search campaign, campaign settings
WHEN TO USE:
- Point a search campaign at specific countries/states instead of the US default
- Exclude countries the campaign must not serve in
- Clear targeting back to all locations (countries=[], states=[])
REQUIREMENTS:
- The campaign MUST already have the target channel enabled (via create_campaign /
add_and_edit_campaign_elements with a `google` and/or `microsoft` block).
- Geo targeting here is search-channel-only. LinkedIn / Meta / Reddit carry location
on the audience or target group instead — use create_target_group or the audience
tools for those.
PARAMETERS (each one REPLACES that side of the targeting; omit to leave untouched):
- campaign_id (required): the wizard campaign ID.
- channel (required): "GOOGLE_ADS" or "MICROSOFT_ADS".
- countries: country NAMES to target, e.g. ["United States", "Canada"].
Pass [] to clear (= all locations).
- states: US state NAMES to target, e.g. ["Texas", "California"].
Pass [] to clear. States are US-only.
- excluded_countries: country NAMES the campaign must NOT serve in.
Pass [] to clear all exclusions.
Names are matched case-insensitively against the platform's location catalog and
common shorthand resolves ("USA", "UK", "UAE"). An unrecognised name is REJECTED
rather than skipped — a silently dropped geo would serve the campaign somewhere
nobody chose. At least one of the three lists must be given.
⚠️ EXCLUSIONS ARE COUNTRY-LEVEL ONLY. The platform stores exclusions as bare
location ids with no country/state discriminator, and state ids overlap country ids,
so an excluded state would be read back as an unrelated country. The UI's Negative
Locations picker is countries-only for the same reason. To narrow within a country,
target the states you want via `states` instead of excluding the ones you don't.
EXAMPLES:
Target Canada and the UK on Google Ads (replacing the US default):
set_search_channel_locations({
"campaign_id": 177214,
"channel": "GOOGLE_ADS",
"countries": ["Canada", "United Kingdom"]
})
Target three US states only:
set_search_channel_locations({
"campaign_id": 177214,
"channel": "GOOGLE_ADS",
"countries": ["United States"],
"states": ["Texas", "California", "New York"]
})
Keep targeting as-is but exclude two countries on Microsoft Ads:
set_search_channel_locations({
"campaign_id": 177214,
"channel": "MICROSOFT_ADS",
"excluded_countries": ["India", "Pakistan"]
})
RESPONSE: {success, campaign_id, channel_id, channel, applied:{locations?:{countries,states}, excluded_locations?:{countries}}, errors?}
`applied` echoes the resolved location NAMES, so you can confirm back to the user what the campaign now targets.
INTEGRATION WITH OTHER TOOLS:
- Use search_campaigns_by_names / get_campaign_by_wizard_id to find the campaign.
- create_campaign and add_and_edit_campaign_elements accept the same geo inline on
their `google` / `microsoft` blocks — prefer that when creating, and use this tool
to change geo on a campaign that already exists.Arguments
| Argument | Type | Notes | |
|---|---|---|---|
campaign_id |
integer | required | The unique identifier of the wizard campaign. |
channel |
string | required | Which search channel on the campaign to update. Geo targeting is set per channel and only these two carry it. one of: GOOGLE_ADS, MICROSOFT_ADS |
countries |
array | Country NAMES to target, e.g. ["United States", "Canada"]. REPLACES the channel's current countries. Pass [] to clear (targets all locations). Omit to leave unchanged. | |
states |
array | US state NAMES to target, e.g. ["Texas", "California"]. REPLACES the channel's current states. Pass [] to clear. Omit to leave unchanged. US states only. | |
excluded_countries |
array | Country NAMES the campaign must NOT serve in, e.g. ["India"]. REPLACES the channel's current exclusions. Pass [] to clear them all. Omit to leave unchanged. Country-level only — states cannot be excluded. |
Request
curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
-H "Authorization: $METADATA_PAT" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-11-25" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"set_search_channel_locations","arguments":{"campaign_id":0,"channel":"GOOGLE_ADS"}}}'
Response
No recorded response. This tool can delete, archive, launch or move budget, so it is never executed to build these docs.
The request above is still the exact shape to send. Nothing on this page is invented.
Related
Other search tools: