Skip to content

Conversation

@BaiyuScope3
Copy link
Collaborator

@BaiyuScope3 BaiyuScope3 commented Jan 8, 2026

Summary

This PR upgrades the adcp-client-python dependency to 2.18.0 and enhances the list_creative_formats tool to provide better human-readable output for LLM consumption.

Changes

1. Enhanced list_creative_formats Response

Added human-readable format details in the tool response content field
Each format now displays: name, ID, type, dimensions, description, required assets, optional assets, and supported macros
LLMs can now see full format specifications without needing structured data parsing

2. Upgraded to adcp-client-python 2.18.0

Updated dependency from adcp>=2.13.0 to adcp>=2.18.0
Migrated to new assets field (replaces deprecated assets_required)
Added create_asset() helper function returning the new Assets type
Backfill assets_required from assets for backward compatibility using get_required_assets() utility

3. Added Optional Impression Tracker Asset

Added create_impression_tracker_asset() helper for 3rd party tracking pixels
All formats (except VAST) now include an optional impression_tracker asset
VAST formats excluded as they have built-in tracking in the XML

4. Updated Server Utilities

_format_to_human_readable() now uses get_required_assets() and get_optional_assets() from adcp
Properly distinguishes between required and optional assets in output

5. Test Updates

Updated tests for PreviewRender which is now a RootModel (access via .root)
Updated tests for relaxed schema validation (additional fields now allowed)
Updated test_info_card_formats.py to verify new assets/assets_required structure

6. Bug Fix

Removed IMPRESSION_URL from COMMON_MACROS (not a universal macro)

Testing

All 256 tests pass ✅
Lint checks pass ✅

1. Test new assets discovery

image

2. Test improvement on LLM response

Before:
image
image

Now:
image

…esponse

LLMs only see the 'content' text field in MCP tool results, not the
'structured_content' field. This change includes human-readable format
details in the text content so Claude and other LLMs can see:

- Format name and ID
- Type and dimensions
- Supported macros (full list)
- Assets required
- Description

The structured_content still contains the full JSON for programmatic use.

Extracted _format_to_human_readable() helper function for reusability.
IMPRESSION_URL is not part of the universal macros specification.
@BaiyuScope3 BaiyuScope3 changed the title Fix/list formats include json in text feat: support 2.6.x adcp protocol, discover optional assets in the format Jan 8, 2026
- Upgrade adcp dependency to >=2.18.0
- Add new 'assets' field to all formats using create_asset() helper
- Add optional impression_tracker asset to all formats (except VAST)
- Backfill deprecated assets_required from assets using get_required_assets()
- Update server to use get_required_assets/get_optional_assets utilities
- Update tests for new schema (PreviewRender.root, relaxed field validation)
- Update test assertions for new assets/assets_required structure
@BaiyuScope3 BaiyuScope3 changed the title feat: support 2.6.x adcp protocol, discover optional assets in the format feat: Upgrade to adcp-client-python 2.18.0 and enhance list_creative_formats response Jan 9, 2026
@BaiyuScope3 BaiyuScope3 marked this pull request as ready for review January 9, 2026 18:31
- Replace manual assets_required iteration with get_format_assets() and get_required_assets()
- Utilities handle both new 'assets' and deprecated 'assets_required' fields automatically
@BaiyuScope3 BaiyuScope3 merged commit 0281058 into main Jan 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants