Skip to content

docs(guides): fix create_media_buy example payload + add --protocol a2a examples#913

Merged
bokelley merged 5 commits into
mainfrom
claude/issue-911-fix-docs-create-media-buy-and-a2a-validation
Apr 25, 2026
Merged

docs(guides): fix create_media_buy example payload + add --protocol a2a examples#913
bokelley merged 5 commits into
mainfrom
claude/issue-911-fix-docs-create-media-buy-and-a2a-validation

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Closes #911

Summary

  • BUILD-AN-AGENT.md — adds a create_media_buy CLI example to the "Calling Tools" section with accurate PackageRequest shape: product_id + budget (plain number, not {amount,currency}) + pricing_option_id; brand uses {domain} discriminator; idempotency_key required. Inline schema-trap comments prevent the three most common copy-paste errors. Also updates the guide intro to forward-reference this new example.
  • VALIDATE-YOUR-AGENT.md — adds --protocol a2a variants 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

Pre-PR review

  • code-reviewer: approved after 1 fix — removed non-existent buyer_ref from PackageRequest example; clarified comment to "package-level budget". Nit noted: intro sentence could link [Calling Tools](#calling-tools) rather than "below" in prose.
  • docs-expert: pending second-pass result (first pass approved shape and anchors; second pass in flight at PR creation time).

Out of scope (noted for follow-up)


Session: https://claude.ai/code/session_01MEfTvEQZL46ufGdZ8SvkCW


Generated by Claude Code

@github-actions

github-actions Bot commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

All contributors have agreed to the IPR Policy. Thank you!
Posted by the CLA Assistant Lite bot.

@bokelley bokelley force-pushed the claude/issue-911-fix-docs-create-media-buy-and-a2a-validation branch from 608d36d to 382474e Compare April 24, 2026 19:45
bokelley and others added 5 commits April 24, 2026 19:49
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.
@bokelley bokelley force-pushed the claude/issue-911-fix-docs-create-media-buy-and-a2a-validation branch from 382474e to b5e1ad7 Compare April 24, 2026 23:56
@bokelley bokelley marked this pull request as ready for review April 25, 2026 00:00
@bokelley bokelley merged commit e2c2969 into main Apr 25, 2026
9 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.

Docs: fix BUILD-AN-AGENT example payload + add --protocol a2a examples to VALIDATE-YOUR-AGENT

1 participant