Skip to main content
Last updated: February 16, 2026

MCP Tools

When you connect Detrics to your coding agent, the following tools become available. Your agent will call these automatically based on your prompts.
Query metrics and dimensions from any connected marketing platform.Parameters:
  • platform_api — The platform identifier (e.g., facebook_ads, google_ads, shopify)
  • account_id — The platform account to query
  • metrics — Metrics to retrieve (e.g., spend, impressions, revenue)
  • dimensions — Dimensions to group by (e.g., campaign_name, date)
  • date_range — Time period for the query
  • context_id — Optional AI Context ID to use a pre-built query template
Example prompt: “What was my Meta Ads ROAS last week?”
See all platforms connected to your workspace.Returns the platform name, connection status, and number of accounts available.Example prompt: “What platforms do I have connected?”
Discover available metrics and dimensions for a specific platform.Parameters:
  • platform_api — The platform identifier
Example prompt: “What metrics are available for Shopify?”
List all accounts (ad accounts, properties, stores) for a connected platform.Parameters:
  • platform_api — The platform identifier
Example prompt: “Show me my Google Ads accounts”
List all AI Contexts available in your workspace. Contexts are pre-built query templates that simplify common reporting tasks.Example prompt: “What AI Contexts are available?”
Get the full details of a specific AI Context, including its query configuration.Parameters:
  • context_id — The context identifier
Example prompt: “Show me the details of my weekly performance context”
Initiate an OAuth flow to connect a new marketing platform to your workspace. Returns a URL to complete the authorization.Parameters:
  • platform_api — The platform to connect
Example prompt: “Connect my Pinterest Ads account”
Check whether a platform OAuth connection flow has been completed.Parameters:
  • connection_id — The connection identifier from connect_platform
Example prompt: “Did my Pinterest connection go through?”

Supported Platforms

Detrics connects to 20+ marketing, analytics, and e-commerce platforms: Advertising
  • Facebook (Meta) Ads
  • Google Ads
  • TikTok Ads
  • LinkedIn Ads
  • X (Twitter) Ads
  • Pinterest Ads
  • Bing (Microsoft) Ads
  • Mercado Ads
  • Google Display & Video 360
  • Amazon Ads
Web Analytics & Organic
  • Google Analytics 4
  • Google Search Console
  • Instagram Insights
  • Facebook Insights
  • TikTok Organic
E-commerce & Payments
  • Shopify
  • WooCommerce
  • TiendaNube (Nuvemshop)
  • Stripe
CRM & Email
  • HubSpot
  • Klaviyo

Example Prompts

Here are some real-world prompts you can try with your coding agent: Performance reporting
  • “What was my total ad spend across all platforms last month?”
  • “Compare my Google Ads and Meta Ads ROAS for the last 30 days”
  • “Show me my top 5 campaigns by conversions this week”
E-commerce
  • “What’s my Shopify revenue trend over the last 90 days?”
  • “Compare my Shopify revenue vs total ad spend this month”
Account management
  • “List all my connected platforms and their accounts”
  • “What metrics can I pull from TikTok Ads?”
Using AI Contexts
  • “What AI Contexts are available?”
  • “Run my weekly performance report context”
For the best results, we recommend this workflow:
  1. Start with list_contexts — check if there’s a pre-built AI Context for what you need
  2. Use query_marketing_data with a context_id — this uses the context’s pre-configured query settings, saving you from specifying every parameter
  3. If no context fits, use list_fields to discover available metrics and dimensions, then build your query manually