docs(guides): fix create_media_buy example payload + add --protocol a2a examples#913
Merged
bokelley merged 5 commits intoApr 25, 2026
Conversation
Contributor
|
All contributors have agreed to the IPR Policy. Thank you! |
608d36d to
382474e
Compare
Closes #911 - BUILD-AN-AGENT.md: add create_media_buy CLI calling example with schema-trap comments (budget is a plain number, brand uses {domain}, packages require buyer_ref + pricing_option_id + idempotency_key) - BUILD-AN-AGENT.md: add A2A transport (preview) subsection under HTTP Transport showing createA2AAdapter dual-mount pattern using the agentCardHandler + jsonRpcHandler surface from PR #899 - VALIDATE-YOUR-AGENT.md: add --protocol a2a variants for TL;DR commands 1 and 2 (capability check + storyboard run) - VALIDATE-YOUR-AGENT.md: add "Serving both transports" callout with cross-link to BUILD-AN-AGENT.md A2A transport section https://claude.ai/code/session_01MEfTvEQZL46ufGdZ8SvkCW
The A2A transport section added in the previous commit duplicated content already shipped in PR #899 (createA2AAdapter + a2a.mount(app)) and used the wrong agent-card path. Remove the duplicate section and update the VALIDATE-YOUR-AGENT.md cross-link to point to PR #899's canonical heading. https://claude.ai/code/session_01MEfTvEQZL46ufGdZ8SvkCW
…ref field buyer_ref is not a field on PackageRequest (confirmed against tools.generated.ts:3767). Remove it from the create_media_buy example and update the comment to list the three required package fields accurately. https://claude.ai/code/session_01MEfTvEQZL46ufGdZ8SvkCW
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous example used 'test-buy-001' (11 chars) which fails schema validation in strict mode — minLength is 16 per schemas/cache/3.0.0/media-buy/create-media-buy-request.json. Replace with a UUID v4 (the spec-recommended format) and call out the 16-char minimum in the inline trap comment.
382474e to
b5e1ad7
Compare
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.
Closes #911
Summary
create_media_buyCLI example to the "Calling Tools" section with accuratePackageRequestshape:product_id+budget(plain number, not{amount,currency}) +pricing_option_id;branduses{domain}discriminator;idempotency_keyrequired. Inline schema-trap comments prevent the three most common copy-paste errors. Also updates the guide intro to forward-reference this new example.--protocol a2avariants for commands 1 and 2 in the TL;DR block, plus a "Serving both transports (MCP + A2A)?" callout paragraph cross-linking to the A2A section added by PR feat(server): A2A transport adapter (preview) peer to MCP serve() #899.No generated files edited. Docs-only change — no changeset required per CLAUDE.md.
What was tested
PackageRequesttype atsrc/lib/types/tools.generated.ts:3767— required fields areproduct_id,budget,pricing_option_id. Nobuyer_reffield exists; removed from earlier draft.BrandReferencediscriminator:{domain}not{brand_id}againstdocs/TYPE-SUMMARY.md.createA2AAdapteris exported from@adcp/client(src/lib/index.ts:589,src/lib/server/index.ts:244,src/lib/server/a2a-adapter.ts:707) — added by PR feat(server): A2A transport adapter (preview) peer to MCP serve() #899 (42a66f3).#exposing-your-agent-over-a2a-previewmatches the PR feat(server): A2A transport adapter (preview) peer to MCP serve() #899 heading### Exposing your agent over A2A (preview)(GitHub slug algorithm: lowercase, strip parens, spaces→dashes)./.well-known/agent-card.jsonpath) was removed; PR feat(server): A2A transport adapter (preview) peer to MCP serve() #899'sa2a.mount(app)section is the single authoritative example.Pre-PR review
buyer_reffromPackageRequestexample; clarified comment to "package-level budget". Nit noted: intro sentence could link[Calling Tools](#calling-tools)rather than "below" in prose.Out of scope (noted for follow-up)
REAL-WORLD-EXAMPLES.mduses deprecated 4.xADCPMultiAgentClientAPI throughout;budgetshape there is also wrong, but fixing budget alone would mislead — the whole file needs a 5.x rewrite.Session: https://claude.ai/code/session_01MEfTvEQZL46ufGdZ8SvkCW
Generated by Claude Code