You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an MCP tool get_competitor_comparison (+ /api/mcp/competitor-comparison REST) returning competitor benchmarks and share of voice for a brand.
Why
Competitors / SOV is a core surface not on MCP. Lets clients / the assistant (#94) answer "who's gaining share of voice?" and "how do I compare to competitor X?".
Data source
tracking.ts already has getCompetitorComparison and getShareOfVoiceData. Reuse them.
Where to change (existing MCP pattern)
data.ts: getCompetitorComparisonFor(auth, { brandId, ... }) — ownership check, reuse the two functions.
server.ts: register get_competitor_comparison.
web/src/app/api/mcp/competitor-comparison/route.ts: GET, same data fn.
Acceptance criteria
Returns competitor benchmark + share-of-voice for the brand/range.
Org-ownership enforced — wrong-org → 404.
MCP tool and REST route share the same data function.
Activity
feat(mcp): expose get_competitor_comparison tool (with share of voice…