Tool reference
Attach target AI prompt
Attach a new target AI prompt (topic + location + language + LLM providers) to a campaign.
Tool name: attach_target_ai_prompt
Cost: Free - not billed, and does not draw on a plan quota.
Writes data - confirmation required
This tool creates or changes data. It is not annotated readOnlyHint, so
your MCP client prompts you before it runs, and the server asks for an
explicit confirmation describing exactly what will change. Declining cancels
the call cleanly.
Attach a new target AI prompt (topic + location + language + LLM providers) to a campaign. Kicks off prompt-query fan-out analysis; poll get_task_status with recordType=target_ai_prompts and the returned promptId.
Parameters
| Parameter | Type | Required | Notes |
|---|---|---|---|
campaignId | string (uuid) | Yes | - |
topic | string | Yes | - |
location | { id, code, isoCode, name } | Yes | DataForSEO location reference. Do NOT invent these fields - call search_reference with type="location" (e.g. query="United States") and pass one returned result object here verbatim. |
language | { id, code, isoCode, name } | Yes | DataForSEO language reference. Do NOT invent these fields - call search_reference with type="language" (e.g. query="English") and pass one returned result object here verbatim. |
llmProviderIds | (string (uuid))[] | No | Defaults to []. |
Full input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"campaignId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"topic": {
"type": "string"
},
"location": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"code": {
"type": "string"
},
"isoCode": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": ["id", "code", "isoCode", "name"],
"description": "DataForSEO location reference. Do NOT invent these fields - call search_reference with type=\"location\" (e.g. query=\"United States\") and pass one returned result object here verbatim."
},
"language": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"code": {
"type": "string"
},
"isoCode": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": ["id", "code", "isoCode", "name"],
"description": "DataForSEO language reference. Do NOT invent these fields - call search_reference with type=\"language\" (e.g. query=\"English\") and pass one returned result object here verbatim."
},
"llmProviderIds": {
"default": [],
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
}
},
"required": ["campaignId", "topic", "location", "language"]
}Response
Full output JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"promptId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"taskId": {
"type": "string"
},
"campaignId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
}
},
"required": ["promptId", "taskId", "campaignId"],
"additionalProperties": false
}