Create campaign
Loading server catalog…. Download catalog
https://app.advarde.com/mcpUpstream account eligibility and feature access may also apply.
Description: Prepare a reviewable change: Create a campaign for an ad account. Returns a change_id; call ads_apply_change to execute after approval. Some features need Ads account enablement.
Method: tools/call · ads_create_campaign
Output: Tool data is returned in result.structuredContent and as JSON text in result.content. Inspect result.isError before using the result. Individual output fields depend on the operation.
Access: Requires the applicable write scopes, workspace role, and account permissions.
Upstream operation: POST /campaigns. Call this through the MCP tool above.
Review before applying
This tool prepares a proposal. Review the exact payload and obtain authorization before calling ads_apply_change. Preparation does not mean the upstream change has been applied.
Authentication
Use an MCP access token from MCP connections, or connect through OAuth. Send your token in the Authorization: Bearer header.
For full protocol initialization and tool discovery, use an MCP client. These examples show individual JSON-RPC requests.
Tool arguments
Send these fields inside params.arguments. The tool name is sent as params.name.
account_idstringrequiredWorkspace-owned Advarde connection ID from ads_list_accounts.
"uuid"bodyobjectrequiredfalseEXPAND BODY
namestringrequired3maxLength: 1000pattern: "^.*\\S.*$"descriptionstringoptionalstart_timeintegeroptional946684800maximum: 4102444800end_timeintegeroptional946684800maximum: 4102444800statusstringrequired["active","paused"]budgetobjectrequiredfalseEXPAND BUDGET
lifetime_spend_limit_microsintegeroptional1000000daily_spend_limit_microsintegeroptional1000000bidding_typestringoptional["impressions","clicks","conversions"]objectivestringoptional["reach","clicks","conversions"]billing_event_typestringoptional["impression","click"]modestringoptional["product_feed","business_agent"]product_feed_idstringoptionalbusiness_agent_idstringoptionaltargetingschemaoptionalEXPAND TARGETING
anyOf · schema 1
locationsobjectoptionalfalseEXPAND LOCATIONS
countriesarrayoptionalEXPAND COUNTRIES
Each array item
{
"type": "string"
}includearrayoptional2500EXPAND INCLUDE
Each array item
idstringrequirednamestringoptionaltypestringoptionalcountry_codestringoptionalregion_codestringoptionalexcluded_locationsobjectoptionalfalseEXPAND EXCLUDED_LOCATIONS
countriesarrayoptionalEXPAND COUNTRIES
Each array item
{
"type": "string"
}includearrayoptional2500EXPAND INCLUDE
Each array item
idstringrequirednamestringoptionaltypestringoptionalcountry_codestringoptionalregion_codestringoptionalcustom_audiencesobjectoptionalfalseEXPAND CUSTOM_AUDIENCES
idsarrayoptionalEXPAND IDS
Each array item
{
"type": "string"
}excluded_custom_audiencesobjectoptionalfalseEXPAND EXCLUDED_CUSTOM_AUDIENCES
idsarrayoptionalEXPAND IDS
Each array item
{
"type": "string"
}platformsschemaoptionalEXPAND PLATFORMS
anyOf · schema 1
includedarrayoptionalEXPAND INCLUDED
Each array item
{
"type": "string",
"enum": [
"ios_app",
"android_app",
"web"
],
"x-openai-class-name": "sofa.api.params.campaigns.CampaignPlatformParam"
}{
"properties": {
"included": {
"items": {
"type": "string",
"enum": [
"ios_app",
"android_app",
"web"
],
"x-openai-class-name": "sofa.api.params.campaigns.CampaignPlatformParam"
},
"type": "array"
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingPlatformsParams",
"additionalProperties": false
}anyOf · schema 2
See the full schema for accepted values.
{
"type": "null"
}{
"properties": {
"locations": {
"properties": {
"countries": {
"items": {
"type": "string"
},
"type": "array"
},
"include": {
"items": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"country_code": {
"type": "string"
},
"region_code": {
"type": "string"
}
},
"type": "object",
"required": [
"id"
],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationParams",
"additionalProperties": false
},
"type": "array",
"maxItems": 2500
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationsParams",
"additionalProperties": false
},
"excluded_locations": {
"properties": {
"countries": {
"items": {
"type": "string"
},
"type": "array"
},
"include": {
"items": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"country_code": {
"type": "string"
},
"region_code": {
"type": "string"
}
},
"type": "object",
"required": [
"id"
],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationParams",
"additionalProperties": false
},
"type": "array",
"maxItems": 2500
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationsParams",
"additionalProperties": false
},
"custom_audiences": {
"properties": {
"ids": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingCustomAudiencesParams",
"additionalProperties": false
},
"excluded_custom_audiences": {
"properties": {
"ids": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingCustomAudiencesParams",
"additionalProperties": false
},
"platforms": {
"anyOf": [
{
"properties": {
"included": {
"items": {
"type": "string",
"enum": [
"ios_app",
"android_app",
"web"
],
"x-openai-class-name": "sofa.api.params.campaigns.CampaignPlatformParam"
},
"type": "array"
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingPlatformsParams",
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingParams",
"additionalProperties": false
}anyOf · schema 2
See the full schema for accepted values.
{
"type": "null"
}landing_page_configurationobjectoptionalfalseEXPAND LANDING_PAGE_CONFIGURATION
query_string_templatestringoptionalconversion_event_setting_idsarrayoptionalEXPAND CONVERSION_EVENT_SETTING_IDS
Each array item
{
"type": "string"
}Full JSON Schema
{
"type": "object",
"properties": {
"account_id": {
"type": "string",
"format": "uuid",
"description": "Workspace-owned Advarde connection ID from ads_list_accounts."
},
"body": {
"properties": {
"name": {
"type": "string",
"maxLength": 1000,
"minLength": 3,
"pattern": "^.*\\S.*$"
},
"description": {
"type": "string"
},
"start_time": {
"type": "integer",
"maximum": 4102444800,
"minimum": 946684800
},
"end_time": {
"type": "integer",
"maximum": 4102444800,
"minimum": 946684800
},
"status": {
"type": "string",
"enum": [
"active",
"paused"
],
"x-openai-class-name": "sofa.api.params.common.ActivePausedStatusParam"
},
"budget": {
"properties": {
"lifetime_spend_limit_micros": {
"type": "integer",
"minimum": 1000000
},
"daily_spend_limit_micros": {
"type": "integer",
"minimum": 1000000
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.BudgetParams",
"additionalProperties": false
},
"bidding_type": {
"type": "string",
"enum": [
"impressions",
"clicks",
"conversions"
],
"x-openai-class-name": "sofa.api.params.campaigns.CampaignBiddingTypeParam"
},
"objective": {
"type": "string",
"enum": [
"reach",
"clicks",
"conversions"
],
"x-openai-class-name": "sofa.api.params.campaigns.CampaignObjectiveParam"
},
"billing_event_type": {
"type": "string",
"enum": [
"impression",
"click"
],
"x-openai-class-name": "sofa.api.params.campaigns.CampaignBillingEventTypeParam"
},
"mode": {
"type": "string",
"enum": [
"product_feed",
"business_agent"
],
"x-openai-class-name": "sofa.api.params.campaigns.CampaignModeParam"
},
"product_feed_id": {
"type": "string"
},
"business_agent_id": {
"type": "string"
},
"targeting": {
"anyOf": [
{
"properties": {
"locations": {
"properties": {
"countries": {
"items": {
"type": "string"
},
"type": "array"
},
"include": {
"items": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"country_code": {
"type": "string"
},
"region_code": {
"type": "string"
}
},
"type": "object",
"required": [
"id"
],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationParams",
"additionalProperties": false
},
"type": "array",
"maxItems": 2500
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationsParams",
"additionalProperties": false
},
"excluded_locations": {
"properties": {
"countries": {
"items": {
"type": "string"
},
"type": "array"
},
"include": {
"items": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
},
"country_code": {
"type": "string"
},
"region_code": {
"type": "string"
}
},
"type": "object",
"required": [
"id"
],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationParams",
"additionalProperties": false
},
"type": "array",
"maxItems": 2500
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingGeoLocationsParams",
"additionalProperties": false
},
"custom_audiences": {
"properties": {
"ids": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingCustomAudiencesParams",
"additionalProperties": false
},
"excluded_custom_audiences": {
"properties": {
"ids": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingCustomAudiencesParams",
"additionalProperties": false
},
"platforms": {
"anyOf": [
{
"properties": {
"included": {
"items": {
"type": "string",
"enum": [
"ios_app",
"android_app",
"web"
],
"x-openai-class-name": "sofa.api.params.campaigns.CampaignPlatformParam"
},
"type": "array"
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingPlatformsParams",
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.TargetingParams",
"additionalProperties": false
},
{
"type": "null"
}
]
},
"landing_page_configuration": {
"properties": {
"query_string_template": {
"type": "string"
}
},
"type": "object",
"required": [],
"x-openai-class-name": "sofa.api.params.campaigns.LandingPageConfigurationParams",
"additionalProperties": false
},
"conversion_event_setting_ids": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object",
"required": [
"name",
"status",
"budget"
],
"x-openai-class-name": "sofa.api.params.campaigns.CreateCampaignBody",
"additionalProperties": false
}
},
"required": [
"account_id",
"body"
],
"additionalProperties": false
}Responses
200Successful protocol response
Inspect result.isError for tool-level failures, even when the HTTP status is 200.
202Notification accepted
MCP notifications return no JSON-RPC response body.
400Invalid request
Check the JSON-RPC envelope, parameters, and protocol version.
406Not acceptable
Accept must include application/json and text/event-stream.
429Rate limited
Wait for the Retry-After interval before making another request.
401Unauthorized
A valid, unexpired MCP bearer token is required.
403Access denied
Your connection needs access to this workspace and the requested operation.