Skip to main content
Glama

Get a metric's data requirements

get_data_requirements
Read-onlyIdempotent

List the fields, datasets, source systems, grains, and example SQL a warehouse needs to compute GASP Standard metrics; filter by metric, department, or breakdown to map source data and build queries.

Instructions

What a warehouse needs to compute GASP Standard metrics: per metric, a row for each field and dataset pair the canonical formula reads with its type, whether it is staged (a cohort or prior-period comparison), source system, grain, frequency, page URL and example SQL compiled from the formula. Pass metric for one metric (resolved as in lookup_metric), department for every metric in it, both to pick between metrics that share a name and neither for every metric with a formula. breakdown names a breakdown the metric declares (get_formula lists them, e.g. 'by_plan' on MRR): the fields then include the dimension and the SQL returns one row per value. dialect (postgres, snowflake, bigquery or databricks; postgres is the default and also covers Redshift) sets the example SQL's syntax. A metric with no formula gives the reason. Use generate_query to fill the SQL from your adapter.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_data_requirements"
  }
}

Input Schema

NameRequiredDescriptionDefault
metricNoExact metric name, abbreviation, alias or formula id (e.g. 'ARR', 'Pipeline Coverage Ratio', 'CSAT')
dialectNoDialect of the example SQL: postgres (default, also Redshift), snowflake, bigquery or databricks. Any but postgres needs metric.
breakdownNoName of a breakdown the metric declares (e.g. 'by_plan' or 'by_segment' on MRR); needs metric. The requirement then covers the breakdown's query, one row per value. An unknown name lists the declared ones.
departmentNoDepartment name, case-insensitive (e.g. 'Sales', 'Engineering', 'customer success'). Alone it returns every requirement in the department; with metric it picks between metrics that share a name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds genuine edge-case behavior: 'An unknown name lists the declared ones' and 'A metric with no formula gives the reason.' It does not mention permissions, pagination or result size limits, so it stops short of 5.

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 return payload, then parameter semantics in the order an agent needs them. It is a single dense paragraph with some duplication of the schema's breakdown/dialect wording, so it is informative but not maximally tight.

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?

There is no output schema, so the description carries the burden of describing the result — which it does in detail (field/dataset pair, type, staged flag, source system, grain, frequency, URL, SQL). Combined with the explicit parameter-combination and error behaviors, an agent has everything needed to call it correctly.

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 100% and the schema already documents each parameter, yet the description still adds value: it clarifies what 'staged' means (cohort or prior-period comparison), ties metric resolution to lookup_metric, and states the no-parameter behavior (every metric with a formula), which is absent from the schema.

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?

The description gives a specific verb+resource plus a precise inventory of the returned rows: 'per metric, a row for each field and dataset pair the canonical formula reads with its type, whether it is staged, source system, grain, frequency, page URL and example SQL.' It also implicitly separates itself from siblings by referencing lookup_metric (name resolution), get_formula (breakdown names) and generate_query (filling SQL).

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?

It spells out the parameter-selection logic explicitly: 'metric for one metric... department for every metric in it, both to pick between metrics that share a name and neither for every metric with a formula.' It also names alternatives (get_formula lists breakdowns, generate_query fills the SQL for your adapter). No explicit 'don't use this for X' exclusion, which keeps it off a 5.

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