@cyanheads/eurostat-mcp-server 0.7.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/AGENTS.md +1 -1
  2. package/CLAUDE.md +1 -1
  3. package/Dockerfile +2 -2
  4. package/README.md +28 -13
  5. package/changelog/0.8.x/0.8.0.md +30 -0
  6. package/changelog/0.8.x/0.8.1.md +11 -0
  7. package/dist/config/server-config.d.ts +2 -0
  8. package/dist/config/server-config.d.ts.map +1 -1
  9. package/dist/config/server-config.js +13 -0
  10. package/dist/config/server-config.js.map +1 -1
  11. package/dist/index.js +2 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/mcp-server/resources/definitions/eurostat-dataset.resource.d.ts.map +1 -1
  14. package/dist/mcp-server/resources/definitions/eurostat-dataset.resource.js +4 -2
  15. package/dist/mcp-server/resources/definitions/eurostat-dataset.resource.js.map +1 -1
  16. package/dist/mcp-server/tools/definitions/eurostat-browse-themes.tool.js +1 -1
  17. package/dist/mcp-server/tools/definitions/eurostat-browse-themes.tool.js.map +1 -1
  18. package/dist/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.d.ts +1 -1
  19. package/dist/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.js +4 -4
  20. package/dist/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.js.map +1 -1
  21. package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.d.ts +2 -2
  22. package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.js +4 -4
  23. package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.js.map +1 -1
  24. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.d.ts +8 -18
  25. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.d.ts.map +1 -1
  26. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.js +102 -51
  27. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.js.map +1 -1
  28. package/dist/mcp-server/tools/definitions/eurostat-get-dataset-info.tool.d.ts +3 -4
  29. package/dist/mcp-server/tools/definitions/eurostat-get-dataset-info.tool.d.ts.map +1 -1
  30. package/dist/mcp-server/tools/definitions/eurostat-get-dataset-info.tool.js +8 -9
  31. package/dist/mcp-server/tools/definitions/eurostat-get-dataset-info.tool.js.map +1 -1
  32. package/dist/mcp-server/tools/definitions/eurostat-get-dimension-values.tool.d.ts +21 -7
  33. package/dist/mcp-server/tools/definitions/eurostat-get-dimension-values.tool.d.ts.map +1 -1
  34. package/dist/mcp-server/tools/definitions/eurostat-get-dimension-values.tool.js +115 -19
  35. package/dist/mcp-server/tools/definitions/eurostat-get-dimension-values.tool.js.map +1 -1
  36. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.d.ts +3 -2
  37. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.d.ts.map +1 -1
  38. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.js +27 -10
  39. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.js.map +1 -1
  40. package/dist/mcp-server/tools/definitions/eurostat-search-datasets.tool.d.ts +2 -2
  41. package/dist/mcp-server/tools/definitions/eurostat-search-datasets.tool.d.ts.map +1 -1
  42. package/dist/mcp-server/tools/definitions/eurostat-search-datasets.tool.js +19 -6
  43. package/dist/mcp-server/tools/definitions/eurostat-search-datasets.tool.js.map +1 -1
  44. package/dist/mcp-server/tools/narrowing-advice.d.ts +22 -0
  45. package/dist/mcp-server/tools/narrowing-advice.d.ts.map +1 -0
  46. package/dist/mcp-server/tools/narrowing-advice.js +44 -0
  47. package/dist/mcp-server/tools/narrowing-advice.js.map +1 -0
  48. package/dist/services/eurostat-bulk/eurostat-bulk-service.d.ts +9 -1
  49. package/dist/services/eurostat-bulk/eurostat-bulk-service.d.ts.map +1 -1
  50. package/dist/services/eurostat-bulk/eurostat-bulk-service.js +45 -10
  51. package/dist/services/eurostat-bulk/eurostat-bulk-service.js.map +1 -1
  52. package/dist/services/eurostat-bulk/types.d.ts +5 -0
  53. package/dist/services/eurostat-bulk/types.d.ts.map +1 -1
  54. package/dist/services/eurostat-catalogue/eurostat-catalogue-service.d.ts +47 -1
  55. package/dist/services/eurostat-catalogue/eurostat-catalogue-service.d.ts.map +1 -1
  56. package/dist/services/eurostat-catalogue/eurostat-catalogue-service.js +188 -13
  57. package/dist/services/eurostat-catalogue/eurostat-catalogue-service.js.map +1 -1
  58. package/dist/services/eurostat-codelists.d.ts +20 -0
  59. package/dist/services/eurostat-codelists.d.ts.map +1 -1
  60. package/dist/services/eurostat-codelists.js +25 -0
  61. package/dist/services/eurostat-codelists.js.map +1 -1
  62. package/dist/services/eurostat-data/eurostat-data-service.d.ts +63 -8
  63. package/dist/services/eurostat-data/eurostat-data-service.d.ts.map +1 -1
  64. package/dist/services/eurostat-data/eurostat-data-service.js +228 -48
  65. package/dist/services/eurostat-data/eurostat-data-service.js.map +1 -1
  66. package/dist/services/eurostat-data/sdmx-metadata.d.ts +26 -0
  67. package/dist/services/eurostat-data/sdmx-metadata.d.ts.map +1 -1
  68. package/dist/services/eurostat-data/sdmx-metadata.js +38 -1
  69. package/dist/services/eurostat-data/sdmx-metadata.js.map +1 -1
  70. package/dist/services/eurostat-data/types.d.ts +12 -2
  71. package/dist/services/eurostat-data/types.d.ts.map +1 -1
  72. package/dist/services/eurostat-data/types.js.map +1 -1
  73. package/dist/services/eurostat-hosts.d.ts +17 -0
  74. package/dist/services/eurostat-hosts.d.ts.map +1 -0
  75. package/dist/services/eurostat-hosts.js +23 -0
  76. package/dist/services/eurostat-hosts.js.map +1 -0
  77. package/dist/services/shared-load.d.ts +16 -0
  78. package/dist/services/shared-load.d.ts.map +1 -0
  79. package/dist/services/shared-load.js +27 -0
  80. package/dist/services/shared-load.js.map +1 -0
  81. package/package.json +2 -2
  82. package/server.json +31 -3
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** @cyanheads/eurostat-mcp-server
4
- **Version:** 0.7.0
4
+ **Version:** 0.8.1
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` `^2.0.0`
package/CLAUDE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** @cyanheads/eurostat-mcp-server
4
- **Version:** 0.7.0
4
+ **Version:** 0.8.1
5
5
  **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.6`
