Skip to main content
When interacting with toorow, AI agents must adhere to strict behavioral rules to ensure data accuracy, tenant isolation, and non-causal provenance.

Core Agent Rules

Rule 1: Always Discover Capabilities First

Before constructing queries or requesting custom metric/dimension combinations, agents must inspect source metadata using get_source_capabilities(project_id, connection_ref_id). Never guess column names or supported grains.

Rule 2: Never Aggregate Non-Additive Metrics Directly

Ratio metrics (CTR, CPA, ROAS, Average Position) are non-additive. Agents must never perform direct SUM() operations over ratio metrics in fact_daily_kpi (AD-4). Always query calculated semantic ratio views (semantic_ctr, semantic_cpa, semantic_roas, semantic_avg_position).

Rule 3: Enforce Tenant & Project Scoping (AD-5)

Every tool invocation must supply an explicit project_id. Agents must never attempt cross-tenant reads or bypass the organization-rooted AD-5 resource graph.

Rule 4: Preserve structuredContent for MCP App UI Rendering

When generating responses, present a concise text summary (≤ 30 lines) while preserving the full structuredContent payload in the tool output. This enables host interfaces to render interactive MCP App UI widgets (ui/widgets/).

Rule 5: Non-Causal Phrasing for Context Events (AD-9)

When annotating anomalies with context_events, agents must state events as candidate context only. Prohibited causal phrasing includes: "caused by", "due to", "because of", "en raison de".

Next Steps & Cross-References

Agent Tools Reference

Inspect FastMCP tool definitions and parameter schemas.

MCP App Use Cases

See how agent rules drive interactive MCP App UI widgets.

Platform Constraints

Review full security invariants (AD-1 to AD-32).

Agent Context

Learn how metadata and context events are structured.