Skip to main content
Glama

Read data source rows

datasource_query
Read-only

Reads a bounded table of dimension and metric values from a report data source to inspect events and KPIs before designing charts, using a fixed date range and returning up to 500 rows.

Instructions

Reads a bounded table of dimension and metric values from a connected report data source without saving a chart or changing the report. Use it to discover collected events and inspect KPI values before designing charts. Give an explicit fixed date range and date field; specify metric aggregation unless the field is Auto. Returns at most 500 rows, not automatic pagination. Report/page filters and viewer controls are not applied. 64-bit integer columns remain strings to preserve precision; missing totals and quality guarantees are not invented.

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": {
      "report_id": "<report_id>",
      "data_source": "<data_source>",
      "metrics": "<metrics>",
      "date_range": "<date_range>",
      "date_range_dimension": "<date_range_dimension>"
    },
    "name": "datasource_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo반환할 최대 행 수. 잘림 확인을 위해 서버에 한 행을 더 요청합니다. 자동 페이지 넘김은 없습니다.
metricsYes조회할 측정항목과 집계. 업무상의 의미는 호출자가 확인합니다.
report_idYesReport id or its Looker Studio URL.
date_rangeYes조회할 고정 기간 YYYY-MM-DD..YYYY-MM-DD. 시작일과 종료일 포함.
dimensionsNo묶어서 볼 측정기준 이름 또는 ID. GA4 이벤트 탐색은 Event name을 지정합니다.
data_sourceYesThe data source: its alias as datasource_list shows it (ds1, ds2 …), its id, or its name (case ignored). Two sources with the same name need the alias.
date_range_dimensionYes기간을 적용할 Date 또는 Date & Time 필드 이름이나 ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint=true annotation: states the 500-row ceiling, denies automatic pagination, warns that report/page filters and viewer controls are not applied, and explains that 64-bit integers return as strings to preserve precision. It also disclaims invented totals and quality guarantees, which pre-empts a likely agent misreading of the results.

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 core action and exclusion, then proceeds through constraints and caveats in a logical order with no filler sentences. It is dense and slightly terse in the final clause about totals and quality guarantees, which takes a reread to parse.

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

Completeness5/5

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

For a 7-parameter, 5-required read tool with no output schema, the description covers what comes back (row cap, truncation behavior, string-typed integers) and what context is deliberately not applied (filters, viewer controls). Nothing an agent needs to call it correctly and interpret the result is missing.

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?

Schema coverage is already 100%, so the baseline is 3; the description adds emphasis that the date range must be fixed rather than relative and that aggregation is required except for Auto metrics, which reinforces intent rather than repeating field text. It contributes modest extra meaning over the schema, mostly at the behavioral level already credited elsewhere.

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

Purpose5/5

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

Names a specific verb and resource — reads a bounded table of dimension and metric values from a connected report data source — and immediately delimits scope by stating it neither saves a chart nor changes the report. The 'report data source' framing also separates it from raw warehouse query siblings by resource type.

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

Usage Guidelines4/5

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

'Use it to discover collected events and inspect KPI values before designing charts' gives a clear use context, and the instruction to supply an explicit fixed range plus date field sets a prerequisite. It stops short of naming an alternative for the cases this tool does not fit, so no explicit when-not or sibling routing is present.

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