6
6
  **Engines:** Bun ≥1.4.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` `^2.0.0`
package/Dockerfile CHANGED
@@ -14,7 +14,7 @@
14
14
  # output. A stage that compiles a native addon needs the target-arch toolchain
15
15
  # and cannot cross-compile this way — drop the flag there.
16
16
  # ==============================================================================
17
- FROM --platform=$BUILDPLATFORM oven/bun:1.4.0 AS build
17
+ FROM --platform=$BUILDPLATFORM oven/bun:1.4.2 AS build
18
18
 
19
19
  WORKDIR /usr/src/app
20
20
 
@@ -40,7 +40,7 @@ RUN bun run build
40
40
  # application. It uses a slim base image and only includes production
41
41
  # dependencies and build artifacts.
42
42
  # ==============================================================================
43
- FROM oven/bun:1.4.0-slim AS production
43
+ FROM oven/bun:1.4.2-slim AS production
44
44
 
45
45
  WORKDIR /usr/src/app
46
46
 
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.7.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/eurostat-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/eurostat-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/eurostat-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.8.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/eurostat-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/eurostat-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/eurostat-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -31,6 +31,8 @@
31
31
 
32
32
  EU statistics from the Eurostat catalogue: economy, demography, trade, health, and NUTS regional data. Search and browse the catalogue by keyword or theme, inspect dataset dimensions, then query a slice or bulk-download a whole dataset. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
33
33
 
34
+ The catalogue spans two Eurostat hosts. Most datasets come from the dissemination API; the `DS-*` collections — detailed trade by CN8, HS, SITC, BEC and CPA (Comext), and PRODCOM industrial production — come from the Comext dissemination host. Every tool routes a `DS-*` code there by its prefix, in any case, so the same calls work on both.
35
+
34
36
  ### Tools
35
37
 
36
38
  Two of the eight are listed only when the dataframe canvas is enabled (`CANVAS_PROVIDER_TYPE=duckdb`).
@@ -60,13 +62,15 @@ The same metadata is available through `eurostat_get_dataset_info` for tool-only
60
62
 
61
63
  - `query` tokens are ANDed case-insensitively across each dataset's label, theme breadcrumb, and code; `limit` 1–100 (default 20), paged by passing `nextCursor` back as `cursor`
62
64
  - Results carry `code`, `label`, `type` (`dataset` / `table`), period coverage, `obsCount`, `lastUpdated`, and `themePath`; `totalMatches` counts every match
63
- - Fails as `no_match`, or `invalid_cursor` when a cursor is reused with a different query or after the catalogue refreshes
65
+ - Searches the dissemination table of contents plus the Comext host's dataflow list, whose `DS-*` entries carry `lastUpdated` but no period coverage or `obsCount`. A collection on neither, such as the legacy PRODCOM `DS-056120`, is not disseminated and cannot be reached
66
+ - Fails as `no_match` — for a query naming such a `DS-*` code, saying the collection is not disseminated rather than suggesting a broader search — or `invalid_cursor` when a cursor is reused with a different query or after the catalogue refreshes
64
67
 
65
68
  ---
66
69
 
67
70
  ### `eurostat_browse_themes` <sub>tool</sub>
68
71
 
69
72
  - Omit `theme_code` for the top-level theme folders; pass a folder code for its immediate children
73
+ - The Comext collections sit in two folders the table of contents lacks: `ext_go_detail` (detailed trade) under `ext_go`, and `prom` (PRODCOM) under `icts`
70
74
  - Items carry `code`, `label`, `type` (`folder` / `dataset` / `table`), and `hasChildren`, with a `parentPath` breadcrumb; `otherPlacements` names other branches that file the same folder code
71
75
  - Fails as `not_found` for an unknown code, `not_a_folder` for a dataset or table code
72
76
 
@@ -75,15 +79,18 @@ The same metadata is available through `eurostat_get_dataset_info` for tool-only
75
79
  ### `eurostat_get_dataset_info` <sub>tool</sub>
76
80
 
77
81
  - One `dataset_code`; returns every dimension with `valuesCount` and up to 10 `sampleValues`, plus `timeRange`, `obsCount`, `lastUpdated`, and the ESMS `metadataUrl`
78
- - Fails as `not_found`, or a non-retryable `async_response` when Eurostat won't serve the metadata inline
82
+ - The Comext host reports no `timeRange` or `obsCount` for a `DS-*` collection, so both read as unreported. Its structure carries a label for every code, 23 MB for `DS-045409`: parsed metadata is cached per dataset for an hour, within a 64 MiB memory budget, so only the first call pays for it
83
+ - Fails as `not_found` for an unknown dataset, or `upstream_fault` when Eurostat returns a structure or content constraint the server cannot read; a failed read is not cached, so a later call downloads it afresh
79
84
 
80
85
  ---
81
86
 
82
87
  ### `eurostat_get_dimension_values` <sub>tool</sub>
83
88
 
84
- - `dataset_code` plus `dimension`; returns every dataset-available code/label pair in `values`, with `totalCount`
89
+ - `dataset_code` plus `dimension`; returns the dataset-available code/label pairs in `values`, with `totalCount`
90
+ - At most 2,000 values come back inline, in Eurostat's order. A longer list — the 37,069 CN8 codes of `DS-045409`, a daily `time` dimension, the largest airport-pair lists — is cut there, with `truncated`, `shown`, `cap`, and a `notice` saying where the rest is
85
91
  - For `geo`, `geo_level` picks a NUTS level (`aggregate`, `country` by default, `nuts1`, `nuts2`, `nuts3`)
86
- - Fails as `not_found` for an unknown dataset or dimension, `no_results` for a NUTS level with no values, `conflicting_params` for `geo_level` on any other dimension, or a non-retryable `async_response`
92
+ - `canvas_id` also stages every value, past the inline cap too, on that canvas as a `code` / `label` table (`canvasId` / `tableName` / `stagedRowCount`), to search with SQL or to label a download's code-only columns through a join; this tool never starts a canvas of its own, and ignores `canvas_id` on a deployment without one
93
+ - Fails as `not_found` for an unknown dataset or dimension, `no_results` for a NUTS level with no values, `conflicting_params` for `geo_level` on any other dimension, `upstream_fault` for a structure or content constraint the server cannot read, or `canvas_not_found` for an unknown or expired `canvas_id`
87
94
 
88
95
  ---
89
96
 
@@ -91,6 +98,7 @@ The same metadata is available through `eurostat_get_dataset_info` for tool-only
91
98
 
92
99
  - `dataset_code` plus `filters` (`{dimension_code: [values]}`, codes in any case), `geo_level`, and either `since_period` / `until_period` (`YYYY`, `YYYY-MM`, `YYYY-MM-DD`, `YYYY-Qn`, `YYYY-Sn`, `YYYY-Tn`, `YYYY-Mnn`, `YYYY-Wnn`, `YYYY-Dnnn`; extra leading zeros after the letter are dropped, so `2020-Q01` is sent as `2020-Q1`, and `YYYY-A1` is sent as `YYYY`) or `last_n_periods`, which counts back from the dataset's latest period rather than the slice's; `preview_limit` 1–500 (default 50) sets the inline row count; `lang` is `EN`, `FR`, or `DE`
93
100
  - Each observation carries code/label pairs per dimension, a nullable `value`, an OBS_FLAG `status`, and a CONF_STATUS `confStatus`; `obsCount`, `missingObsCount`, and `timeRange` cover the whole match, `truncated` is true above 5,000 observations, and `unmatchedValues` names filter values that matched nothing
101
+ - PRODCOM publishes its flag and unit indicators as text in the value itself: `:C` comes back as a null `value` with `confStatus` `C`, and anything else, such as the unit `KG`, verbatim in `valueText` with a null `value`
94
102
  - Fails as `not_found`, `no_results` (naming the filter values that matched nothing and, up to the newest 24 with a full count, the selected periods that carry no value), `invalid_dimension`, `invalid_period` (a malformed or non-existent period, or a `since_period` that starts after `until_period` ends, rejected before any request), `conflicting_params` (`geo` filter with `geo_level`, or a period range with `last_n_periods`), a non-retryable `async_response` for a query too large to serve inline, or `canvas_not_found` for an unknown or expired `canvas_id`
95
103
 
96
104
  ---
@@ -99,14 +107,16 @@ The same metadata is available through `eurostat_get_dataset_info` for tool-only
99
107
 
100
108
  - `dataset_code` plus the same `filters` map and `since_period` / `until_period` in the same period forms (no `last_n_periods`: the TSV keeps a column per period unless a range drops it); `preview_limit` 1–500 (default 50)
101
109
  - Returns `rowCount` (echoed as `totalCount`), `missingCount`, `periodRange`, and `bytesRead` for the whole download; the `EUROSTAT_BULK_MAX_BYTES` budget (default 50 MiB) stops a transfer mid-stream and returns what arrived with `budgetExceeded: true`
102
- - Fails as `not_found`, `invalid_dimension` (including a range wholly outside the dataset's coverage), `invalid_period` (a malformed or non-existent period, or a `since_period` that starts after `until_period` ends, rejected before any request), `filter_arity`, a non-retryable `async_queued` when Eurostat queues the extraction, `no_results` (including a range inside the dataset's coverage that misses the filtered series), `upstream_fault`, or `canvas_not_found` for an unknown or expired `canvas_id`
110
+ - On a `DS-*` table, `obs_value_text` holds a value published as text (PRODCOM's `KG`), and a PRODCOM `:C` lands in `conf_status`
111
+ - Fails as `not_found`, `invalid_dimension` (including a range wholly outside the dataset's coverage), `invalid_period` (a malformed or non-existent period, or a `since_period` that starts after `until_period` ends, rejected before any request), `filter_arity`, a non-retryable `async_queued` when Eurostat queues the extraction, a non-retryable `extraction_too_big` when Eurostat refuses it as too large (past its 5,000,000-row limit, or an unfiltered download of a large Comext collection) with the dimensions left to filter, `no_results` (including a range inside the dataset's coverage that misses the filtered series), `upstream_fault`, or `canvas_not_found` for an unknown or expired `canvas_id`
103
112
 
104
113
  ---
105
114
 
106
115
  ### `eurostat_dataframe_describe` <sub>tool</sub>
107
116
 
108
117
  - `canvas_id` from a staging response; lists each table's `name`, `rowCount`, and typed columns, plus canvas and table `expiresAt` (sliding `CANVAS_TTL_MS`, default 24h); fails as `canvas_not_found` for an unknown or expired ID, or `canvas_disabled` on a deployment without a canvas
109
- - `eurostat_query_dataset` tables carry a code and a `_label` column per dimension; `eurostat_download_dataset` tables carry codes only, plus `time`. Both share `obs_value`, `obs_flag`, `obs_flag_label`, `conf_status`, and `conf_status_label`, so they join on dimension codes and `time`
118
+ - `eurostat_query_dataset` tables carry a code and a `_label` column per dimension; `eurostat_download_dataset` tables carry codes only, plus `time`. Both share `obs_value`, `obs_flag`, `obs_flag_label`, `conf_status`, and `conf_status_label`, so they join on dimension codes and `time`; a `DS-*` table from either adds `obs_value_text`
119
+ - `eurostat_get_dimension_values` tables carry `code` and `label`: join one to a download on its dimension column (`d.geo = g.code`) to label it
110
120
 
111
121
  ---
112
122
 
@@ -129,10 +139,11 @@ Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): s
129
139
  Eurostat-specific:
130
140
 
131
141
  - The Statistics API (JSON-stat 2.0) for slices, the SDMX 2.1 TSV bulk endpoint for whole datasets at roughly half the bytes, and the catalogue TOC cached in memory for 12 hours
142
+ - The Comext host's `DS-*` collections through the same tools: detailed trade by CN8, HS, SITC, BEC and CPA, and PRODCOM. The trade flows mix annual and monthly series in one dataset, so filter `freq`; `product`, `reporter` and `partner` carry aggregates (`TOTAL`, `EU27_2020`, `EXT_EU27_2020`) that double-count when summed with their members. The Comext host serves no large collection unfiltered
132
143
  - NUTS geo-level filtering (`aggregate` / `country` / `nuts1` / `nuts2` / `nuts3`) on `eurostat_query_dataset` and `eurostat_get_dimension_values`
133
144
  - OBS_FLAG (provisional, estimated, and so on) and CONF_STATUS (confidentiality) decoded into separate fields, with the same codes from JSON-stat and the bulk TSV
134
- - Eurostat's too-large-to-serve responses (HTTP-200 async warnings, HTTP 413, SOAP queue tickets) come back as non-retryable `async_response` or `async_queued` errors with filter guidance, not timeouts
135
- - Inline rows are capped by `preview_limit` (at most 500). With `CANVAS_PROVIDER_TYPE=duckdb`, a query match above 5,000 observations, or any bulk download, is staged whole as a SQL table (`canvasId` / `tableName` / `stagedRowCount`) for the dataframe tools, and `canvas_id` stages the next result beside earlier ones for joins. The `.mcpb` bundle strips the native DuckDB binding, so SQL analytics need the npm, Docker, or from-source install
145
+ - Eurostat's too-large-to-serve responses (HTTP-200 async warnings, HTTP 413, SOAP fault 413, SOAP queue tickets) come back as non-retryable `async_response`, `extraction_too_big`, or `async_queued` errors that name the dataset's own dimensions left to filter, not timeouts
146
+ - Inline rows are capped by `preview_limit` (at most 500). With `CANVAS_PROVIDER_TYPE=duckdb`, a query match above 5,000 observations, or any bulk download, is staged whole as a SQL table (`canvasId` / `tableName` / `stagedRowCount`) for the dataframe tools, and `canvas_id` stages the next result beside earlier ones for joins — including a dimension's code/label list from `eurostat_get_dimension_values`, which labels a bulk table's codes. An empty download fails as `no_results` without creating or touching a canvas. The `.mcpb` bundle strips the native DuckDB binding, so SQL analytics need the npm, Docker, or from-source install
136
147
 
137
148
  Agent-friendly output:
138
149
 
@@ -220,7 +231,7 @@ MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
220
231
  ### Prerequisites
221
232
 
222
233
  - [Bun v1.4.0](https://bun.sh/) or higher (or Node.js v24+).
223
- - No API key: Eurostat's dissemination API is public.
234
+ - No API key: Eurostat's dissemination API and its Comext host are public.
224
235
 
225
236
  ### Installation
226
237
 
@@ -253,7 +264,9 @@ cp .env.example .env
253
264
  | Variable | Description | Default |
254
265
  |:---|:---|:---|
255
266
  | `EUROSTAT_BASE_URL` | Eurostat API base URL. | `https://ec.europa.eu/eurostat/api/dissemination` |
