High Risk →

Run-Query

Run a single analytics query and return its results directly. Use this whenever the user requests a chart, a report, a metric, explore a behavior or root cause, or asks to "create a report". Returns results to chain queries iteratively. Only use skip_results=true when building a dashboard or you ...

Risk signalsAdmin/system-level operation

Part of the Mixpanel server.

Run-Query can trigger actions in Mixpanel, with no limits today. PolicyLayer puts allow, deny, and rate-limit rules on every call. Live in minutes.

SECURE MIXPANEL →

Free to start. No card required.

AI agents invoke Run-Query to trigger processes or run actions in Mixpanel. Execute operations can have side effects beyond the immediate call -- triggering builds, sending notifications, or starting workflows. Rate limits and argument validation are essential to prevent runaway execution.

Run-Query can trigger processes with real-world consequences. An uncontrolled agent might start dozens of builds, send mass notifications, or kick off expensive compute jobs. PolicyLayer enforces rate limits and validates arguments to keep execution within safe bounds.

Execute tools trigger processes. Rate-limit and validate arguments to prevent unintended side effects.

policy.json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "Run-Query": {
      "limits": [
        {
          "counter": "run-query_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}

See the full Mixpanel policy for all 30 tools.

Get this rule live on your own Mixpanel server in minutes. PolicyLayer enforces it on every call, before it runs.

ENFORCE ON MY MIXPANEL →

View all 30 tools →

These attack patterns abuse exactly the kind of access Run-Query gives an agent. Each links to the full case and the policy that stops it:

Browse the full MCP Attack Database →

Every attack above starts with a tool call. PolicyLayer checks each one against your policy first, so Run-Query only ever does what you allow.

SECURE MIXPANEL →

Other execute tools across the catalogue. The same approach applies to each: rate-limit and validate the arguments.

What does the Run-Query tool do? +

Run a single analytics query and return its results directly. Use this whenever the user requests a chart, a report, a metric, explore a behavior or root cause, or asks to "create a report". Returns results to chain queries iteratively. Only use skip_results=true when building a dashboard or you won't use the results. Report types: - insights: Basic report, supports different chart types, trends, and metric aggregations. - funnels: Conversion rates between sequential events within a time window. Requires at least 2 steps. - flows: Most frequent user paths to or from events. Shows steps before/after/between events as a sankey or paths chart. - retention: User engagement over time. Requires exactly 2 events: an initial action and a retention action. For very simple insights queries, use this schema as the report parameter: { "name": "string", "metrics": [ { "eventName": "string", "measurement": { "type": "basic", "math": "total | unique" } } ], "chartType": "table | line | bar", "unit": "hour | day | week | month", "dateRange": { "type": "relative", "range": { "unit": "day | week | month", "value": "integer" } } } For more elaborated queries, with multiple events, filters, breakdowns, formulas or advanced measurements you must call Get-Query-Schema(report_type: 'insights'|'funnels'|'flows'|'retention') first to see the full schema for the report parameter. Keep responses compact: prefer short date ranges (7-30 days) or coarser granularity (week/month), and avoid combining many breakdowns with fine-grained time series.. It is categorised as a Execute tool in the Mixpanel MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

How do I enforce a policy on Run-Query? +

Register the Mixpanel MCP server in PolicyLayer and add a rule for Run-Query: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Mixpanel. Nothing to install.

What risk level is Run-Query? +

Run-Query is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit Run-Query? +

Yes. Add a rate_limit block to the Run-Query rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block Run-Query completely? +

Set action: deny in the PolicyLayer policy for Run-Query. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides Run-Query? +

Run-Query is provided by the Mixpanel MCP server (@mixpanel-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

Enforce policy on every Mixpanel tool call.

Deterministic rules across all 30 Mixpanel tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.

Free to start. No card required.

4,600+ MCP servers and 31,000+ tools scanned and risk-classified.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.