Skip to main content

What are AI Contexts?

An AI Context is a saved configuration that tells Claude which platforms and accounts to use by default. Instead of specifying account IDs in every prompt, you create a Context once and 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
AI Contexts are shared with all workspace members, making them useful for agencies managing multiple clients or teams with recurring reports.

Create a Context

1

Go to AI Contexts

Open app.detrics.io/mcp/contexts, or navigate to AI Agents > AI Contexts in the sidebar.
AI Contexts page showing a list of saved contexts with platform icons and account counts
2

Click + New Context

Click the green + New Context button in the top right corner.
AI Contexts page with the New Context button highlighted
3

Name your Context

Give it a descriptive name that Claude can understand in natural language.Good names:
  • “Weekly performance report”
  • “Client A - Meta Ads”
  • “All e-commerce accounts”
  • “Detrics Traffic”
Avoid generic names like “Context 1” or “Test” — the clearer the name, the easier it is for your AI to match your prompts to the right context.
4

Select platforms and accounts

Choose which platform connections and accounts this Context should include. You can select multiple platforms and multiple accounts from each platform.You can add additional platforms by clicking + Add data source.
5

Save

Click Save Changes. Your Context is now available to Claude through the MCP tools.

Use Contexts in Claude

Once you have created Contexts, 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
Claude will automatically list your Contexts, select the right one, and use it to query your data.
Pair Contexts with Prompt Templates for maximum efficiency. Create a Context for each client or report, then use Prompt Templates with the “Use with Context” button to auto-fill the data scope.

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 — Claude will use the updated configuration on the next query.

MCP tools for Contexts

Claude 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.