Repository navigation
feat: add get_media_buys task for operational campaign monitoring - #1162
Merged
Merged
Conversation
Adds get_media_buys tool to fill the gap between create_media_buy and get_media_buy_delivery. Agents need a fast way to check creative approval status, missing assets, and near-real-time delivery without spinning up a full batch reporting job. Key design decisions: - include_snapshot boolean (default false) gates near-real-time delivery stats; staleness_seconds tells consumers how fresh the data is - not_delivering status on snapshots signals zero delivery after a full staleness cycle, enabling automated price optimization loops - format_ids_pending surfaces missing uploads per package - creative_approvals per package (not per media buy) since approval state can differ across packages - New creative-approval-status enum for reuse in future webhook schemas - start_time/end_time on packages so agents can confirm flight is active before acting on not_delivering Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The test agent does not yet respond to get_media_buys, and @adcp/client has no getMediaBuys() method or GetMediaBuysResponseSchema. Setting testable: false until both server and client are updated. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
EmmaLouise2018
approved these changes
Feb 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
get_media_buystask: a fast (~1s) way to inspect the current state of media buys — creative approval status, missing assets, and optional near-real-time delivery snapshotscreate_media_buy(which creates campaigns) andget_media_buy_delivery(which runs batch reports with 4+ hour latency)creative-approval-statusenum for reuse in future webhook/sync schemasDesign decisions
include_snapshot: falseby default — sellers only hit entity-level platform APIs when askedstaleness_secondson each snapshot tells consumers how stale the data is (e.g., 900 for GAM entity stats, 14400 for batch-only platforms), enabling correct interpretation of zero deliverynot_deliveringdelivery status means "within flight, zero impressions for at least one staleness cycle" — not returned during warm-up; consumers should checkstart_timebefore actingformat_ids_pendingat package level surfaces exactly which formats still needsync_creativescreative_approvalsat package level (not media buy level) because same creative can have different approval state on different packagessnapshotfield rather than returning an errorChanges
static/schemas/source/media-buy/get-media-buys-request.json— new request schemastatic/schemas/source/media-buy/get-media-buys-response.json— new response schemastatic/schemas/source/enums/creative-approval-status.json— new enumdocs/media-buy/task-reference/get_media_buys.mdx— new task reference pagestatic/schemas/source/index.json— schema registry entriesdocs.json— nav entries (both current-docs sections)docs/media-buy/task-reference/index.mdx— overview table and section entries.changeset/get-media-buys-task.md— minor changesetCloses #1160
🤖 Generated with Claude Code