Skip to main content
Glama
flin-ga4-mcp

flin-ga4-mcp

by flin-agency

run_report

Read-onlyIdempotent

Query Google Analytics 4 data using dimensions, metrics, filters, ordering, and paging to produce custom reports within GA4 limits.

Instructions

Query GA4 (max 9 dimensions, 10 metrics, 10,000 rows per call).

Dates are inclusive: YYYY-MM-DD, today, yesterday, or NdaysAgo, in the property timezone. property_id is numeric or properties/123; omission uses GOOGLE_GA4_PROPERTY_ID. Filters use Google's FilterExpression JSON; e.g. {"filter":{"fieldName":"country","stringFilter":{"matchType":"EXACT","value":"Switzerland"}}}. order_bys uses Google OrderBy JSON, e.g. [{"metric":{"metricName":"sessions"},"desc":true}]. Use deterministic order_bys and nextOffset to page. Metrics are numeric strings, never zero-filled when absent. Keep metadata/quota when interpreting data quality and limits.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "start_date": "<start_date>",
      "end_date": "<end_date>",
      "metrics": "<metrics>"
    },
    "name": "run_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
offsetNo
accountNo
metricsYes
end_dateYes
order_bysNo
dimensionsNo
start_dateYes
property_idNo
currency_codeNo
metric_filterNo
keep_empty_rowsNo
dimension_filterNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/openWorld/non-destructive, so the description correctly spends its words on non-obvious behavior: property timezone for dates, env-var fallback for property_id, quota/metadata relevance to data quality, and the important fact that metrics are numeric strings and are not zero-filled when absent. The one flaw is referencing 'nextOffset' when the schema parameter is 'offset', a small naming mismatch that could confuse paging.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the hard caps, then proceeds in short lines each covering a distinct concern (dates, property, filters, ordering, paging, data shape). Dense but no filler; the only wasted cognitive load is the 'nextOffset' term that does not match the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is rightly omitted, and the description instead adds the data-quality caveats (quota, non-zero-filled numeric strings) an agent needs to interpret results. For a 13-parameter, high-complexity query tool the three undocumented optional parameters (keep_empty_rows, currency_code, account) are a real but bounded gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage the description carries the full burden, and it does most of it: date grammar, property_id forms and default source, FilterExpression and OrderBy JSON shapes for the filter and order_bys params, plus dimensionality and row caps for metrics/dimensions/limit. It leaves keep_empty_rows, currency_code and account entirely undefined, which is the remaining gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Query GA4') and immediately scopes it with hard limits (9 dimensions, 10 metrics, 10,000 rows per call), so an agent knows exactly what kind of report this produces. It does not, however, distinguish itself from siblings like run_realtime_report, batch_run_reports, get_summary or run_funnel_report, so the agent must infer that this is the generic custom-report path.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives procedural guidance for the call (date formats, filter syntax, deterministic order_bys for paging) but never states when to choose this over the many sibling report tools, nor any when-not conditions. Usage is implied by the generic 'custom report' framing rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.