Skip to content

Conversation

@nastassiafulconis
Copy link
Collaborator

Summary

  • Update MCP response format documentation to show flat structure (task-specific fields at top level) instead of nested data wrapper
  • This aligns documentation with what @adcp/client actually expects

Context

Swivel was implementing their MCP salesagent following our docs, but their implementation didn't match what @adcp/client expects. The docs showed:

{
  "status": "completed",
  "data": {
    "products": [...]
  }
}

But @adcp/client expects:

{
  "status": "completed",
  "products": [...]
}

Changes

Files updated:

  • docs/protocols/mcp-guide.mdx - Updated response format section and examples
  • docs/protocols/core-concepts.mdx - Updated response structure and code examples
  • docs/protocols/getting-started.mdx - Updated MCP quick comparison example
  • docs/protocols/protocol-comparison.mdx - Updated all MCP response examples
  • docs/protocols/a2a-guide.mdx - Fixed incorrect response.data usage in A2A context

Key changes:

  • response.data.productsresponse.products
  • response.data.media_buy_idresponse.media_buy_id
  • response.data?.errorsresponse.errors

Note: A2A examples correctly remain with {"kind": "data", "data": {...}} inside artifact parts, which is proper A2A protocol structure.

Test plan

  • All schema validation tests pass
  • All example validation tests pass
  • Build succeeds
  • Typecheck passes

🤖 Generated with Claude Code

nastassiafulconis and others added 2 commits December 17, 2025 09:04
Update documentation to show MCP responses with task-specific fields
at the top level instead of nested inside a `data` wrapper.

This aligns docs with what @adcp/client actually expects:
- `response.products` instead of `response.data.products`
- `response.media_buy_id` instead of `response.data.media_buy_id`

Files updated:
- mcp-guide.mdx: Updated response format section and examples
- core-concepts.mdx: Updated response structure and code examples
- getting-started.mdx: Updated MCP quick comparison example
- protocol-comparison.mdx: Updated all MCP response examples
- a2a-guide.mdx: Fixed incorrect `response.data` usage in A2A context

Note: A2A examples correctly remain with `{"kind": "data", "data": {...}}`
inside artifact parts, which is proper A2A protocol structure.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nastassiafulconis nastassiafulconis requested review from bokelley and youbek and removed request for bokelley December 17, 2025 17:14
…creatives

Instead of showing raw A2A artifact parsing code, reference the
sync_creatives task reference which has proper testable examples
using @adcp/client.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

4 participants