Skip to main content
Glama

Get Metric Data

get_metric_data
Read-onlyIdempotent

Pull the time series for one fully-specified UKHSA metric. Requires all six levels (theme, sub_theme, topic, geography_type, geography, metric). Returns paginated observations {count, next, previous, results[]} where each result has date, metric_value, year, month, epiweek, sex, age, stratum, geography_code, etc. Optionally filter by year and control page_size / page. Example: infectious_disease / respiratory / COVID-19 / Nation / England / COVID-19_cases_casesByDay.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoOptional. 1-based page number for paging through results.
yearNoOptional. Filter to a single calendar year, e.g. 2024.
themeYese.g. "infectious_disease".
topicYese.g. "COVID-19".
metricYesDotted/underscored metric name, e.g. "COVID-19_cases_casesByDay".
geographyYese.g. "England".
page_sizeNoOptional. Observations per page (default 5 here, max ~365).
sub_themeYese.g. "respiratory".
geography_typeYese.g. "Nation".

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "geography": "England",
      +    "geography_type": "Nation",
      +    "metric": "COVID-19_cases_casesByDay",
      +    "sub_theme": "respiratory",
      +    "theme": "infectious_disease",
      +    "topic": "COVID-19"
      +  },
      +  {
      +    "geography": "England",
      +    "geography_type": "Nation",
      +    "metric": "COVID-19_cases_casesByDay",
      +    "page_size": 52,
      +    "sub_theme": "respiratory",
      +    "theme": "infectious_disease",
      +    "topic": "COVID-19",
      +    "year": 2024
      +  }
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already indicate read-only, open-world, idempotent, and non-destructive behavior. The description adds value by explaining pagination, return format (count, next, previous, results[]), and detailed fields per observation, which goes beyond annotations.

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?

The description is four sentences, front-loaded with purpose and requirements, followed by pagination info and an example. It is efficient but could be slightly more concise without losing clarity.

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?

Given the complexity of 9 parameters, no output schema, and the need to understand pagination and result fields, the description is complete. It explains required and optional parameters, pagination behavior, and the structure of return data.

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 coverage is 100%, so baseline is 3. The description reinforces parameter meaning via an example and mentions required levels, but does not add new semantics beyond what the schema already provides.

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 explicitly states 'Pull the time series for one fully-specified UKHSA metric', providing a specific verb and resource. It distinguishes from sibling tools like list_metrics by emphasizing the requirement of all six levels for a single metric.

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?

The description clearly states requirements (all six levels) and optional filters (year, page size), and provides an example. It does not explicitly contrast with alternative tools like list_metrics or compare_entities, but the context is well implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.