Skip to main content
Last updated: February 17, 2026

What are AI Contexts?

An AI Context is a saved query configuration that tells your AI assistant which platforms and accounts to use by default. Instead of specifying platform identifiers and account IDs in every prompt, you create a Context once — then just reference it by name. Without an AI Context:
Query my Facebook Ads data for account 1234567890, show me spend and ROAS for the last 30 days
With an AI Context:
Show me my performance report for the last 30 days

How it works

When you run a query using an AI Context, Detrics automatically uses the platforms and accounts saved in that Context. Your AI assistant calls the MCP tool with your Context ID, and Detrics resolves the full query configuration. AI Contexts are stored in your Detrics workspace and shared with all workspace members, making them useful for agencies (set up once per client) or teams with recurring reports.

Creating an AI Context

1

Open AI Contexts in the web app

Go to app.detrics.io/mcp and navigate to the AI Contexts section, or go directly to app.detrics.io/mcp/contexts.
2

Create a new Context

Click New Context and give it a descriptive name — something your AI assistant can understand in natural language.Good names:
  • “Weekly performance report”
  • “Client A — Meta Ads”
  • “All e-commerce accounts”
  • “My main Google Ads account”
3

Select platforms and accounts

Choose which platform connections and accounts this Context should include. You can add multiple platforms and multiple accounts from each platform.
4

Save and use

Save your Context. It’s now available to your AI assistant through the MCP list_contexts and get_context tools.

Using Contexts in your AI assistant

Once you’ve created Contexts, you can reference them by name in your prompts:
List my available AI Contexts
Run the weekly performance report for the last 7 days
Show me the Client A Meta Ads data for this month
Your AI assistant will automatically list your Contexts, select the right one, and use it to query your data.

Managing Contexts

From app.detrics.io/mcp/contexts you can:
  • View all Contexts in your workspace
  • Edit existing Contexts to update platforms, accounts, or names
  • Delete Contexts that are no longer needed
Changes take effect immediately — your AI assistant will use the updated configuration on the next query.

MCP tools for Contexts

Your AI assistant uses these MCP tools automatically when working with Contexts:
ToolWhat it does
list_contextsLists all Contexts available in your workspace
get_contextGets the full details of a specific Context
query_marketing_data with context_idQueries data using the Context’s pre-configured settings
See Available Tools for the full tool reference.