267
+ | `EUROSTAT_COMEXT_BASE_URL` | Comext dissemination host, which serves every `DS-*` dataset code (detailed trade and PRODCOM). | `https://ec.europa.eu/eurostat/api/comext/dissemination` |
256
268
  | `EUROSTAT_REQUEST_TIMEOUT_MS` | HTTP request timeout, in ms. | `30000` |
269
+ | `EUROSTAT_METADATA_TIMEOUT_MS` | Timeout for one dataset's SDMX dataflow structure, in ms — 23 MB, uncompressed, for `DS-045409`. | `120000` (2 min) |
257
270
  | `EUROSTAT_TOC_CACHE_TTL_MS` | Catalogue TOC cache lifetime, in ms; the first search or browse call past it refreshes the TOC. | `43200000` (12 h) |
258
271
  | `EUROSTAT_BULK_TIMEOUT_MS` | Timeout for one `eurostat_download_dataset` transfer, in ms. | `120000` (2 min) |
259
272
  | `EUROSTAT_BULK_MAX_BYTES` | Byte budget for one bulk download, counted on the decoded TSV and enforced while streaming. | `52428800` (50 MiB) |
@@ -310,11 +323,13 @@ The Dockerfile defaults to HTTP transport, stateless session mode, and logs to `
310
323
  | `src/index.ts` | `createApp()` entry point — registers tools and the resource, inits services, gates the dataframe tools on the canvas. |
311
324
  | `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). Six discovery and data tools, plus two canvas-gated dataframe tools. |
312
325
  | `src/mcp-server/resources` | Resource definitions. Dataset metadata resource. |
313
- | `src/services/eurostat-catalogue` | Catalogue service — fetches and parses the Eurostat TOC, with a TTL-bounded in-memory cache. |
314
- | `src/services/eurostat-data` | Statistics API service — SDMX metadata parsing, JSON-stat 2.0 decoding, async-response detection, canvas row source. |
326
+ | `src/services/eurostat-catalogue` | Catalogue service — fetches and parses the Eurostat TOC, merges the Comext dataflow list into it, with a TTL-bounded in-memory cache. |
327
+ | `src/services/eurostat-data` | Statistics API service — SDMX metadata parsing with a per-dataset cache, JSON-stat 2.0 decoding, async-response detection, canvas row source. |
315
328
  | `src/services/eurostat-bulk` | SDMX 2.1 TSV bulk service — streaming download, byte budget, SOAP fault mapping, canvas row source. |
316
- | `src/services/eurostat-codelists.ts` | OBS_FLAG and CONF_STATUS codelists and the measure column names both stagers write. |
329
+ | `src/services/eurostat-codelists.ts` | OBS_FLAG and CONF_STATUS codelists, the measure column names both stagers write, and the text-value decoder. |
330
+ | `src/services/eurostat-hosts.ts` | Which host serves a dataset code: `DS-*` to the Comext host, everything else to the main one. |
317
331
  | `src/services/canvas-accessor.ts` | Accessor for the optional DataCanvas and the acquire helper canvas-touching tools share. |
332
+ | `src/services/shared-load.ts` | Lets concurrent callers await one shared download, so one caller's cancellation releases only that caller. |
318
333
  | `src/config` | Server-specific environment variable parsing and validation with Zod. |
319
334
  | `tests/` | Unit and integration tests, mirroring the `src/` structure. |
320
335
 
