get_metric_data
Pack: ukhsa · Endpoint: https://gateway.pipeworx.io/ukhsa/mcp
Pull the time series for one fully-specified UKHSA metric. Requires all six levels
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
theme | string | yes | e.g. “infectious_disease”. |
sub_theme | string | yes | e.g. “respiratory”. |
topic | string | yes | e.g. “COVID-19”. |
geography_type | string | yes | e.g. “Nation”. |
geography | string | yes | e.g. “England”. |
metric | string | yes | Dotted/underscored metric name, e.g. “COVID-19_cases_casesByDay”. |
year | number | no | Optional. Filter to a single calendar year, e.g. 2024. |
page_size | number | no | Optional. Observations per page (default 5 here, max ~365). |
page | number | no | Optional. 1-based page number for paging through results. |
Example call
Arguments
{
"theme": "infectious_disease",
"sub_theme": "respiratory",
"topic": "COVID-19",
"geography_type": "Nation",
"geography": "England",
"metric": "COVID-19_cases_casesByDay"
}
curl
curl -X POST https://gateway.pipeworx.io/ukhsa/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_metric_data","arguments":{"theme":"infectious_disease","sub_theme":"respiratory","topic":"COVID-19","geography_type":"Nation","geography":"England","metric":"COVID-19_cases_casesByDay"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_metric_data', {
"theme": "infectious_disease",
"sub_theme": "respiratory",
"topic": "COVID-19",
"geography_type": "Nation",
"geography": "England",
"metric": "COVID-19_cases_casesByDay"
});
More examples
{
"theme": "infectious_disease",
"sub_theme": "respiratory",
"topic": "COVID-19",
"geography_type": "Nation",
"geography": "England",
"metric": "COVID-19_cases_casesByDay",
"year": 2024,
"page_size": 52
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"ukhsa": {
"url": "https://gateway.pipeworx.io/ukhsa/mcp"
}
}
}
See Getting Started for client-specific install steps.