Learn-skills.dev adcp-media-buy
Execute AdCP Media Buy Protocol operations with sales agents - discover advertising products, create and manage campaigns, sync creatives, and track delivery. Use when users want to buy advertising, create media buys, interact with ad sales agents, or test advertising APIs.
git clone https://github.com/NeverSight/learn-skills.dev
T=$(mktemp -d) && git clone --depth=1 https://github.com/NeverSight/learn-skills.dev "$T" && mkdir -p ~/.claude/skills && cp -r "$T/data/skills-md/adcontextprotocol/adcp/adcp-media-buy" ~/.claude/skills/neversight-learn-skills-dev-adcp-media-buy && rm -rf "$T"
data/skills-md/adcontextprotocol/adcp/adcp-media-buy/SKILL.mdAdCP Media Buy Protocol
This skill enables you to execute the AdCP Media Buy Protocol with sales agents. Use the standard MCP tools (
get_products, create_media_buy, sync_creatives, etc.) exposed by the connected agent.
Overview
The Media Buy Protocol provides 8 standardized tasks for managing advertising campaigns:
| Task | Purpose | Response Time |
|---|---|---|
| Discover inventory using natural language | ~60s |
| See publisher properties | ~1s |
| View creative specifications | ~1s |
| Create campaigns | Minutes-Days |
| Modify campaigns | Minutes-Days |
| Upload creative assets | Minutes-Days |
| Query creative library | ~1s |
| Get performance data | ~60s |
Typical Workflow
- Discover products:
with a natural language briefget_products - Review formats:
to understand creative requirementslist_creative_formats - Create campaign:
with selected products and budgetcreate_media_buy - Upload creatives:
to add creative assetssync_creatives - Monitor delivery:
to track performanceget_media_buy_delivery
Task Reference
get_products
Discover advertising products using natural language briefs.
Request:
{ "brief": "Looking for premium video inventory for a tech brand targeting developers", "brand": { "domain": "example.com" }, "filters": { "channels": ["video", "ctv"], "budget_range": { "min": 5000, "max": 50000 } } }
Key fields:
(string): Natural language description of campaign requirementsbrief
(object): Brand identity -brand{ "domain": "acmecorp.com" }
(object, optional): Filter by channels, budget, delivery_type, format_typesfilters
Response contains:
: Array of matching products withproducts
,product_id
,name
,descriptionpricing_options- Each product includes
(supported creative formats) andformat_ids
(available targeting)targeting
list_authorized_properties
Get the list of publisher properties this agent can sell.
Request:
{}
No parameters required.
Response contains:
: Array of domain strings the agent is authorized to sellpublisher_domains
list_creative_formats
View supported creative specifications.
Request:
{ "format_types": ["video", "display"] }
Key fields:
(array, optional): Filter to specific format categoriesformat_types
Response contains:
: Array of format specifications with dimensions, requirements, and asset schemasformats
create_media_buy
Create an advertising campaign from selected products.
Request:
{ "buyer_ref": "campaign-2024-q1-001", "brand": { "domain": "acme.com" }, "packages": [ { "buyer_ref": "pkg-video-001", "product_id": "premium_video_30s", "pricing_option_id": "cpm-standard", "budget": 10000 } ], "start_time": { "type": "asap" }, "end_time": "2024-03-31T23:59:59Z" }
Key fields:
(string, required): Your unique identifier for this campaignbuyer_ref
(object, required): Brand identity -brand{ "domain": "acmecorp.com" }
(array, required): Products to purchase, each with:packages
: Your identifier for this packagebuyer_ref
: Fromproduct_id
responseget_products
: From product'spricing_option_idpricing_options
: Amount in dollarsbudget
: Required for auction pricingbid_price
: Additional targeting constraintstargeting_overlay
orcreative_ids
: Creative assignmentscreatives
(object, required):start_time
or{ "type": "asap" }{ "type": "scheduled", "datetime": "..." }
(string, required): ISO 8601 datetimeend_time
Response contains:
: The created campaign identifiermedia_buy_id
: Current state (oftenstatus
for async approval)pending
: Created packages with their IDspackages
update_media_buy
Modify an existing campaign.
Request:
{ "media_buy_id": "mb_abc123", "updates": { "budget_change": 5000, "end_time": "2024-04-30T23:59:59Z", "status": "paused" } }
Key fields:
(string, required): The campaign to updatemedia_buy_id
(object): Changes to apply - budget_change, end_time, status, targeting, etc.updates
sync_creatives
Upload and manage creative assets.
Request:
{ "creatives": [ { "creative_id": "hero_video_30s", "name": "Brand Hero Video", "format_id": { "agent_url": "https://creative.adcontextprotocol.org", "id": "video_standard_30s" }, "assets": { "video": { "url": "https://cdn.example.com/hero.mp4", "width": 1920, "height": 1080, "duration_ms": 30000 } } } ], "assignments": { "hero_video_30s": ["pkg_001", "pkg_002"] } }
Key fields:
(array, required): Creative assets to synccreatives
: Your unique identifiercreative_id
: Object withformat_id
andagent_url
from format specificationsid
: Asset content (video, image, html, etc.)assets
(object, optional): Map creative_id to package IDsassignments
(boolean): Preview changes without applyingdry_run
(boolean): Archive creatives not in this syncdelete_missing
list_creatives
Query the creative library with filtering.
Request:
{ "filters": { "status": ["active"], "format_types": ["video"] }, "limit": 20 }
get_media_buy_delivery
Retrieve performance metrics for a campaign.
Request:
{ "media_buy_id": "mb_abc123", "granularity": "daily", "date_range": { "start": "2024-01-01", "end": "2024-01-31" } }
Response contains:
: Aggregated metrics (impressions, spend, clicks, etc.)delivery
: Breakdown by packageby_package
: Data points over time if granularity specifiedtimeseries
Key Concepts
Brand identity
Brand context is provided by domain reference:
{ "brand": { "domain": "acmecorp.com" } }
The agent resolves the domain to retrieve the brand's identity (name, colors, guidelines, etc.) from its
brand.json file.
Format IDs
Creative format identifiers are structured objects:
{ "format_id": { "agent_url": "https://creative.adcontextprotocol.org", "id": "display_300x250" } }
The
agent_url specifies which creative agent defines the format. Use https://creative.adcontextprotocol.org for standard IAB formats.
Pricing Options
Products include
pricing_options array. Each option has:
: Use this inpricing_option_idcreate_media_buy
: "cpm", "cpm-auction", "flat-fee", etc.pricing_model
: Base price (for fixed pricing)price
: Minimum bid (for auction)floor
For auction pricing, include
bid_price in your package.
Asynchronous Operations
Operations like
create_media_buy and sync_creatives may require human approval. The response includes:
- Operation awaiting approvalstatus: "pending"
- For tracking async progresstask_id
Poll or use webhooks to check completion status.
Error Handling
Common error patterns:
- 400 Bad Request: Invalid parameters - check required fields
- 401 Unauthorized: Invalid or missing authentication token
- 404 Not Found: Invalid product_id, media_buy_id, or creative_id
- 422 Validation Error: Schema validation failure - check field types
Error responses include:
{ "errors": [ { "code": "VALIDATION_ERROR", "message": "budget must be greater than 0", "field": "packages[0].budget" } ] }
Testing Mode
For testing without real transactions, agents may support:
header - Preview without side effectsX-Dry-Run: true- Test products with
flagtest: true - Sandbox environments
Ask the agent about testing capabilities before creating real campaigns.