Skip to main content
Glama

d8a_run_query

Read-only

Use this to answer traffic and conversion questions with numbers: tables grouped by dimensions (e.g. sessions by source), time series (a time_bucket column), goal conversions, and period comparisons (week over week, before and after a release). Columns use exact catalog IDs. Dates are inclusive YYYY-MM-DD in the property timezone, or a preset. With compare, groups are joined with previous values and deltas; time series come back as two separate series. Deltas are observations, not proof of cause. Present columns by their label, the name the app shows. Use d8a_run_funnel for funnels and d8a_run_journeys for journeys.

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": {
      "property_id": "<property_id>",
      "columns": "<columns>"
    },
    "name": "d8a_run_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoRows per period, 1-500. Defaults to 100.
offsetNoRows to skip, for paging a single period. Not allowed with compare.
presetNoInstead of dates. last_week is the previous Sunday-Saturday.
totalsNoAlso return backend totals over every matching group (grouped metric queries only).
columnsYesDimensions to group by and metrics to compute, in output order, by exact catalog ID. A column may add a transformation, e.g. time_bucket with args [day] for a daily series. A custom event parameter column (param_number or param_string) may add an aggregation, e.g. avg, sum, median or count_distinct, to compute a metric from its values.
compareNoAlso run the same request for a comparison period: previous_period (the same number of days just before), previous_year (the same dates a year earlier) or explicit dates.
date_toNoLast day (inclusive), YYYY-MM-DD, in the property timezone.
filtersNoRow filters: the outer list is OR-ed, each inner list AND-ed.
order_byNoSort by column index. Defaults to the first metric descending, then dimensions ascending.
date_fromNoFirst day, YYYY-MM-DD, in the property timezone.
property_idYesProperty ID from d8a_list_properties.

Output Schema

NameRequiredDescriptionDefault
periodYes
resultNo
previousNo
timezoneYes
warningsYes
comparisonNo
property_idYes
totals_noteNo
generated_atYes
compare_periodNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / columns / description
      Previous value: -"Dimensions to group by and metrics to compute, in output order, by exact catalog ID. A column may add a transformation, e.g. time_bucket with args [day] for a daily series."New value: +"Dimensions to group by and metrics to compute, in output order, by exact catalog ID. A column may add a transformation, e.g. time_bucket with args [day] for a daily series. A custom event parameter column (param_number or param_string) may add an aggregation, e.g. avg, sum, median or count_distinct, to compute a metric from its values."
    • addedInput schema / properties / columns / items / properties / aggregation
      Added value: +{
      +  "description": "Only with param_number or param_string: computes a metric from the parameter values. count and count_distinct work with both; the others need param_number. Percentiles are estimated above 8192 values.",
      +  "enum": [
      +    "sum",
      +    "avg",
      +    "min",
      +    "max",
      +    "median",
      +    "p75",
      +    "p90",
      +    "p95",
      +    "p99",
      +    "count",
      +    "count_distinct"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / filters / items / items / properties / column / properties / aggregation
      Added value: +{
      +  "description": "Only with param_number or param_string: computes a metric from the parameter values. count and count_distinct work with both; the others need param_number. Percentiles are estimated above 8192 values.",
      +  "enum": [
      +    "sum",
      +    "avg",
      +    "min",
      +    "max",
      +    "median",
      +    "p75",
      +    "p90",
      +    "p95",
      +    "p99",
      +    "count",
      +    "count_distinct"
      +  ],
      +  "type": "string"
      +}
  2. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources