Skip to content

feat: add attribution tools (get_top_creatives, analyze_customer_journeys, compare_attribution_models, get_recent_conversions, get_top_landing_pages)#2

Open
jshorwitz wants to merge 1 commit into
mainfrom
feat/attribution-tools
Open

feat: add attribution tools (get_top_creatives, analyze_customer_journeys, compare_attribution_models, get_recent_conversions, get_top_landing_pages)#2
jshorwitz wants to merge 1 commit into
mainfrom
feat/attribution-tools

Conversation

@jshorwitz

Copy link
Copy Markdown
Member

Summary

  • Adds five new read-only attribution analysis tools to the public @synterai/mcp-server package (v1.3.0)
  • All tools route through a new POST /api/v1/attribution backend endpoint (see companion PR in synter-media)
  • No mutations — all tools have readOnlyHint: true and only read attribution data scoped to the caller's API key

Tools:

  • get_top_creatives — cross-platform creative leaderboard by spend/conversions/clicks/CTR/ROAS, with thumbnail URLs, headlines, and CPA
  • analyze_customer_journeys — multi-touch journey analysis: sankey flow data, channel overlap (solo vs assisted), top paths, average touches to convert
  • compare_attribution_models — runs all 7 models (first/last/linear/time-decay/position/Markov/Shapley) over the same conversion-path data and shows per-channel credit deltas vs last-touch
  • get_recent_conversions — live per-account conversion feed with deterministic source attribution (platform click IDs) + UTM fallback
  • get_top_landing_pages — Synter-built LP metrics (views/CTA clicks/leads) + pixel-tracked site page metrics (views/conversions/conversion rate)

Backend dependency

Requires the companion PR in synter-media: feat/v1-attribution-api — adds POST /api/v1/attribution with API key auth that dispatches to executeAttributionTool.

Test plan

  • npm run build passes (TypeScript clean — verified locally)
  • get_top_creatives returns leaderboard rows with granularity, rows, and summary fields
  • analyze_customer_journeys returns sankey, channelOverlap, topPaths, summary stats (no raw attributionPaths)
  • compare_attribution_models returns per-channel credit for each requested model
  • get_recent_conversions returns conversion rows scoped to the API key's user
  • get_top_landing_pages returns synterPages and sitePages arrays
  • Invalid API key → 401
  • Unknown tool name → 400 with UNKNOWN_TOOL

🤖 Generated with Claude Code

…er_journeys, compare_attribution_models, get_recent_conversions, get_top_landing_pages)

Exposes five read-only attribution analysis tools that let external Claude Code
users query Synter's attribution data directly from their agentic workflows.
All five tools route through the new POST /api/v1/attribution backend endpoint
using the existing API key auth pattern.

Tools added:
- get_top_creatives: cross-platform creative leaderboard by spend/conversions/clicks/CTR/ROAS
- analyze_customer_journeys: multi-touch journey analysis with sankey flow + channel overlap
- compare_attribution_models: first/last/linear/time-decay/position/Markov/Shapley comparison
- get_recent_conversions: live per-account conversion feed with attributed source
- get_top_landing_pages: Synter LP + pixel-tracked site page performance leaderboard

Co-Authored-By: Claude Opus 4.8 (1M context) <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.

1 participant