@@ -0,0 +1,30 @@
1
+ ---
2
+ summary: "Every tool now reaches Eurostat's Comext host for the DS-* detailed-trade and PRODCOM collections, and eurostat_get_dimension_values caps inline values at 2,000 while staging the full list as a code/label table on a caller's canvas."
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.8.0 — 2026-09-25
8
+
9
+ ## Added
10
+
11
+ - **Comext `DS-*` collections on every tool** ([#46](https://github.com/cyanheads/eurostat-mcp-server/issues/46)). A dataset code starting `DS-`, in any case, is routed to the Comext dissemination host: detailed trade by CN8, HS, SITC, BEC and CPA, and PRODCOM. Comext entries report `lastUpdated` but no period coverage or observation count.
12
+ - **Comext dataflows in the catalogue** ([#46](https://github.com/cyanheads/eurostat-mcp-server/issues/46)). `eurostat_search_datasets` and `eurostat_browse_themes` merge the Comext dataflow list into the table of contents, under `ext_go_detail` (in `ext_go`) and `prom` (in `icts`); a failed Comext fetch leaves the catalogue answering from the table of contents alone.
13
+ - **`canvas_id` on `eurostat_get_dimension_values`** ([#50](https://github.com/cyanheads/eurostat-mcp-server/issues/50)) stages the dimension's whole value list as a `code` / `label` table on that canvas, returned as `canvasId` / `tableName` / `stagedRowCount`, to label a download's code columns through a join. The tool never starts a canvas; an unknown or expired `canvas_id` fails as `canvas_not_found`.
14
+ - **`valueText` on `eurostat_query_dataset` observations, and `obs_value_text` on `DS-*` staged tables** from either data tool, holding a value Eurostat published as text (PRODCOM's unit `KG`) beside a null `value` / `obs_value`. PRODCOM's `:C` decodes to `confStatus` / `conf_status` `C`.
15
+ - **`EUROSTAT_COMEXT_BASE_URL`** (default `https://ec.europa.eu/eurostat/api/comext/dissemination`) and **`EUROSTAT_METADATA_TIMEOUT_MS`** (default `120000`), the timeout for one dataset's SDMX dataflow structure: 23 MB for `DS-045409`.
16
+
17
+ ## Changed
18
+
19
+ - **Breaking: `eurostat_get_dimension_values` returns at most 2,000 values inline** ([#50](https://github.com/cyanheads/eurostat-mcp-server/issues/50)), with `truncated`, `shown`, `cap`, and a `notice` saying where the rest are; `totalCount` still counts every value. Seven main-host lists are cut: `time` on `ert_bil_eur_d`, `ert_h_eur_d` and `irt_euryld_d`, and `airp_pr` on `avia_par_uk`, `avia_par_de`, `avia_par_it` and `avia_par_es`. Pass `canvas_id` to stage the full list.
20
+ - **Breaking: `eurostat_download_dataset` maps SDMX fault 413 to non-retryable `extraction_too_big`**, not `upstream_fault`, on either host. The hint names the dataset's dimensions the request left unfiltered.
21
+ - **Breaking: `eurostat_get_dataset_info` and `eurostat_get_dimension_values` no longer declare `async_response`; both declare `upstream_fault`** ([#58](https://github.com/cyanheads/eurostat-mcp-server/issues/58)) for a structure or content constraint the server cannot read.
22
+ - **`eurostat_query_dataset`'s `async_response` hint names the dataset's own unfiltered dimensions**, and the message carries Eurostat's `EXTRACTION_TOO_BIG` label for an HTTP-413 refusal.
23
+ - **Dataset metadata is cached per dataset for an hour**, within a 64 MiB budget, so repeat `eurostat_get_dataset_info` and `eurostat_get_dimension_values` calls skip the structure download; a failed read is not cached.
24
+ - **Tool descriptions and server instructions** state where the Comext and main-host catalogues end ([#45](https://github.com/cyanheads/eurostat-mcp-server/issues/45)). A query naming a `DS-*` code on neither list, such as the legacy `DS-056120`, fails `no_match` saying the collection is not disseminated.
25
+
26
+ ## Fixed
27
+
28
+ - **A filtered `eurostat_download_dataset` no longer fails on datasets whose latest period exceeds Eurostat's 5,000,000-row extraction limit** ([#57](https://github.com/cyanheads/eurostat-mcp-server/issues/57)) (`earn_ses_annual`). Key order is read from the dataset's structure definition instead of a one-period observation request.
29
+ - **An empty `eurostat_download_dataset` fails `no_results` without creating or touching a canvas** ([#56](https://github.com/cyanheads/eurostat-mcp-server/issues/56)); it previously staged a 0-row table on a fresh or caller-supplied canvas.
30
+ - **Cancelling one catalogue or metadata call no longer aborts the shared load** other concurrent callers are waiting on.
@@ -0,0 +1,11 @@
1
+ ---
2
+ summary: "The Docker images and packageManager pin move to Bun 1.4.2."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.8.1 — 2026-09-25
8
+
9
+ ## Changed
10
+
11
+ - **Bun runtime pinned to 1.4.2**: the Docker build and production stages use `oven/bun:1.4.2` and `oven/bun:1.4.2-slim`, and `packageManager` is `bun@1.4.2` (the `engines.bun` floor stays `>=1.4.0`).
@@ -5,7 +5,9 @@
5
5
  import { z } from '@cyanheads/mcp-ts-core';
6
6
  declare const ServerConfigSchema: z.ZodObject<{
7
7
  baseUrl: z.ZodDefault<z.ZodString>;
8
+ comextBaseUrl: z.ZodDefault<z.ZodString>;
8
9
  requestTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
10
+ metadataTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
9
11
  tocCacheTtlMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
10
12
  bulkTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
11
13
  bulkMaxBytes: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB;;;;;;iBAoCtB,CAAC;AAIH,wBAAgB,eAAe,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CASpE"}
1
+ {"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB;;;;;;;;iBAmDtB,CAAC;AAIH,wBAAgB,eAAe,IAAI,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAWpE"}
@@ -10,12 +10,23 @@ const ServerConfigSchema = z.object({
10
10
  .url()
11
11
  .default('https://ec.europa.eu/eurostat/api/dissemination')
12
12
  .describe('Eurostat API base URL'),
13
+ comextBaseUrl: z
14
+ .string()
15
+ .url()
16
+ .default('https://ec.europa.eu/eurostat/api/comext/dissemination')
17
+ .describe('Base URL of the Comext dissemination host, which serves the DS-* collections (detailed trade and PRODCOM) the main host does not. Every dataset code starting "DS-", in any case, is routed here.'),
13
18
  requestTimeoutMs: z.coerce
14
19
  .number()
15
20
  .int()
16
21
  .positive()
17
22
  .default(30_000)
18
23
  .describe('HTTP request timeout in milliseconds'),
24
+ metadataTimeoutMs: z.coerce
25
+ .number()
26
+ .int()
27
+ .positive()
28
+ .default(120_000)
29
+ .describe("HTTP timeout for one dataset's SDMX dataflow structure, in milliseconds. Held separate from EUROSTAT_REQUEST_TIMEOUT_MS because the structure carries a label for every code the dataset uses: 23 MB, uncompressed, for the CN8 trade collection DS-045409. Defaults to 2 minutes."),
19
30
  tocCacheTtlMs: z.coerce
20
31
  .number()
21
32
  .int()
@@ -39,7 +50,9 @@ let _config;
39
50
  export function getServerConfig() {
40
51
  _config ??= parseEnvConfig(ServerConfigSchema, {
41
52
  baseUrl: 'EUROSTAT_BASE_URL',
53
+ comextBaseUrl: 'EUROSTAT_COMEXT_BASE_URL',
42
54
  requestTimeoutMs: 'EUROSTAT_REQUEST_TIMEOUT_MS',
55
+ metadataTimeoutMs: 'EUROSTAT_METADATA_TIMEOUT_MS',
43
56
  tocCacheTtlMs: 'EUROSTAT_TOC_CACHE_TTL_MS',
44
57
  bulkTimeoutMs: 'EUROSTAT_BULK_TIMEOUT_MS',
45
58
  bulkMaxBytes: 'EUROSTAT_BULK_MAX_BYTES',
@@ -1 +1 @@
1
- {"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,GAAG,EAAE;SACL,OAAO,CAAC,iDAAiD,CAAC;SAC1D,QAAQ,CAAC,uBAAuB,CAAC;IACpC,gBAAgB,EAAE,CAAC,CAAC,MAAM;SACvB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,OAAO,CAAC,MAAM,CAAC;SACf,QAAQ,CAAC,sCAAsC,CAAC;IACnD,aAAa,EAAE,CAAC,CAAC,MAAM;SACpB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,OAAO,CAAC,UAAU,CAAC;SACnB,QAAQ,CACP,qLAAqL,CACtL;IACH,aAAa,EAAE,CAAC,CAAC,MAAM;SACpB,MAAM,EAAE;SAC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xB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,OAAO,CAAC,OAAO,CAAC;SAChB,QAAQ,CACP,oRAAoR,CACrR;IACH,aAAa,EAAE,CAAC,CAAC,MAAM;SACpB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,OAAO,CAAC,UAAU,CAAC;SACnB,QAAQ,CACP,qLAAqL,CACtL;IACH,aAAa,EAAE,CAAC,CAAC,MAAM;SACpB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,OAAO,CAAC,OAAO,CAAC;SAChB,QAAQ,CACP,mNAAmN,CACpN;IACH,YAAY,EAAE,CAAC,CAAC,MAAM;SACnB,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,OAAO,CAAC,UAAU,CAAC;SACnB,QAAQ,CACP,0QAA0Q,CAC3Q;CACJ,CAAC,CAAC;AAEH,IAAI,OAAuD,CAAC;AAE5D,MAAM,UAAU,eAAe;IAC7B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,OAAO,EAAE,mBAAmB;QAC5B,aAAa,EAAE,0BAA0B;QACzC,gBAAgB,EAAE,6BAA6B;QAC/C,iBAAiB,EAAE,8BAA8B;QACjD,aAAa,EAAE,2BAA2B;QAC1C,aAAa,EAAE,0BAA0B;QACzC,YAAY,EAAE,yBAAyB;KACxC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/dist/index.js CHANGED
@@ -55,7 +55,8 @@ await createApp({
55
55
  instructions: `Eurostat MCP server — EU statistical data across the Eurostat catalogue.
56
56
  Workflow: eurostat_search_datasets or eurostat_browse_themes to find a dataset code → eurostat_get_dataset_info to see dimensions → eurostat_get_dimension_values to list valid filter values → eurostat_query_dataset to fetch observations.
57
57
  Apply dimension filters to keep queries small: an unfiltered query on a large dataset is slow and can return an async response error instead of data.
58
- Two paths past eurostat_query_dataset's 5,000-observation inline cap. For a slice of a dataset, keep using eurostat_query_dataset: when the match is larger than the cap and this deployment runs a dataframe canvas, the whole match is also staged as a SQL table named in the response. For a whole dataset, use eurostat_download_dataset, which reads the SDMX bulk endpoint instead — about half the bytes — and stages every observation the same way, bounded by a byte budget it reports back. Read either staged table with eurostat_dataframe_query (eurostat_dataframe_describe lists the table and column names); the two stage different column sets, since the bulk endpoint carries dimension codes with no labels.
58
+ The catalogue covers two hosts. Most datasets come from the Eurostat dissemination table of contents; the DS-* codes — detailed trade by CN8, HS, SITC, BEC and CPA, and PRODCOM — come from the Comext host, and every tool routes a DS-* code there by its prefix. Comext collections are large: filter every request (freq included, since the trade flows mix annual and monthly series), and expect eurostat_get_dimension_values to return only the first 2,000 values of a long list inline. A collection on neither host, such as the legacy DS-056120, is not disseminated.
59
+ Two paths past eurostat_query_dataset's 5,000-observation inline cap. For a slice of a dataset, keep using eurostat_query_dataset: when the match is larger than the cap and this deployment runs a dataframe canvas, the whole match is also staged as a SQL table named in the response. For a whole dataset, use eurostat_download_dataset, which reads the SDMX bulk endpoint instead — about half the bytes — and stages every observation the same way, bounded by a byte budget it reports back. Read either staged table with eurostat_dataframe_query (eurostat_dataframe_describe lists the table and column names); the two stage different column sets, since the bulk endpoint carries dimension codes with no labels. To label a download's codes, pass its canvasId to eurostat_get_dimension_values as canvas_id: the dimension's values are staged beside it as a code/label table to join on.
59
60
  The dataframe tools are not listed when the canvas is off. There, narrowing the filters is what brings a capped match into reach, and eurostat_download_dataset retains only its inline preview.`,
60
61
  landing: { requireAuth: false },
61
62
  setup(core) {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,C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"file":"eurostat-dataset.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/eurostat-dataset.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGrD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;6BAyElC,CAAC"}
1
+ {"version":3,"file":"eurostat-dataset.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/eurostat-dataset.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGrD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;6BA2ElC,CAAC"}
@@ -6,10 +6,12 @@ import { resource, z } from '@cyanheads/mcp-ts-core';
6
6
  import { getEurostatDataService } from '../../../services/eurostat-data/eurostat-data-service.js';
7
7
  export const eurostatDatasetResource = resource('eurostat://dataset/{dataset_code}', {
8
8
  name: 'eurostat-dataset-info',
9
- description: 'Dataset metadata for a Eurostat dataset — dimensions, time range, observation count, and last-updated date. Equivalent to eurostat_get_dataset_info but accessible as a resource URI for cache-injectable context.',
9
+ description: 'Dataset metadata for a Eurostat dataset — dimensions, time range, observation count, and last-updated date. Equivalent to eurostat_get_dataset_info but accessible as a resource URI for cache-injectable context. A DS-* code (detailed trade and PRODCOM) is read from the Comext dissemination host, which reports no time range or observation count.',
10
10
  mimeType: 'application/json',
11
11
  params: z.object({
12
- dataset_code: z.string().describe('Dataset code (e.g., "nama_10_gdp").'),
12
+ dataset_code: z
13
+ .string()
14
+ .describe('Dataset code (e.g., "nama_10_gdp", or "DS-045409" for a Comext collection).'),
13
15
  }),
14
16
  output: z.object({
15
17
  code: z.string().describe('Dataset code.'),
@@ -1 +1 @@
1
- {"version":3,"file":"eurostat-dataset.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/eurostat-dataset.resource.ts"],"names":[],"mappings":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ACJ,CAAC;aACD,QAAQ,CAAC,4CAA4C,CAAC,CAC1D;aACA,QAAQ,CAAC,qBAAqB,CAAC;QAClC,SAAS,EAAE,CAAC;aACT,MAAM,CAAC;YACN,KAAK,EAAE,CAAC;iBACL,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,sEAAsE,CAAC;YACnF,GAAG,EAAE,CAAC;iBACH,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,yEAAyE,CAAC;SACvF,CAAC;aACD,QAAQ,CACP,gIAAgI,CACjI;QACH,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,iHAAiH,CAClH;QACH,WAAW,EAAE,CAAC;aACX,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,mFAAmF,CACpF;QACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;KAC3F,CAAC;IAEF,OAAO,CAAC,MAAM,EAAE,GAAG;QACjB,MAAM,GAAG,GAAG,sBAAsB,EAAE,CAAC;QACrC,OAAO,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;IACtD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"eurostat-dataset.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/eurostat-dataset.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAE3F,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC,mCAAmC,EAAE;IACnF,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EACT,2VAA2V;IAC7V,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,E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AC,yEAAyE,CAAC;SACvF,CAAC;aACD,QAAQ,CACP,gIAAgI,CACjI;QACH,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,iHAAiH,CAClH;QACH,WAAW,EAAE,CAAC;aACX,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,mFAAmF,CACpF;QACH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;KAC3F,CAAC;IAEF,OAAO,CAAC,MAAM,EAAE,GAAG;QACjB,MAAM,GAAG,GAAG,sBAAsB,EAAE,CAAC;QACrC,OAAO,GAAG,CAAC,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;IACtD,CAAC;CACF,CAAC,CAAC"}
@@ -7,7 +7,7 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
7
  import { getEurostatCatalogueService } from '../../../services/eurostat-catalogue/eurostat-catalogue-service.js';
8
8
  export const eurostatBrowseThemes = tool('eurostat_browse_themes', {
9
9
  title: 'Browse Eurostat Theme Hierarchy',
10
- description: 'Navigate the Eurostat theme tree. Without theme_code returns the top-level theme folders (Economy, Population, Transport, etc.) — the practical starting points. With a theme_code returns its immediate children: subtheme folders and datasets in that branch. Use this for structured discovery when you know the domain but not the dataset code, or to drill down from a broad topic to a specific dataset. Pair with eurostat_search_datasets for keyword-based discovery.',
10
+ description: 'Navigate the Eurostat theme tree. Without theme_code returns the top-level theme folders (Economy, Population, Transport, etc.) — the practical starting points. With a theme_code returns its immediate children: subtheme folders and datasets in that branch. Use this for structured discovery when you know the domain but not the dataset code, or to drill down from a broad topic to a specific dataset. Pair with eurostat_search_datasets for keyword-based discovery. The tree is the dissemination table of contents plus the Comext host\'s DS-* collections: detailed trade under ext_go_detail (inside ext_go, "International trade in goods") and PRODCOM under prom (inside icts, "Industry, trade and services"). A collection on neither, such as the legacy PRODCOM DS-056120, is not disseminated and appears nowhere in the tree.',
11
11
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
12
12
  input: z.object({
13
13
  theme_code: z
@@ -1 +1 @@
1
- {"version":3,"file":"eurostat-browse-themes.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-browse-themes.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAiB,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,2BAA2B,EAAE,MAAM,6DAA6D,CAAC;AAE1G,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,wBAAwB,EAAE;IACjE,KAAK,EAAE,iCAAiC;IACxC,WAAW,EACT,kdAAkd;IACpd,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,2FAA2F,CAC5F;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,KAAK,EAAE,CAAC;aACL,KAAK,CACJ,CAAC;aACE,MAAM,CAAC;YACN,IAAI,EAAE,CAAC;iBACJ,MAAM,EAAE;iBACR,QAAQ,CACP,0GAA0G,CAC3G;YACH,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;YAClD,IAAI,EAAE,CAAC;iBACJ,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;iBACpC,QAAQ,CACP,+EAA+E,CAChF;YACH,WAAW,EAAE,CAAC;iBACX,OAAO,EAAE;iBACT,QAAQ,CACP,8EAA8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,SAAS,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACnC,KAAK,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,SAAS,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,IAAI,GAAG,EAAE,CAAC,CAAC;YAChF,CAAC;YACD,IAAI,IAAI,CAAC,QAAQ,IAAI,IAAI;gBACvB,KAAK,CAAC,IAAI,CAAC,uBAAuB,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QACxE,CAAC;QACD,IAAI,MAAM,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChE,KAAK,CAAC,IAAI,CACR,gDAAgD,MAAM,CAAC,eAAe,CAAC,MAAM,gBAAgB,MAAM,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,sEAAsE,CACpR,CAAC;QACJ,CAAC;QACD,IAAI,MAAM,CAAC,QAAQ;YAAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"eurostat-browse-themes.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-browse-themes.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAiB,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C,eAAe,IAAI,MAAM,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChE,KAAK,CAAC,IAAI,CACR,gDAAgD,MAAM,CAAC,eAAe,CAAC,MAAM,gBAAgB,MAAM,CAAC,eAAe,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,sEAAsE,CACpR,CAAC;QACJ,CAAC;QACD,IAAI,MAAM,CAAC,QAAQ;YAAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;QACvE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -33,7 +33,7 @@ export declare const eurostatDataframeDescribe: import("@cyanheads/mcp-ts-core")
33
33
  readonly reason: "canvas_not_found";
34
34
  readonly code: JsonRpcErrorCode.NotFound;
35
35
  readonly when: "The canvas_id is unknown or its lifetime has elapsed.";
36
- readonly recovery: "Re-run the tool that staged it (eurostat_query_dataset or eurostat_download_dataset) and use the canvasId it returns.";
36
+ readonly recovery: "Re-run eurostat_query_dataset or eurostat_download_dataset without canvas_id and use the canvasId it returns; eurostat_get_dimension_values stages onto that canvas but never starts one.";
37
37
  readonly thrownBy: "service";
38
38
  }], {
39
39
  readonly notice: z.ZodOptional<z.ZodString>;
@@ -8,10 +8,10 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
8
8
  import { acquireCanvas, getCanvas } from '../../../services/canvas-accessor.js';
9
9
  export const eurostatDataframeDescribe = tool('eurostat_dataframe_describe', {
10
10
  title: 'Describe Eurostat Dataframes',
11
- description: 'List the tables staged on a Eurostat dataframe canvas, with their row counts and column names and types. Call this before eurostat_dataframe_query to learn the table and column names to write SQL against. The canvas_id comes from a eurostat_query_dataset or eurostat_download_dataset response that reported a staged table. Every observation column is flat, but the two stagers write different dimension columns, so read the columns reported here rather than assuming: eurostat_query_dataset gives each dimension a code column named after the dimension (e.g. "geo") plus a label companion (e.g. "geo_label"); eurostat_download_dataset gives code columns only — the bulk endpoint carries no labels — plus a "time" column. Both write the same five measure columns — obs_value, obs_flag, obs_flag_label, conf_status, conf_status_label — carrying the same codes for the same observation, so tables from the two stagers join on dimension codes and time and compare like with like.',
11
+ description: 'List the tables staged on a Eurostat dataframe canvas, with their row counts and column names and types. Call this before eurostat_dataframe_query to learn the table and column names to write SQL against. The canvas_id comes from a eurostat_query_dataset or eurostat_download_dataset response that reported a staged table. Three tools stage tables, and they write different columns, so read the columns reported here rather than assuming. The two observation stagers keep every column flat: eurostat_query_dataset gives each dimension a code column named after the dimension (e.g. "geo") plus a label companion (e.g. "geo_label"); eurostat_download_dataset gives code columns only — the bulk endpoint carries no labels — plus a "time" column. Both write the same five measure columns — obs_value, obs_flag, obs_flag_label, conf_status, conf_status_label — carrying the same codes for the same observation, so their tables join on dimension codes and time and compare like with like. A table staged from a DS-* dataset (Comext detailed trade, PRODCOM) adds obs_value_text, holding a value Eurostat published as text, such as a PRODCOM quantity unit. eurostat_get_dimension_values, given a canvas_id, stages one dimension\'s value list as two columns, code and label, which labels a download\'s code column through a join (e.g. d.geo = g.code).',
12
12
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
13
13
  input: z.object({
14
- canvas_id: CanvasIdSchema.describe('Canvas identifier returned as canvasId by eurostat_query_dataset or eurostat_download_dataset. Identifies the workspace holding the staged tables.'),
14
+ canvas_id: CanvasIdSchema.describe('Canvas identifier returned as canvasId by eurostat_query_dataset, eurostat_download_dataset, or eurostat_get_dimension_values. Identifies the workspace holding the staged tables.'),
15
15
  }),
16
16
  output: z.object({
17
17
  canvasId: z.string().describe('Canvas identifier the tables were read from.'),
@@ -61,7 +61,7 @@ export const eurostatDataframeDescribe = tool('eurostat_dataframe_describe', {
61
61
  reason: 'canvas_not_found',
62
62
  code: JsonRpcErrorCode.NotFound,
63
63
  when: 'The canvas_id is unknown or its lifetime has elapsed.',
64
- recovery: 'Re-run the tool that staged it (eurostat_query_dataset or eurostat_download_dataset) and use the canvasId it returns.',
64
+ recovery: 'Re-run eurostat_query_dataset or eurostat_download_dataset without canvas_id and use the canvasId it returns; eurostat_get_dimension_values stages onto that canvas but never starts one.',
65
65
  thrownBy: 'service',
66
66
  },
67
67
  ],
@@ -74,7 +74,7 @@ export const eurostatDataframeDescribe = tool('eurostat_dataframe_describe', {
74
74
  const tables = await instance.describe();
75
75
  ctx.log.info('Described canvas', { canvasId: instance.canvasId, tableCount: tables.length });
76
76
  if (tables.length === 0) {
77
- ctx.enrich.notice(`Canvas ${instance.canvasId} holds no tables. Staged tables expire on their own schedule — re-run eurostat_query_dataset to stage the data again.`);
77
+ ctx.enrich.notice(`Canvas ${instance.canvasId} holds no tables. Staged tables expire on their own schedule — re-run the tool that staged the data to stage it again: eurostat_query_dataset, eurostat_download_dataset, or eurostat_get_dimension_values with this canvas_id.`);
78
78
  }
79
79
  return {
80
80
  canvasId: instance.canvasId,
@@ -1 +1 @@
1
- {"version":3,"file":"eurostat-dataframe-describe.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAEzE,MAAM,CAAC,MAAM,yBAAyB,GAAG,I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AC;YACnD,KAAK,CAAC,IAAI,CAAC,aAAa,KAAK,CAAC,QAAQ,GAAG,MAAM,EAAE,CAAC,CAAC;YACnD,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;gBAChC,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,eAAe,GAAG,CAAC,QAAQ,GAAG,CAAC,CAAC;YAC1E,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"eurostat-dataframe-describe.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAEzE,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC,6BAA6B,EAAE;IAC3E,KAAK,EAAE,8BAA8B;IACrC,WAAW,EACT,g0CAAg0C;IACl0C,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;IAC/E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,cAAc,CAAC,QAAQ,CAChC,oLAAoL,CACrL;KACF,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EA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ACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -24,13 +24,13 @@ export declare const eurostatDataframeQuery: import("@cyanheads/mcp-ts-core").To
24
24
  readonly reason: "canvas_not_found";
25
25
  readonly code: JsonRpcErrorCode.NotFound;
26
26
  readonly when: "The canvas_id is unknown or its lifetime has elapsed.";
27
- readonly recovery: "Re-run the tool that staged it (eurostat_query_dataset or eurostat_download_dataset) and use the canvasId it returns.";
27
+ readonly recovery: "Re-run eurostat_query_dataset or eurostat_download_dataset without canvas_id and use the canvasId it returns; eurostat_get_dimension_values stages onto that canvas but never starts one.";
28
28
  readonly thrownBy: "service";
29
29
  }, {
30
30
  readonly reason: "missing_table";
31
31
  readonly code: JsonRpcErrorCode.NotFound;
32
32
  readonly when: "The SQL names a table that is not staged on this canvas, or that has expired.";
33
- readonly recovery: "Call eurostat_dataframe_describe for the staged table names, or re-run the tool that staged them (eurostat_query_dataset or eurostat_download_dataset).";
33
+ readonly recovery: "Call eurostat_dataframe_describe for the staged table names, or re-run the tool that staged them (eurostat_query_dataset, eurostat_download_dataset, or eurostat_get_dimension_values with canvas_id).";
34
34
  readonly thrownBy: "service";
35
35
  }], undefined>;
36
36
  //# sourceMappingURL=eurostat-dataframe-query.tool.d.ts.map
@@ -9,10 +9,10 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
9
9
  import { acquireCanvas, getCanvas } from '../../../services/canvas-accessor.js';
10
10
  export const eurostatDataframeQuery = tool('eurostat_dataframe_query', {
11
11
  title: 'Query Eurostat Dataframes',
12
- description: 'Run a read-only SQL SELECT against tables staged on a Eurostat dataframe canvas — the way to reach observations past the 5,000-row inline cap of eurostat_query_dataset and past the inline preview of a eurostat_download_dataset bulk download, and to aggregate, group, or join across staged tables without re-fetching from Eurostat. Call eurostat_dataframe_describe first for the table and column names, which differ between the two stagers. Only a single SELECT statement runs: statement chaining, non-SELECT verbs, and functions that read files or external data are rejected. Columns are flat — every dimension is a code column named after the dimension, the measure is obs_value, the observation flag is obs_flag / obs_flag_label and the confidentiality marker is conf_status / conf_status_label; a "_label" companion per dimension exists only on tables eurostat_query_dataset staged. Both stagers write the same five measure columns with the same codes, so join their tables on dimension codes and time and compare obs_flag or conf_status across them directly.',
12
+ description: 'Run a read-only SQL SELECT against tables staged on a Eurostat dataframe canvas — the way to reach observations past the 5,000-row inline cap of eurostat_query_dataset and past the inline preview of a eurostat_download_dataset bulk download, and to aggregate, group, or join across staged tables without re-fetching from Eurostat. Call eurostat_dataframe_describe first for the table and column names, which differ between the tools that stage them. Only a single SELECT statement runs: statement chaining, non-SELECT verbs, and functions that read files or external data are rejected. Columns are flat — every dimension is a code column named after the dimension, the measure is obs_value, the observation flag is obs_flag / obs_flag_label and the confidentiality marker is conf_status / conf_status_label; a "_label" companion per dimension exists only on tables eurostat_query_dataset staged. Both observation stagers write the same five measure columns with the same codes, so join their tables on dimension codes and time and compare obs_flag or conf_status across them directly; a DS-* table also carries obs_value_text, a value published as text (e.g. a PRODCOM unit "KG"). A value list eurostat_get_dimension_values staged has two columns, code and label: join it to the code column of a download (e.g. JOIN df_x g ON d.geo = g.code) to label that table.',
13
13
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
14
14
  input: z.object({
15
- canvas_id: CanvasIdSchema.describe('Canvas identifier returned as canvasId by eurostat_query_dataset or eurostat_download_dataset. Identifies the workspace holding the staged tables.'),
15
+ canvas_id: CanvasIdSchema.describe('Canvas identifier returned as canvasId by eurostat_query_dataset, eurostat_download_dataset, or eurostat_get_dimension_values. Identifies the workspace holding the staged tables.'),
16
16
  sql: z
17
17
  .string()
18
18
  .min(1)
@@ -43,14 +43,14 @@ export const eurostatDataframeQuery = tool('eurostat_dataframe_query', {
43
43
  reason: 'canvas_not_found',
44
44
  code: JsonRpcErrorCode.NotFound,
45
45
  when: 'The canvas_id is unknown or its lifetime has elapsed.',
46
- recovery: 'Re-run the tool that staged it (eurostat_query_dataset or eurostat_download_dataset) and use the canvasId it returns.',
46
+ recovery: 'Re-run eurostat_query_dataset or eurostat_download_dataset without canvas_id and use the canvasId it returns; eurostat_get_dimension_values stages onto that canvas but never starts one.',
47
47
  thrownBy: 'service',
48
48
  },
49
49
  {
50
50
  reason: 'missing_table',
51
51
  code: JsonRpcErrorCode.NotFound,
52
52
  when: 'The SQL names a table that is not staged on this canvas, or that has expired.',
53
- recovery: 'Call eurostat_dataframe_describe for the staged table names, or re-run the tool that staged them (eurostat_query_dataset or eurostat_download_dataset).',
53
+ recovery: 'Call eurostat_dataframe_describe for the staged table names, or re-run the tool that staged them (eurostat_query_dataset, eurostat_download_dataset, or eurostat_get_dimension_values with canvas_id).',
54
54
  thrownBy: 'service',
55
55
  },
56
56
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"eurostat-dataframe-query.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-dataframe-query.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAEzE,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,wiCAAwiC;IAC1iC,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;IAC/E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,cAAc,CAAC,QAAQ,CAChC,oJAAoJ,CACrJ;Q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AC,IAAI,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CACR,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAC3F,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"eurostat-dataframe-query.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-dataframe-query.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAEzE,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,o1CAAo1C;IACt1C,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;IAC/E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,SAAS,EAAE,cAAc,CAAC,QAAQ,CAChC,oLAAoL,CACrL;QACD,GAAG,EAAE,CAAC;aACH,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,kPAAkP,CACnP;KACJ,C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EAAE,CAAC,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAC3F,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -61,8 +61,15 @@ export declare const eurostatDownloadDataset: import("@cyanheads/mcp-ts-core").T
61
61
  }, {
62
62
  readonly reason: "no_results";
63
63
  readonly code: JsonRpcErrorCode.NotFound;
64
- readonly when: "The download completed but carried no populated observation cells.";
64
+ readonly when: "The download completed but carried no populated observation cells. Nothing is staged, and no canvas is created or touched.";
65
65
  readonly recovery: "Verify the filter values with eurostat_get_dimension_values and keep since_period/until_period inside the series' coverage — a combination that exists in no cell and a range that misses the series both download as an empty table.";
66
+ }, {
67
+ readonly reason: "extraction_too_big";
68
+ readonly code: JsonRpcErrorCode.ServiceUnavailable;
69
+ readonly when: "Eurostat refused the extraction as too large (SDMX faultcode 413, HTTP 413): past its 5,000,000-row extraction limit, or an unfiltered download of a large DS-* Comext collection, which Eurostat serves only filtered. Covers every dataset, on either host.";
70
+ readonly retryable: false;
71
+ readonly recovery: "Add dimension filters or a narrower since_period/until_period range to shrink the extraction; the same request fails the same way on every retry.";
72
+ readonly thrownBy: "service";
66
73
  }, {
67
74
  readonly reason: "upstream_fault";
68
75
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
@@ -85,21 +92,4 @@ export declare const eurostatDownloadDataset: import("@cyanheads/mcp-ts-core").T
85
92
  }, z.core.$strip>;
86
93
  readonly notice: z.ZodOptional<z.ZodString>;
87
94
  }>;
88
- /** Contract reasons the bulk service's classified failures map onto. */
89
- type MappedReason = 'async_queued' | 'filter_arity' | 'invalid_dimension' | 'invalid_period' | 'not_found' | 'upstream_fault';
90
- /**
91
- * Translate a service-layer failure into the tool's declared contract.
92
- *
93
- * The bulk service classifies SDMX faults into `data.reason` but throws generic
94
- * factory errors, because a service has no access to a tool's reason union.
95
- * This resolves the reason and the caller-facing recovery hint; the handler does
96
- * the throwing, so `ctx.fail` stays typed against the union rather than taking a
97
- * bare string.
98
- */
99
- export declare function mapBulkFailure(err: unknown, datasetCode: string): {
100
- hint: string;
101
- message: string;
102
- reason: MappedReason;
103
- } | undefined;
104
- export {};
105
95
  //# sourceMappingURL=eurostat-download-dataset.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eurostat-download-dataset.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-download-dataset.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAiB,MAAM,+BAA+B,CAAC;AA8BhF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoalC,CAAC;AAEH,wEAAwE;AACxE,KAAK,YAAY,GACb,cAAc,GACd,cAAc,GACd,mBAAmB,GACnB,gBAAgB,GAChB,WAAW,GACX,gBAAgB,CAAC;AAErB;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,OAAO,EACZ,WAAW,EAAE,MAAM,GAClB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,SAAS,CA2CrE"}
1
+ {"version":3,"file":"eurostat-download-dataset.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-download-dataset.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAiB,MAAM,+BAA+B,CAAC;AAqChF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2clC,CAAC"}