adcp-media-buy
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAdCP Media Buy Protocol
AdCP Media Buy Protocol
This skill enables you to execute the AdCP Media Buy Protocol with sales agents. Use the standard MCP tools (, , , etc.) exposed by the connected agent.
get_productscreate_media_buysync_creatives本技能可让你与销售代理商执行AdCP Media Buy Protocol操作。使用已连接代理商提供的标准MCP工具(、、等)。
get_productscreate_media_buysync_creativesOverview
概述
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 |
Media Buy Protocol提供8项标准化任务用于管理广告活动:
| 任务 | 用途 | 响应时间 |
|---|---|---|
| 通过自然语言发现广告库存 | ~60s |
| 查看出版商可售资源 | ~1s |
| 查看创意素材规格 | ~1s |
| 创建广告活动 | 数分钟至数天 |
| 修改广告活动 | 数分钟至数天 |
| 上传创意素材资源 | 数分钟至数天 |
| 查询创意素材库 | ~1s |
| 获取投放效果数据 | ~60s |
Typical Workflow
典型工作流程
- Discover products: with a natural language brief
get_products - Review formats: to understand creative requirements
list_creative_formats - Create campaign: with selected products and budget
create_media_buy - Upload creatives: to add creative assets
sync_creatives - Monitor delivery: to track performance
get_media_buy_delivery
- 发现产品:使用自然语言描述调用
get_products - 查看格式:调用了解创意素材要求
list_creative_formats - 创建活动:结合选定产品和预算调用
create_media_buy - 上传创意素材:调用添加创意素材资源
sync_creatives - 监控投放:调用追踪投放效果
get_media_buy_delivery
Task Reference
任务参考
get_products
get_products
Discover advertising products using natural language briefs.
Request:
json
{
"brief": "Looking for premium video inventory for a tech brand targeting developers",
"brand_manifest": {
"url": "https://example.com"
},
"filters": {
"channels": ["video", "ctv"],
"budget_range": { "min": 5000, "max": 50000 }
}
}Key fields:
- (string): Natural language description of campaign requirements
brief - (object): Brand context - can be
brand_manifestor inline manifest{ "url": "https://..." } - (object, optional): Filter by channels, budget, delivery_type, format_types
filters
Response contains:
- : Array of matching products with
products,product_id,name,descriptionpricing_options - Each product includes (supported creative formats) and
format_ids(available targeting)targeting
通过自然语言描述发现广告产品。
请求:
json
{
"brief": "Looking for premium video inventory for a tech brand targeting developers",
"brand_manifest": {
"url": "https://example.com"
},
"filters": {
"channels": ["video", "ctv"],
"budget_range": { "min": 5000, "max": 50000 }
}
}关键字段:
- (字符串):广告活动需求的自然语言描述
brief - (对象):品牌上下文信息 - 可以是
brand_manifest或内联清单{ "url": "https://..." } - (对象,可选):按渠道、预算、投放类型、格式类型筛选
filters
响应包含:
- :匹配产品数组,包含
products、product_id、name、descriptionpricing_options - 每个产品包含(支持的创意素材格式)和
format_ids(可用定向选项)targeting
list_authorized_properties
list_authorized_properties
Get the list of publisher properties this agent can sell.
Request:
json
{}No parameters required.
Response contains:
- : Array of domain strings the agent is authorized to sell
publisher_domains
获取该代理商可销售的出版商资源列表。
请求:
json
{}无需参数。
响应包含:
- :代理商有权销售的域名字符串数组
publisher_domains
list_creative_formats
list_creative_formats
View supported creative specifications.
Request:
json
{
"format_types": ["video", "display"]
}Key fields:
- (array, optional): Filter to specific format categories
format_types
Response contains:
- : Array of format specifications with dimensions, requirements, and asset schemas
formats
查看支持的创意素材规格。
请求:
json
{
"format_types": ["video", "display"]
}关键字段:
- (数组,可选):筛选特定格式类别
format_types
响应包含:
- :格式规格数组,包含尺寸、要求和资源架构
formats
create_media_buy
create_media_buy
Create an advertising campaign from selected products.
Request:
json
{
"buyer_ref": "campaign-2024-q1-001",
"brand_manifest": {
"url": "https://acme.com",
"name": "Acme Corporation"
},
"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 campaign
buyer_ref - (object, required): Brand identity - URL or inline manifest
brand_manifest - (array, required): Products to purchase, each with:
packages- : Your identifier for this package
buyer_ref - : From
product_idresponseget_products - : From product's
pricing_option_idpricing_options - : Amount in dollars
budget - : Required for auction pricing
bid_price - : Additional targeting constraints
targeting_overlay - or
creative_ids: Creative assignmentscreatives
- (object, required):
start_timeor{ "type": "asap" }{ "type": "scheduled", "datetime": "..." } - (string, required): ISO 8601 datetime
end_time
Response contains:
- : The created campaign identifier
media_buy_id - : Current state (often
statusfor async approval)pending - : Created packages with their IDs
packages
从选定产品创建广告活动。
请求:
json
{
"buyer_ref": "campaign-2024-q1-001",
"brand_manifest": {
"url": "https://acme.com",
"name": "Acme Corporation"
},
"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"
}关键字段:
- (字符串,必填):你为该活动设置的唯一标识符
buyer_ref - (对象,必填):品牌身份信息 - URL或内联清单
brand_manifest - (数组,必填):要采购的产品,每个包含:
packages- :你为该套餐设置的标识符
buyer_ref - :来自
product_id响应get_products - :来自产品的
pricing_option_idpricing_options - :金额(美元)
budget - :拍卖定价时必填
bid_price - :额外定向限制
targeting_overlay - 或
creative_ids:创意素材分配creatives
- (对象,必填):
start_time或{ "type": "asap" }{ "type": "scheduled", "datetime": "..." } - (字符串,必填):ISO 8601格式的日期时间
end_time
响应包含:
- :已创建活动的标识符
media_buy_id - :当前状态(异步审批时通常为
status)pending - :已创建套餐及其ID
packages
update_media_buy
update_media_buy
Modify an existing campaign.
Request:
json
{
"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 update
media_buy_id - (object): Changes to apply - budget_change, end_time, status, targeting, etc.
updates
修改现有广告活动。
请求:
json
{
"media_buy_id": "mb_abc123",
"updates": {
"budget_change": 5000,
"end_time": "2024-04-30T23:59:59Z",
"status": "paused"
}
}关键字段:
- (字符串,必填):要修改的活动ID
media_buy_id - (对象):要应用的更改 - 预算调整、结束时间、状态、定向等
updates
sync_creatives
sync_creatives
Upload and manage creative assets.
Request:
json
{
"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 sync
creatives- : Your unique identifier
creative_id - : Object with
format_idandagent_urlfrom format specificationsid - : Asset content (video, image, html, etc.)
assets
- (object, optional): Map creative_id to package IDs
assignments - (boolean): Preview changes without applying
dry_run - (boolean): Archive creatives not in this sync
delete_missing
上传并管理创意素材资源。
请求:
json
{
"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"]
}
}关键字段:
- (数组,必填):要同步的创意素材资源
creatives- :你的唯一标识符
creative_id - :包含来自格式规格的
format_id和agent_url的对象id - :素材内容(视频、图片、HTML等)
assets
- (对象,可选):将creative_id映射到套餐ID
assignments - (布尔值):预览更改而不实际应用
dry_run - (布尔值):归档未在本次同步中包含的创意素材
delete_missing
list_creatives
list_creatives
Query the creative library with filtering.
Request:
json
{
"filters": {
"status": ["active"],
"format_types": ["video"]
},
"limit": 20
}带筛选条件查询创意素材库。
请求:
json
{
"filters": {
"status": ["active"],
"format_types": ["video"]
},
"limit": 20
}get_media_buy_delivery
get_media_buy_delivery
Retrieve performance metrics for a campaign.
Request:
json
{
"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 package
by_package - : Data points over time if granularity specified
timeseries
获取广告活动的投放效果指标。
请求:
json
{
"media_buy_id": "mb_abc123",
"granularity": "daily",
"date_range": {
"start": "2024-01-01",
"end": "2024-01-31"
}
}响应包含:
- :汇总指标(曝光量、花费、点击量等)
delivery - :按套餐细分的数据
by_package - :若指定了粒度,返回随时间变化的数据点
timeseries
Key Concepts
关键概念
Brand Manifest
品牌清单(Brand Manifest)
Brand context can be provided in two ways:
- URL reference (recommended):
json
{
"brand_manifest": {
"url": "https://brand.com"
}
}- Inline manifest:
json
{
"brand_manifest": {
"name": "Brand Name",
"url": "https://brand.com",
"tagline": "Brand tagline",
"colors": { "primary": "#FF0000" }
}
}品牌上下文信息可通过两种方式提供:
- URL引用(推荐):
json
{
"brand_manifest": {
"url": "https://brand.com"
}
}- 内联清单:
json
{
"brand_manifest": {
"name": "Brand Name",
"url": "https://brand.com",
"tagline": "Brand tagline",
"colors": { "primary": "#FF0000" }
}
}Format IDs
格式ID(Format IDs)
Creative format identifiers are structured objects:
json
{
"format_id": {
"agent_url": "https://creative.adcontextprotocol.org",
"id": "display_300x250"
}
}The specifies which creative agent defines the format. Use for standard IAB formats.
agent_urlhttps://creative.adcontextprotocol.org创意素材格式标识符为结构化对象:
json
{
"format_id": {
"agent_url": "https://creative.adcontextprotocol.org",
"id": "display_300x250"
}
}agent_urlhttps://creative.adcontextprotocol.orgPricing Options
定价选项(Pricing Options)
Products include array. Each option has:
pricing_options- : Use this in
pricing_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 in your package.
bid_price产品包含数组。每个选项包含:
pricing_options- :在
pricing_option_id中使用create_media_buy - :"cpm"、"cpm-auction"、"flat-fee"等
pricing_model - :基础价格(固定定价时)
price - :最低出价(拍卖时)
floor
拍卖定价时,需在套餐中包含。
bid_priceAsynchronous Operations
异步操作
Operations like and may require human approval. The response includes:
create_media_buysync_creatives- - Operation awaiting approval
status: "pending" - - For tracking async progress
task_id
Poll or use webhooks to check completion status.
create_media_buysync_creatives- - 操作等待审批
status: "pending" - - 用于追踪异步进度
task_id
可通过轮询或webhooks检查完成状态。
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:
json
{
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "budget must be greater than 0",
"field": "packages[0].budget"
}
]
}常见错误类型:
- 400 Bad Request:参数无效 - 检查必填字段
- 401 Unauthorized:身份验证令牌无效或缺失
- 404 Not Found:product_id、media_buy_id或creative_id无效
- 422 Validation Error:架构验证失败 - 检查字段类型
错误响应示例:
json
{
"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 effects
X-Dry-Run: true - Test products with flag
test: true - Sandbox environments
Ask the agent about testing capabilities before creating real campaigns.
为了在不产生真实交易的情况下进行测试,代理商可能支持:
- 请求头 - 预览操作无实际影响
X-Dry-Run: true - 带有标记的测试产品
test: true - 沙箱环境
创建真实活动前,可咨询代理商的测试功能。