Skip to main content
Glama

dq_check_freshness

Read-onlyIdempotent

Check data freshness and volume stability by measuring latest timestamp, lag, rows per period, empty periods, and low-volume periods to detect missing or stale loads.

Instructions

Check how recent the data is and whether volume is steady: latest timestamp, lag from now, rows per period, empty periods (missing loads) and periods with under half the median volume.

Gaps and low-volume periods are computed over the whole range; only the latest 60 periods are listed row by row. To check one segment (e.g. a single provider), use dq_run_sql with a GROUP BY.

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": {
      "table": "<table>",
      "time_column": "<time_column>"
    },
    "name": "dq_check_freshness"
  }
}

Input Schema

NameRequiredDescriptionDefault
grainNoTime bucket size.day
tableYesTable name from dq_list_sources, e.g. 'orders' or 'warehouse.main.orders'.
periodsNoHow many periods back from the latest timestamp, e.g. 720 hours = 30 days.
time_columnYesEvent or load timestamp column.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/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), so the description is free to add operational nuance, which it does: gaps and low-volume periods are computed over the whole range while only the latest 60 periods are listed row by row, and the low-volume threshold is defined as under half the median. This truncation detail is exactly the kind of behavior an agent would otherwise be surprised by; it stops short of 5 only because nothing is said about cost or runtime on very wide ranges.

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

Conciseness5/5

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

Three sentences, front-loaded with the purpose and its outputs, then the computation-vs-listing caveat, then the alternative routing. No filler and every clause carries information the agent needs.

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?

With an output schema present, the description does not need to restate return fields, and it correctly spends its words on scoping, truncation, and sibling routing instead. For a 4-parameter read-only diagnostic tool, nothing an agent needs in order to call it correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so grain, table, periods, and time_column are already documented, including the '720 hours = 30 days' example. The description adds only the indirect hint that the returned row listing caps at 60 periods independent of the periods argument, which is modest added meaning over the schema; baseline 3 is appropriate.

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?

States a specific verb and resource ('Check how recent the data is and whether volume is steady') and then enumerates the exact outputs: latest timestamp, lag from now, rows per period, empty periods, and sub-half-median periods. That level of specificity lets an agent distinguish it from dq_check_nulls, dq_check_duplicates, and dq_profile_table without opening any schema.

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?

Gives an explicit routing rule with a named alternative and the condition that selects it: for a single segment, use dq_run_sql with a GROUP BY. It does not state exclusions relative to other siblings (e.g. when dq_profile_table would be preferable), but the when-to-use context is clear enough for correct selection.

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