### Get Products Example Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.0.0-rc.1/contributing/testable-snippets.md This example demonstrates fetching products using the test agent. Ensure the test agent is properly configured. ```javascript import { testAgent } from '@adcp/client/testing'; const products = await testAgent.getProducts({ brief: 'Premium athletic footwear with innovative cushioning', brand: { domain: 'nike.com' } }); console.log(`Found ${products.products.length} products`); ``` -------------------------------- ### Get Products Task Example Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.1.0-rc.10/accounts/overview.mdx Shows an example of using the `get_products` task with an account reference to retrieve product information relevant to a specific account. ```javascript get_products(account: {...}) ``` -------------------------------- ### Get Products Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.1.0-rc.7/media-buy/task-reference/get_products.mdx Discover available advertising products using a natural language brief and optional brand domain. This is a quick start example for using the getProducts function. ```APIDOC ## Get Products ### Description Discover available advertising products using a natural language brief and optional brand domain. This is a quick start example for using the getProducts function. ### Method POST ### Endpoint /sales/mcp ### Parameters #### Request Body - **buying_mode** (string) - Required - Specifies the buying mode, e.g., 'brief' or 'wholesale'. - **brief** (string) - Optional - A natural language description of the desired advertising campaign. - **brand** (object) - Optional - Information about the brand, including its domain. - **domain** (string) - Required - The domain of the brand. - **filters** (object) - Optional - Structured filters to refine product discovery. - **channels** (array) - Optional - List of advertising channels (e.g., ['ctv']). - **delivery_type** (string) - Optional - The type of delivery (e.g., 'guaranteed'). - **standard_formats_only** (boolean) - Optional - Flag to indicate if only standard formats are desired. ### Request Example ```json { "buying_mode": "brief", "brief": "Premium athletic footwear with innovative cushioning", "brand": { "domain": "acmecorp.com" } } ``` ### Response #### Success Response (200) - **products** (array) - A list of matched advertising products. - **name** (string) - The name of the product. - **delivery_type** (string) - The delivery type of the product. - **format_ids** (array) - A list of available format IDs for the product. - **id** (string) - The ID of the format. #### Response Example ```json { "products": [ { "name": "Example Product", "delivery_type": "guaranteed", "format_ids": [ { "id": "format1" }, { "id": "format2" } ] } ] } ``` ``` -------------------------------- ### Discovering and Refining Proposals with get_products Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.0.1/media-buy/product-discovery/media-products.mdx This example shows how to use the `get_products` method for initial product discovery based on a brief and how to refine a proposal with specific scope adjustments. ```javascript // Initial discovery get_products({ buying_mode: "brief", brief: "Swiss campaign, $50k, 50% desktop/20% mobile/30% in-app, 40% German/60% French" }) // Response includes proposal "swiss_balanced_v1" // Refine the proposal get_products({ buying_mode: "refine", refine: [ { scope: "product", product_id: "ch_desktop_de" }, { scope: "product", product_id: "ch_desktop_fr" }, { scope: "product", product_id: "ch_mobile_de" }, { scope: "product", product_id: "ch_mobile_fr" }, { scope: "product", product_id: "ch_inapp_de" }, { scope: "product", product_id: "ch_inapp_fr" }, { scope: "proposal", proposal_id: "swiss_balanced_v1", ask: "focus more on German speakers - try 60/40 instead of 40/60" } ] }) ``` -------------------------------- ### Get Signals Request Example Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.1.0-beta.3/signals/tasks/get_signals.mdx Example of a request to the Get Signals API with discovery mode set to wholesale. ```json { "$schema": "/schemas/3.1.0-beta.3/3.1.0-beta.3/signals/get-signals-request.json", "discovery_mode": "wholesale", "if_wholesale_feed_version": "v2026-05-18T08:00:00Z-acme-rev412" } ``` -------------------------------- ### Full Lifecycle Example: Discover Products (Implicit) Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.0.0/media-buy/advanced-topics/sandbox.mdx This example demonstrates discovering products using an implicit sandbox account. For explicit accounts, replace the natural key with the `account_id`. ```json // get_products { "account": { "brand": { "domain": "acme-corp.com" }, "operator": "acme-corp.com", "sandbox": true }, "brief": "CTV inventory for brand awareness" } ``` -------------------------------- ### Get Signals Request Example Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.1.0-beta.1/signals/tasks/get_signals.mdx Example of a request to the Get Signals API using wholesale discovery mode and specifying a catalog version. ```json { "$schema": "/schemas/3.1.0-beta.1/signals/get-signals-request.json", "discovery_mode": "wholesale", "if_catalog_version": "v2026-05-18T08:00:00Z-acme-rev412" } ``` -------------------------------- ### Get Signals API Response Example Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.0.1/signals/tasks/get_signals.mdx This is an example of a successful response from the Get Signals API, detailing a specific contextual signal, its properties, and deployment information across platforms. ```json { "$schema": "/schemas/3.0.1/signals/get-signals-response.json", "signals": [{ "signal_id": { "source": "catalog", "data_provider_domain": "peer39.com", "id": "peer39_luxury_auto" }, "signal_agent_segment_id": "peer39_luxury_auto", "name": "Luxury Automotive Context", "description": "Pages with luxury automotive content and high viewability", "signal_type": "marketplace", "data_provider": "Peer39", "coverage_percentage": 15, "deployments": [ { "type": "platform", "platform": "index-exchange", "account": "agency-123-ix", "is_live": true, "activation_key": { "type": "segment_id", "segment_id": "ix_agency123_peer39_lux_auto" } }, { "type": "platform", "platform": "index-exchange", "is_live": true, "activation_key": { "type": "segment_id", "segment_id": "ix_peer39_luxury_auto_gen" } }, { "type": "platform", "platform": "openx", "is_live": true, "activation_key": { "type": "segment_id", "segment_id": "ox_peer39_lux_auto_456" } }, { "type": "platform", "platform": "pubmatic", "account": "brand-456-pm", "is_live": false, "estimated_activation_duration_minutes": 60 } ], "pricing_options": [ { "pricing_option_id": "po_cpm_usd", "model": "cpm", "cpm": 2.50, "currency": "USD" } ] }] } ``` -------------------------------- ### Discover Products with Natural Language Brief (CLI) Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.0.0/media-buy/task-reference/get_products.mdx Execute the get_products task via the command-line interface using 'uvx adcp'. This example demonstrates how to specify the buying mode, brief, brand domain, and includes an option for authentication token. ```bash uvx adcp \ https://test-agent.adcontextprotocol.org/mcp \ get_products \ '{"buying_mode":"brief","brief":"Premium athletic footwear with innovative cushioning","brand":{"domain":"acmecorp.com"}}' \ --auth $ADCP_AUTH_TOKEN ``` -------------------------------- ### Full Lifecycle Example: Create Media Buy (Implicit) Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.0.0/media-buy/advanced-topics/sandbox.mdx This example shows creating a media buy using an implicit sandbox account. The seller returns simulated data without real booking. ```json // create_media_buy { "account": { "brand": { "domain": "acme-corp.com" }, "operator": "acme-corp.com", "sandbox": true }, "proposal_id": "prop_abc", "total_budget": { "amount": 50000, "currency": "USD" }, "brand": { "domain": "acme-corp.com" }, "start_time": { "start_type": "asap" }, "end_time": "2026-04-01T00:00:00Z" } ``` -------------------------------- ### Get Signals Request Example Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/2.5.3/signals/tasks/get_signals.mdx Example of a request to the get_signals task, specifying signal descriptions and deployment targets. ```json { "signal_spec": "User interests in sustainable fashion", "deliver_to": { "deployments": [ { "type": "platform", "platform": "the-trade-desk", "account": "12345" }, { "type": "agent", "agent_url": "https://sales.example.com/api/v1/agents/abcde" } ], "countries": ["US", "CA"] }, "filters": { "max_cpm": 5.50, "data_providers": ["Acme Data", "Beta Analytics"] }, "max_results": 10 } ``` -------------------------------- ### Podcast Installment with Deadlines Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.0.0/media-buy/product-discovery/collections-and-installments.mdx Example JSON payload for a podcast installment, including booking, cancellation, and material submission deadlines. ```json { "installment_id": "ep47", "name": "The future of autonomous supply chains", "scheduled_at": "2026-04-07T10:00:00Z", "status": "scheduled", "guest_talent": [ { "role": "guest", "name": "Kai Tanaka" } ], "deadlines": { "booking_deadline": "2026-03-28T17:00:00Z", "cancellation_deadline": "2026-03-31T17:00:00Z", "material_deadlines": [ { "stage": "draft", "due_at": "2026-04-01T17:00:00Z", "label": "Talking points and brand guidelines for host read" }, { "stage": "final", "due_at": "2026-04-04T17:00:00Z", "label": "Approved script" } ] } } ``` -------------------------------- ### Build Version Examples Source: https://github.com/adcontextprotocol/adcp/blob/main/specs/version-negotiation.md Illustrates valid examples of `build_version` strings, including the minimum required format, pre-release versions, and versions with build metadata. ```plaintext - "3.1.2" — minimum - "3.1.0-beta.3" — pre-release - "3.1.2+scope3.deploy.4821" — vendor build lineage - "3.1.0-beta.3+sha.a1b2c3d" — both ``` -------------------------------- ### Influencer Post Installment with Deadlines Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.0.0/media-buy/product-discovery/collections-and-installments.mdx Example JSON payload for an influencer post installment, specifying cancellation and material submission deadlines. ```json { "installment_id": "post_2026_04_10", "name": "Spring campaign post", "scheduled_at": "2026-04-10T12:00:00Z", "status": "scheduled", "deadlines": { "cancellation_deadline": "2026-04-03T17:00:00Z", "material_deadlines": [ { "stage": "draft", "due_at": "2026-04-05T17:00:00Z", "label": "Key messages, product images, and brand guidelines" }, { "stage": "final", "due_at": "2026-04-08T17:00:00Z", "label": "Approved post content and caption" } ] } } ``` -------------------------------- ### Discover Products with Brief Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.0.14/learning/foundations/a2b-testing-your-first-agent.mdx Calls `get_products` with `buying_mode: "brief"` and a natural-language campaign description. The response contains curated products and proposals, including `proposal_id` needed for `create_media_buy`. Requires an API key, session ID, and specifies adcp major version. ```bash curl -X POST https://test-agent.adcontextprotocol.org/mcp \ -H "Content-Type: application/json" \ -H "Authorization: Bearer " \ -H "mcp-session-id: " \ -d '{ "jsonrpc": "2.0", "method": "tools/call", "params": { "name": "get_products", "arguments": { "adcp_major_version": 3, "buying_mode": "brief", "brief": "CTV campaign, adults 25-54 in the US, $50K budget, brand safety required" } }, "id": 2 }' ``` -------------------------------- ### Create Media Buy Task Reference Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/2.5.3/media-buy/media-buys/index.mdx Example of initiating a media buy using the `create_media_buy` task. This follows the discovery of products and configuration of packages. ```bash create_media_buy ``` -------------------------------- ### Example: Build and Launch Creatives Source: https://github.com/adcontextprotocol/adcp/blob/main/dist/docs/3.1.0-rc.4/intro.mdx Demonstrates how agents build creatives for different formats and how to approve and launch campaigns. ```json build_creative ``` ```json create_media_buy ```