Skip to content

Conversation

@bokelley
Copy link
Contributor

Summary

  • Adds 5 missing AdCP protocol methods to the Python CLI (all were already in the schema)
  • list_tools was implemented in the client but missing from CLI
  • preview_creative had types but wasn't exposed through CLI
  • create_media_buy, update_media_buy, build_creative were completely missing

Changes

  • Added all 5 tools to CLI TOOL_DISPATCH table with proper lazy type initialization
  • Implemented the three missing methods in ADCPClient with activity tracking
  • Added abstract method definitions to base protocol adapter
  • Implemented methods in both MCP and A2A protocol adapters
  • Fixed TaskResult.success field inconsistency (now properly set to False on errors)
  • Added comprehensive tests for list_tools dispatch and error handling

All 14 AdCP protocol tools are now fully supported in both client API and CLI.

Testing

  • All 24 existing CLI tests pass
  • New tests added for list_tools and error handling

bokelley and others added 2 commits November 20, 2025 10:01
Adds support for the list_tools protocol introspection command in the CLI.
Previously, list_tools was available as a client method but was not exposed
through the CLI tool dispatch system.

Changes:
- Add list_tools to TOOL_DISPATCH table in __main__.py
- Handle list_tools specially since it takes no parameters and returns list[str]
- Fix TaskResult success field to be False when status is FAILED
- Add comprehensive tests for list_tools dispatch and invalid tool names

Fixes issue where CLI did not expose the list_tools introspection method
that is available on the ADCPClient class.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Adds four missing AdCP protocol methods that had schemas but were not
implemented in the Python client:

- preview_creative (existed in client, now added to CLI)
- create_media_buy (new to both client and CLI)
- update_media_buy (new to both client and CLI)
- build_creative (new to both client and CLI)

Changes:
- Add missing request/response type imports to client.py
- Implement create_media_buy, update_media_buy, build_creative in ADCPClient
- Add abstract methods to base protocol adapter
- Implement methods in MCP and A2A adapters
- Add all four tools to CLI TOOL_DISPATCH table with lazy type initialization

All 14 AdCP protocol tools are now fully supported in both the client API
and CLI interface.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@bokelley bokelley changed the title Add missing AdCP protocol methods to CLI and client feat: add missing AdCP protocol methods to CLI and client Nov 20, 2025
- Add assertions for preview_creative, create_media_buy, update_media_buy, build_creative in test_all_client_methods
- Document that complex schema methods are tested separately
- Ensures all 4 new client methods are verified to exist

Addresses code review feedback on test coverage.
- Add detailed contextual descriptions for create_media_buy, update_media_buy, and build_creative
- Include comprehensive parameter explanations with field breakdowns
- Add usage examples demonstrating typical patterns
- Document response structure and expected data fields
- Explain discriminated union usage in update_media_buy

Improves developer experience by providing clear guidance on when and how to use these protocol methods.
- Add 'Workflow Examples' section demonstrating end-to-end usage
- Document complete media buy workflow (discovery → create → update)
- Document complete creative workflow (list formats → preview → build)
- Show integrated multi-agent workflow combining both
- Reorganize 'Available Tools' section to group Creative Management methods
- Include code examples with clear step-by-step comments

Makes it easier for developers to understand typical usage patterns and how different protocol methods work together in real-world scenarios.
The upstream AdCP schemas changed:
- create_media_buy_response and update_media_buy_response now use the canonical Package type instead of defining custom types
- get_signals and activate_signal changed 'destinations' field to 'deployments'
- New schema types: asset-content-type, format-category

Changes:
- Remove obsolete AffectedPackage type (replaced by canonical Package)
- Remove obsolete CreatedPackageReference alias (schema now uses full Package everywhere)
- Update type imports in stable.py, __init__.py, and aliases.py
- Regenerate types from latest schemas
- Update test data to use 'deployments' instead of 'destinations'
- Update package alias tests to reflect unified Package type

All 297 tests passing.
@bokelley bokelley merged commit f9432a3 into main Nov 20, 2025
7 checks passed
@bokelley bokelley deleted the cli-tool-naming-fix branch November 20, 2025 17:23
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