Commit f9432a3
feat: add missing AdCP protocol methods to CLI and client (#71)
* feat: add list_tools command to CLI dispatch table
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>
* feat: add missing AdCP protocol methods to client and CLI
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>
* chore: trigger CI after PR title fix
* test: add coverage for new protocol methods
- 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.
* docs: enhance docstrings for media buy and creative methods
- 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.
* docs: add comprehensive workflow examples to README
- 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.
* fix: update types for schema changes in media buy responses
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.
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0b81324 commit f9432a3
File tree
43 files changed
+768
-371
lines changed- schemas/cache
- 1.0.0
- src/adcp
- protocols
- types
- generated_poc
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
43 files changed
+768
-371
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
469 | 473 | | |
470 | 474 | | |
471 | 475 | | |
472 | 476 | | |
473 | 477 | | |
474 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
475 | 646 | | |
476 | 647 | | |
477 | 648 | | |
| |||
0 commit comments