@cyanheads/eurostat-mcp-server 0.6.4 → 0.7.0

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 (43) hide show
  1. package/AGENTS.md +18 -14
  2. package/CLAUDE.md +18 -14
  3. package/Dockerfile +25 -6
  4. package/README.md +70 -84
  5. package/changelog/0.6.x/0.6.4.md +1 -1
  6. package/changelog/0.6.x/0.6.5.md +26 -0
  7. package/changelog/0.7.x/0.7.0.md +33 -0
  8. package/changelog/template.md +7 -7
  9. package/dist/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.d.ts +2 -1
  10. package/dist/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.d.ts.map +1 -1
  11. package/dist/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.js +4 -5
  12. package/dist/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.js.map +1 -1
  13. package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.d.ts +4 -2
  14. package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.d.ts.map +1 -1
  15. package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.js +6 -6
  16. package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.js.map +1 -1
  17. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.d.ts +15 -6
  18. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.d.ts.map +1 -1
  19. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.js +69 -25
  20. package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.js.map +1 -1
  21. package/dist/mcp-server/tools/definitions/eurostat-get-dimension-values.tool.js +1 -1
  22. package/dist/mcp-server/tools/definitions/eurostat-get-dimension-values.tool.js.map +1 -1
  23. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.d.ts +8 -1
  24. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.d.ts.map +1 -1
  25. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.js +132 -18
  26. package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.js.map +1 -1
  27. package/dist/services/eurostat-bulk/eurostat-bulk-service.d.ts +3 -0
  28. package/dist/services/eurostat-bulk/eurostat-bulk-service.d.ts.map +1 -1
  29. package/dist/services/eurostat-bulk/eurostat-bulk-service.js +21 -2
  30. package/dist/services/eurostat-bulk/eurostat-bulk-service.js.map +1 -1
  31. package/dist/services/eurostat-data/eurostat-data-service.d.ts +15 -1
  32. package/dist/services/eurostat-data/eurostat-data-service.d.ts.map +1 -1
  33. package/dist/services/eurostat-data/eurostat-data-service.js +78 -3
  34. package/dist/services/eurostat-data/eurostat-data-service.js.map +1 -1
  35. package/dist/services/eurostat-data/types.d.ts +26 -0
  36. package/dist/services/eurostat-data/types.d.ts.map +1 -1
  37. package/dist/services/eurostat-data/types.js.map +1 -1
  38. package/dist/services/eurostat-periods.d.ts +68 -0
  39. package/dist/services/eurostat-periods.d.ts.map +1 -0
  40. package/dist/services/eurostat-periods.js +204 -0
  41. package/dist/services/eurostat-periods.js.map +1 -0
  42. package/package.json +8 -8
  43. package/server.json +3 -3
@@ -0,0 +1,33 @@
1
+ ---
2
+ summary: "Both data tools now reject malformed, non-existent, and inverted period ranges as invalid_period before any request; eurostat_query_dataset explains an empty match and names filter values that matched nothing; eurostat_download_dataset reports totalCount instead of truncated."
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.7.0 — 2026-09-25
8
+
9
+ ## Added
10
+
11
+ - **`invalid_period` on `eurostat_query_dataset` and `eurostat_download_dataset`** ([#47](https://github.com/cyanheads/eurostat-mcp-server/issues/47), [#53](https://github.com/cyanheads/eurostat-mcp-server/issues/53)). `since_period`/`until_period` are checked in the handler before any request: the literal must be an accepted form, every month, quarter, semester, trimester, week, and day it names must exist, and `since_period` must not start after `until_period` ends. Cross-frequency pairs such as `2020-06` to `2020` stay valid.
12
+ - **`unmatchedValues` on `eurostat_query_dataset`** ([#52](https://github.com/cyanheads/eurostat-mcp-server/issues/52)) — filter values that matched nothing, keyed by dimension and spelled as sent. `notice` and the text output name them too; omitted when every value matched.
13
+ - **`no_results` diagnosis on `eurostat_query_dataset`** ([#48](https://github.com/cyanheads/eurostat-mcp-server/issues/48)) — read from the empty reply with no extra request: `data.unmatchedValues`, and `data.matchedPeriods` (the newest 24 selected periods, none carrying a value) with `data.matchedPeriodCount`. The message and hint name the cause: an unmatched value, a range outside the dataset's coverage (with its oldest and latest period), `last_n_periods` counting back past the slice's latest period, or a combination that carries no data.
14
+
15
+ ## Changed
16
+
17
+ - **Breaking: `eurostat_download_dataset` enrichment drops `truncated`, `shown`, and `cap`, and adds `totalCount`** ([#49](https://github.com/cyanheads/eurostat-mcp-server/issues/49)), equal to `rowCount`. A preview shorter than the download is disclosed as a `notice` sentence; `budgetExceeded` remains the only signal that the download is incomplete.
18
+ - **Breaking: period literals that name a component that does not exist fail as `invalid_period`** ([#47](https://github.com/cyanheads/eurostat-mcp-server/issues/47), [#53](https://github.com/cyanheads/eurostat-mcp-server/issues/53)) instead of reaching Eurostat, which rolled some into a neighbouring period (`2020-13`, `2020-Q5`, `2021-W53`, `2021-02-29`). An inverted range (`since_period` `2024-01` with `until_period` `2020-01`), which Eurostat answered with data outside it, fails the same way.
19
+ - **Breaking: period faults move to `invalid_period`** ([#47](https://github.com/cyanheads/eurostat-mcp-server/issues/47)) from `conflicting_params` on `eurostat_query_dataset` and from `filter_arity` on `eurostat_download_dataset`. Bulk fault 140 is split on its fault string: `TIME_PERIOD_FILTER_SPEC_INVALID` maps to `invalid_period`, `INVALID_QUERY_NB_FILTERS` stays `filter_arity`.
20
+ - **Breaking: an upper-case filter key with `geo_level` fails as `conflicting_params`** ([#54](https://github.com/cyanheads/eurostat-mcp-server/issues/54)); `GEO` previously bypassed the check.
21
+ - **Filter keys match dimension codes in any case** on both data tools ([#54](https://github.com/cyanheads/eurostat-mcp-server/issues/54)). `eurostat_download_dataset` places `GEO` at `geo` instead of rejecting it, and keys that differ only in case pool their values.
22
+ - **Period literals are sent in canonical form** and echoed that way in `appliedFilters`/`appliedQuery`: extra leading zeros after the letter are dropped (`2020-Q01` → `2020-Q1`), a day of the year is sent as three digits (`2026-D1` → `2026-D001`), and `YYYY-A1` is sent as `YYYY`.
23
+ - **`eurostat_dataframe_describe` and `eurostat_dataframe_query` recovery hints** name both staging tools for an unknown or expired canvas or table.
24
+ - **Tool descriptions and docs**: `last_n_periods` states it counts back from the dataset's latest period, not the slice's; `eurostat_get_dimension_values` states how each data tool reports an invalid code — named in `unmatchedValues` or the `no_results` error by `eurostat_query_dataset`, a fault on `eurostat_download_dataset`; the README capability reference, Features list, and configuration table are rewritten to match current behavior.
25
+
26
+ ## Fixed
27
+
28
+ - **`eurostat_download_dataset`'s no-canvas notice** ([#49](https://github.com/cyanheads/eurostat-mcp-server/issues/49)) no longer recommends a narrower query when every row came back inline, and names the `preview_limit` that returns them all when the download holds 500 rows or fewer.
29
+ - **`eurostat_download_dataset`'s `no_results` hint** ([#47](https://github.com/cyanheads/eurostat-mcp-server/issues/47)) also names a `since_period`/`until_period` range that misses the filtered series — one inside the dataset's coverage, which downloads as an empty table (a range wholly outside it fails as `invalid_dimension`).
30
+
31
+ ## Dependencies
32
+
33
+ - `@socketsecurity/bun-security-scanner` (dev) `^1.1.2` → `^1.1.3`
@@ -6,8 +6,8 @@
6
6
 
7
7
  # Required. One-line GitHub Release-style headline. 350 character cap — a
8
8
  # ceiling, not a target. Default short and scannable. Don't pad, don't stitch
9
- # unrelated changes with commas/semicolons into an inventory — pick the
10
- # headline, like a tag's theme line. Quotes required: unquoted YAML treats
9
+ # unrelated changes with commas/semicolons into an inventory — pick the one
10
+ # headline the release is about. Quotes required: unquoted YAML treats
11
11
  # `: ` inside the value as a key separator and fails GitHub's strict parser.
12
12
  summary: ""
13
13
 
@@ -119,11 +119,11 @@ security: false
119
119
  TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
120
120
  via `gh release create --notes-from-tag`. It is a condensed digest of this
121
121
  entry, never a copy, and its format is owned by the `release-and-publish`
122
- skill (step 4, "Create the annotated tag"): the entry's `summary:` as the
123
- theme line without the version, flat headline bullets — no Keep-a-Changelog
124
- section headers, no gates line — at most one deps line, issue backlinks,
125
- and the changelog link last. In release-PR mode the `git-wrapup` skill
126
- authors that digest as the PR body's `## Changes` and the tag copies it.
122
+ skill (step 4, "Create the annotated tag"): a short subject line without the
123
+ version, flat headline bullets — no Keep-a-Changelog section headers, no
124
+ gates line — at most one deps line, issue backlinks, and the changelog link
125
+ last. In release-PR mode the `git-wrapup` skill authors those bullets as the
126
+ PR body's `## Changes` and the tag copies them.
127
127
  -->
128
128
 
129
129
  ## Added
@@ -33,7 +33,8 @@ 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 eurostat_query_dataset to stage the data again and use the canvasId it returns.";
36
+ readonly recovery: "Re-run the tool that staged it (eurostat_query_dataset or eurostat_download_dataset) and use the canvasId it returns.";
37
+ readonly thrownBy: "service";
37
38
  }], {
38
39
  readonly notice: z.ZodOptional<z.ZodString>;
39
40
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"eurostat-dataframe-describe.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgIpC,CAAC"}
1
+ {"version":3,"file":"eurostat-dataframe-describe.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-dataframe-describe.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8HpC,CAAC"}
@@ -3,6 +3,7 @@
3
3
  * @module mcp-server/tools/definitions/eurostat-dataframe-describe.tool
4
4
  */
5
5
  import { tool, z } from '@cyanheads/mcp-ts-core';
6
+ import { CanvasIdSchema } from '@cyanheads/mcp-ts-core/canvas';
6
7
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
8
  import { acquireCanvas, getCanvas } from '../../../services/canvas-accessor.js';
8
9
  export const eurostatDataframeDescribe = tool('eurostat_dataframe_describe', {
@@ -10,10 +11,7 @@ export const eurostatDataframeDescribe = tool('eurostat_dataframe_describe', {
10
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
12
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
12
13
  input: z.object({
13
- canvas_id: z
14
- .string()
15
- .min(1)
16
- .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 or eurostat_download_dataset. Identifies the workspace holding the staged tables.'),
17
15
  }),
18
16
  output: z.object({
19
17
  canvasId: z.string().describe('Canvas identifier the tables were read from.'),
@@ -63,7 +61,8 @@ export const eurostatDataframeDescribe = tool('eurostat_dataframe_describe', {
63
61
  reason: 'canvas_not_found',
64
62
  code: JsonRpcErrorCode.NotFound,
65
63
  when: 'The canvas_id is unknown or its lifetime has elapsed.',
66
- recovery: 'Re-run eurostat_query_dataset to stage the data again and use the canvasId it returns.',
64
+ recovery: 'Re-run the tool that staged it (eurostat_query_dataset or eurostat_download_dataset) and use the canvasId it returns.',
65
+ thrownBy: 'service',
67
66
  },
68
67
  ],
69
68
  async handler(input, ctx) {
@@ -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,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,g9BAAg9B;IACl9B,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;aACT,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,oJAAoJ,CACrJ;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;QAC7E,SAAS,EAAE,CAAC;a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ACpD,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,g9BAAg9B;IACl9B,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;KACF,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;QAC7E,SAAS,EAAE,CAAC;aACT,MAAM,EAAE;aACR,QAAQ,CACP,mFAAmF,CACpF;QACH,MAAM,EAAE,CAAC;aACN,KAAK,CACJ,CAAC;aACE,MAAM,CAAC;YACN,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;YAC5D,IAAI,EAAE,CAAC;iBACJ,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;iBACvB,QAAQ,CAAC,8CAA8C,CAAC;YAC3D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAA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,KAAK,GAAa;YACtB,cAAc,MAAM,CAAC,QAAQ,IAAI;YACjC,gBAAgB,MAAM,CAAC,SAAS,kBAAkB,MAAM,CAAC,MAAM,CAAC,MAAM,IAAI;SAC3E,CAAC;QACF,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClC,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,qBAAqB,KAAK,CAAC,SAAS,EAAE,CAAC;YAC3F,KAAK,CAAC,IAAI,CAAC,QAAQ,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;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"}
@@ -24,11 +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 eurostat_query_dataset to stage the data again and use the canvasId it returns.";
27
+ readonly recovery: "Re-run the tool that staged it (eurostat_query_dataset or eurostat_download_dataset) and use the canvasId it returns.";
28
+ readonly thrownBy: "service";
28
29
  }, {
29
30
  readonly reason: "missing_table";
30
31
  readonly code: JsonRpcErrorCode.NotFound;
31
32
  readonly when: "The SQL names a table that is not staged on this canvas, or that has expired.";
32
- readonly recovery: "Call eurostat_dataframe_describe for the staged table names, or re-run eurostat_query_dataset to stage them again.";
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).";
34
+ readonly thrownBy: "service";
33
35
  }], undefined>;
34
36
  //# sourceMappingURL=eurostat-dataframe-query.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eurostat-dataframe-query.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-dataframe-query.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;cAiHjC,CAAC"}
1
+ {"version":3,"file":"eurostat-dataframe-query.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-dataframe-query.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgHjC,CAAC"}
@@ -4,6 +4,7 @@
4
4
  * @module mcp-server/tools/definitions/eurostat-dataframe-query.tool
5
5
  */
6
6
  import { tool, z } from '@cyanheads/mcp-ts-core';
7
+ import { CanvasIdSchema } from '@cyanheads/mcp-ts-core/canvas';
7
8
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
8
9
  import { acquireCanvas, getCanvas } from '../../../services/canvas-accessor.js';
9
10
  export const eurostatDataframeQuery = tool('eurostat_dataframe_query', {
@@ -11,10 +12,7 @@ export const eurostatDataframeQuery = tool('eurostat_dataframe_query', {
11
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
13
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
13
14
  input: z.object({
14
- canvas_id: z
15
- .string()
16
- .min(1)
17
- .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 or eurostat_download_dataset. Identifies the workspace holding the staged tables.'),
18
16
  sql: z
19
17
  .string()
20
18
  .min(1)
@@ -45,13 +43,15 @@ export const eurostatDataframeQuery = tool('eurostat_dataframe_query', {
45
43
  reason: 'canvas_not_found',
46
44
  code: JsonRpcErrorCode.NotFound,
47
45
  when: 'The canvas_id is unknown or its lifetime has elapsed.',
48
- recovery: 'Re-run eurostat_query_dataset to stage the data again and use the canvasId it returns.',
46
+ recovery: 'Re-run the tool that staged it (eurostat_query_dataset or eurostat_download_dataset) and use the canvasId it returns.',
47
+ thrownBy: 'service',
49
48
  },
50
49
  {
51
50
  reason: 'missing_table',
52
51
  code: JsonRpcErrorCode.NotFound,
53
52
  when: 'The SQL names a table that is not staged on this canvas, or that has expired.',
54
- recovery: 'Call eurostat_dataframe_describe for the staged table names, or re-run eurostat_query_dataset to stage them again.',
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).',
54
+ thrownBy: 'service',
55
55
  },
56
56
  ],
57
57
  async handler(input, ctx) {
@@ -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,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;aACT,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,oJAAoJ,CACrJ;QACH,GAAG,EAAE,CAAC;aACH,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,kPAAkP,CACnP;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;QACzE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;QAC1E,IAAI,EAAE,CAAC;aACJ,KAAK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pD,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,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;QACD,GAAG,EAAE,CAAC;aACH,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CACP,kPAAkP,CACnP;KACJ,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;QACzE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;QAC1E,IAAI,EAAE,CAAC;aACJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;aACxC,QAAQ,CACP,oPAAoP,CACrP;QACH,QAAQ,EAAE,CAAC;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: JsonRpcErrorCode.NotFound;
34
34
  readonly when: "The dataset code is not available for dissemination (HTTP 404, SDMX faultcode 100).";
35
35
  readonly recovery: "Use eurostat_search_datasets or eurostat_browse_themes to find a valid dataset code.";
36
+ readonly thrownBy: "service";
36
37
  }, {
37
38
  readonly reason: "invalid_dimension";
38
39
  readonly code: JsonRpcErrorCode.ValidationError;
39
40
  readonly when: "A filter names a dimension the dataset does not have, or a value or period range Eurostat rejects (SDMX faultcode 150).";
40
41
  readonly recovery: "Check dimension codes with eurostat_get_dataset_info and their values with eurostat_get_dimension_values, and keep the period range inside the dataset coverage.";
42
+ readonly thrownBy: "service";
41
43
  }, {
42
44
  readonly reason: "filter_arity";
43
45
  readonly code: JsonRpcErrorCode.ValidationError;
44
- readonly when: "Eurostat rejected the positional dimension key because it carried the wrong number of positions (SDMX faultcode 140), meaning the dataset structure has changed since the metadata call.";
46
+ readonly when: "Eurostat rejected the positional dimension key because it carried the wrong number of positions (SDMX faultcode 140, INVALID_QUERY_NB_FILTERS), meaning the dataset structure has changed since the metadata call.";
45
47
  readonly recovery: "Retry without filters to download the whole dataset, or re-read the dimensions with eurostat_get_dataset_info.";
48
+ readonly thrownBy: "service";
49
+ }, {
50
+ readonly reason: "invalid_period";
51
+ readonly code: JsonRpcErrorCode.ValidationError;
52
+ readonly when: "since_period or until_period is not a period literal, or names a month, quarter, semester, trimester, week or day that does not exist, or since_period starts after until_period ends. Checked before any request — the bulk endpoint would otherwise roll an out-of-range period into a neighbouring one, and answer an inverted range with the whole series — and SDMX faultcode 140 TIME_PERIOD_FILTER_SPEC_INVALID maps here too.";
53
+ readonly recovery: "Write since_period/until_period as YYYY, YYYY-MM, YYYY-MM-DD, YYYY-Qn (1–4), YYYY-Sn (1–2), YYYY-Tn (1–3), YYYY-Mnn (01–12), YYYY-Wnn (a week the year has, up to 53) or YYYY-Dnnn (a day the year has, up to 366), for example \"2020\", \"2020-01\" or \"2020-Q1\", with since_period starting no later than until_period ends.";
46
54
  }, {
47
55
  readonly reason: "async_queued";
48
56
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
49
57
  readonly when: "Eurostat answered HTTP 200 with a SOAP syncResponse queue ticket (status SUBMITTED) instead of data, because the extraction was too costly to serve synchronously.";
50
58
  readonly retryable: false;
51
59
  readonly recovery: "Add dimension filters or a period range so Eurostat serves the extraction inline; the queued result cannot be collected here.";
60
+ readonly thrownBy: "service";
52
61
  }, {
53
62
  readonly reason: "no_results";
54
63
  readonly code: JsonRpcErrorCode.NotFound;
55
64
  readonly when: "The download completed but carried no populated observation cells.";
56
- readonly recovery: "Verify the filter values with eurostat_get_dimension_values — a combination that exists in no cell returns an empty body.";
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.";
57
66
  }, {
58
67
  readonly reason: "upstream_fault";
59
68
  readonly code: JsonRpcErrorCode.ServiceUnavailable;
60
69
  readonly when: "The SDMX endpoint returned a fault this server does not model, or a body that is not a TSV table.";
61
70
  readonly recovery: "Retry in a few minutes, or narrow the request with dimension filters.";
71
+ readonly thrownBy: "service";
62
72
  }, {
63
73
  readonly reason: "canvas_not_found";
64
74
  readonly code: JsonRpcErrorCode.NotFound;
65
75
  readonly when: "A canvas_id was supplied for staging but is unknown or its lifetime has elapsed.";
66
76
  readonly recovery: "Omit canvas_id so the download starts a fresh canvas and returns its canvasId.";
77
+ readonly thrownBy: "service";
67
78
  }], {
68
- readonly truncated: z.ZodOptional<z.ZodBoolean>;
69
- readonly shown: z.ZodOptional<z.ZodNumber>;
70
- readonly cap: z.ZodOptional<z.ZodNumber>;
79
+ readonly totalCount: z.ZodNumber;
71
80
  readonly appliedQuery: z.ZodObject<{
72
81
  filters: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
73
82
  sincePeriod: z.ZodOptional<z.ZodString>;
@@ -77,7 +86,7 @@ export declare const eurostatDownloadDataset: import("@cyanheads/mcp-ts-core").T
77
86
  readonly notice: z.ZodOptional<z.ZodString>;
78
87
  }>;
79
88
  /** Contract reasons the bulk service's classified failures map onto. */
80
- type MappedReason = 'async_queued' | 'filter_arity' | 'invalid_dimension' | 'not_found' | 'upstream_fault';
89
+ type MappedReason = 'async_queued' | 'filter_arity' | 'invalid_dimension' | 'invalid_period' | 'not_found' | 'upstream_fault';
81
90
  /**
82
91
  * Translate a service-layer failure into the tool's declared contract.
83
92
  *
@@ -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;AACjD,OAAO,EAAE,gBAAgB,EAAiB,MAAM,+BAA+B,CAAC;AA6BhF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwXlC,CAAC;AAEH,wEAAwE;AACxE,KAAK,YAAY,GACb,cAAc,GACd,cAAc,GACd,mBAAmB,GACnB,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,CAqCrE"}
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"}
@@ -4,10 +4,12 @@
4
4
  * @module mcp-server/tools/definitions/eurostat-download-dataset.tool
5
5
  */
6
6
  import { tool, z } from '@cyanheads/mcp-ts-core';
7
+ import { CanvasIdSchema } from '@cyanheads/mcp-ts-core/canvas';
7
8
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
8
9
  import { acquireCanvas, getCanvas, newTableName } from '../../../services/canvas-accessor.js';
9
10
  import { bulkRowSchema, getEurostatBulkService, } from '../../../services/eurostat-bulk/eurostat-bulk-service.js';
10
11
  import { getEurostatDataService } from '../../../services/eurostat-data/eurostat-data-service.js';
12
+ import { PERIOD_FORMS, resolvePeriods } from '../../../services/eurostat-periods.js';
11
13
  /** Upper bound on rows echoed inline, whatever preview_limit asks for. */
12
14
  const PREVIEW_MAX = 500;
13
15
  /**
@@ -32,15 +34,15 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
32
34
  filters: z
33
35
  .record(z.string(), z.array(z.string()))
34
36
  .default({})
35
- .describe('Dimension filters as a map of dimension code → array of accepted values, applied by Eurostat before the body is sent. Example: {"unit": ["CP_MEUR"], "na_item": ["B1G"], "geo": ["DE", "FR"]}. Omit a dimension or pass an empty array to accept every value for it. Do not put "time" here — use since_period/until_period. Naming a dimension the dataset does not have is rejected with the dataset\'s dimension list rather than silently ignored.'),
37
+ .describe('Dimension filters as a map of dimension code → array of accepted values, applied by Eurostat before the body is sent. Example: {"unit": ["CP_MEUR"], "na_item": ["B1G"], "geo": ["DE", "FR"]}. Omit a dimension or pass an empty array to accept every value for it. Dimension codes match in any case ("GEO" is geo). Do not put "time" here — use since_period/until_period. Naming a dimension the dataset does not have is rejected with the dataset\'s dimension list rather than silently ignored.'),
36
38
  since_period: z
37
39
  .string()
38
40
  .optional()
39
- .describe('Start of the period range (e.g., "2020", "2023-Q1", "2024-01"), sent as startPeriod. The most effective way to shrink a bulk response: it removes period columns from the TSV rather than blanking their cells.'),
41
+ .describe(`Start of the period range, inclusive, sent as startPeriod. Accepted forms: ${PERIOD_FORMS} (e.g., "2020", "2023-Q1", "2024-01"). Extra leading zeros after the letter are dropped ("2020-W001" is sent as "2020-W01"), a day of the year is sent as three digits ("2026-D1" as "2026-D001"), YYYY-A1 is sent as YYYY, and a period of another frequency is mapped onto the dataset's own. A malformed or non-existent period (e.g., "2020-13") is rejected as invalid_period. The most effective way to shrink a bulk response: it removes period columns from the TSV rather than blanking their cells.`),
40
42
  until_period: z
41
43
  .string()
42
44
  .optional()
43
- .describe('End of the period range (e.g., "2024"), sent as endPeriod. Omit for data through the latest available period.'),
45
+ .describe('End of the period range, inclusive (e.g., "2024"), sent as endPeriod, in the same forms as since_period. Omit for data through the latest available period. The range must hold at least one day: a since_period that starts after until_period ends is rejected as invalid_period, while pairs of different frequencies are fine ("2020-06" to "2020").'),
44
46
  preview_limit: z
45
47
  .number()
46
48
  .int()
@@ -48,10 +50,7 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
48
50
  .max(PREVIEW_MAX)
49
51
  .default(50)
50
52
  .describe('How many observations to echo inline, from the start of the download. Caps at 500. The full download is on the canvas table when one was staged; this is orientation, not the result set.'),
51
- canvas_id: z
52
- .string()
53
- .optional()
54
- .describe('Reuse an existing dataframe canvas so this download lands beside earlier results and can be joined against them. Pass a canvasId from a previous response; omit to start a fresh canvas. Ignored on deployments without a dataframe canvas.'),
53
+ canvas_id: CanvasIdSchema.optional().describe('Reuse an existing dataframe canvas so this download lands beside earlier results and can be joined against them. Pass the canvasId a previous eurostat_download_dataset or eurostat_query_dataset response returned; omit to start a fresh canvas. Ignored on deployments without a dataframe canvas.'),
55
54
  }),
56
55
  output: z.object({
57
56
  datasetCode: z.string().describe('Dataset code as provided.'),
@@ -104,12 +103,9 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
104
103
  .describe('Rows written to the canvas table. Matches rowCount. Omitted alongside tableName.'),
105
104
  }),
106
105
  enrichment: {
107
- truncated: z
108
- .boolean()
109
- .optional()
110
- .describe('True when the inline observation preview omits rows.'),
111
- shown: z.number().optional().describe('Observations returned in the inline preview.'),
112
- cap: z.number().optional().describe('The preview_limit applied to inline observations.'),
106
+ totalCount: z
107
+ .number()
108
+ .describe('Observations the download produced — equal to rowCount. The inline observations array holds only the first preview_limit of them; budgetExceeded, not this count, says whether the download is the whole dataset.'),
113
109
  appliedQuery: z
114
110
  .object({
115
111
  filters: z
@@ -123,7 +119,7 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
123
119
  notice: z
124
120
  .string()
125
121
  .optional()
126
- .describe('Guidance for every staged result, including the required eurostat_dataframe_describe then eurostat_dataframe_query sequence, composed with byte-budget, no-canvas, or empty-result disclosure when applicable.'),
122
+ .describe('Guidance on every download: the staged table with the required eurostat_dataframe_describe then eurostat_dataframe_query sequence (or, without a canvas, what was returned inline and what was discarded), preceded by byte-budget disclosure when the budget stopped the transfer and by the inline-preview length when preview_limit returns fewer rows than were downloaded.'),
127
123
  },
128
124
  enrichmentTrailer: {
129
125
  appliedQuery: {
@@ -147,18 +143,27 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
147
143
  code: JsonRpcErrorCode.NotFound,
148
144
  when: 'The dataset code is not available for dissemination (HTTP 404, SDMX faultcode 100).',
149
145
  recovery: 'Use eurostat_search_datasets or eurostat_browse_themes to find a valid dataset code.',
146
+ thrownBy: 'service',
150
147
  },
151
148
  {
152
149
  reason: 'invalid_dimension',
153
150
  code: JsonRpcErrorCode.ValidationError,
154
151
  when: 'A filter names a dimension the dataset does not have, or a value or period range Eurostat rejects (SDMX faultcode 150).',
155
152
  recovery: 'Check dimension codes with eurostat_get_dataset_info and their values with eurostat_get_dimension_values, and keep the period range inside the dataset coverage.',
153
+ thrownBy: 'service',
156
154
  },
157
155
  {
158
156
  reason: 'filter_arity',
159
157
  code: JsonRpcErrorCode.ValidationError,
160
- when: 'Eurostat rejected the positional dimension key because it carried the wrong number of positions (SDMX faultcode 140), meaning the dataset structure has changed since the metadata call.',
158
+ when: 'Eurostat rejected the positional dimension key because it carried the wrong number of positions (SDMX faultcode 140, INVALID_QUERY_NB_FILTERS), meaning the dataset structure has changed since the metadata call.',
161
159
  recovery: 'Retry without filters to download the whole dataset, or re-read the dimensions with eurostat_get_dataset_info.',
160
+ thrownBy: 'service',
161
+ },
162
+ {
163
+ reason: 'invalid_period',
164
+ code: JsonRpcErrorCode.ValidationError,
165
+ when: 'since_period or until_period is not a period literal, or names a month, quarter, semester, trimester, week or day that does not exist, or since_period starts after until_period ends. Checked before any request — the bulk endpoint would otherwise roll an out-of-range period into a neighbouring one, and answer an inverted range with the whole series — and SDMX faultcode 140 TIME_PERIOD_FILTER_SPEC_INVALID maps here too.',
166
+ recovery: `Write since_period/until_period as ${PERIOD_FORMS}, for example "2020", "2020-01" or "2020-Q1", with since_period starting no later than until_period ends.`,
162
167
  },
163
168
  {
164
169
  reason: 'async_queued',
@@ -166,30 +171,41 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
166
171
  when: 'Eurostat answered HTTP 200 with a SOAP syncResponse queue ticket (status SUBMITTED) instead of data, because the extraction was too costly to serve synchronously.',
167
172
  retryable: false,
168
173
  recovery: 'Add dimension filters or a period range so Eurostat serves the extraction inline; the queued result cannot be collected here.',
174
+ thrownBy: 'service',
169
175
  },
170
176
  {
171
177
  reason: 'no_results',
172
178
  code: JsonRpcErrorCode.NotFound,
173
179
  when: 'The download completed but carried no populated observation cells.',
174
- recovery: 'Verify the filter values with eurostat_get_dimension_values — a combination that exists in no cell returns an empty body.',
180
+ 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.",
175
181
  },
176
182
  {
177
183
  reason: 'upstream_fault',
178
184
  code: JsonRpcErrorCode.ServiceUnavailable,
179
185
  when: 'The SDMX endpoint returned a fault this server does not model, or a body that is not a TSV table.',
180
186
  recovery: 'Retry in a few minutes, or narrow the request with dimension filters.',
187
+ thrownBy: 'service',
181
188
  },
182
189
  {
183
190
  reason: 'canvas_not_found',
184
191
  code: JsonRpcErrorCode.NotFound,
185
192
  when: 'A canvas_id was supplied for staging but is unknown or its lifetime has elapsed.',
186
193
  recovery: 'Omit canvas_id so the download starts a fresh canvas and returns its canvasId.',
194
+ thrownBy: 'service',
187
195
  },
188
196
  ],
189
197
  async handler(input, ctx) {
190
198
  const bulk = getEurostatBulkService();
191
- const sinceP = input.since_period?.trim() || undefined;
192
- const untilP = input.until_period?.trim() || undefined;
199
+ // Trimmed, checked, and rewritten to canonical form: this is both what is sent and
200
+ // what appliedQuery echoes.
201
+ const periods = resolvePeriods({
202
+ since_period: input.since_period?.trim() || undefined,
203
+ until_period: input.until_period?.trim() || undefined,
204
+ });
205
+ if (!periods.ok) {
206
+ throw ctx.fail('invalid_period', periods.message, ctx.recoveryFor('invalid_period'));
207
+ }
208
+ const { since_period: sinceP, until_period: untilP } = periods;
193
209
  const filters = Object.fromEntries(Object.entries(input.filters).filter(([, values]) => values.length > 0));
194
210
  /**
195
211
  * `ctx.fail` is typed against this tool's reason union, so the mapping stays
@@ -249,9 +265,15 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
249
265
  const firstPeriod = stats.periodsSeen[0];
250
266
  const lastPeriod = stats.periodsSeen.at(-1);
251
267
  if (stats.rowCount === 0) {
268
+ const range = [
269
+ ...(sinceP ? [`since_period "${sinceP}"`] : []),
270
+ ...(untilP ? [`until_period "${untilP}"`] : []),
271
+ ].join(' and ');
252
272
  throw ctx.fail('no_results', `The download of "${input.dataset_code}" carried no observations.`, {
253
273
  recovery: {
254
- hint: `Eurostat returned a table with no populated cells for "${input.dataset_code}". Verify the filter values with eurostat_get_dimension_values — a combination present in no cell downloads as an empty body.`,
274
+ hint: `Eurostat returned a table with no populated cells for "${input.dataset_code}". Verify the filter values with eurostat_get_dimension_values — a combination present in no cell downloads as an empty body.${range
275
+ ? ` Also check that ${range} overlaps the series: a range outside the series' own coverage downloads as an empty table too.`
276
+ : ''}`,
255
277
  },
256
278
  });
257
279
  }
@@ -271,21 +293,37 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
271
293
  url: download.url,
272
294
  },
273
295
  });
274
- if (stats.rowCount > preview.length) {
275
- ctx.enrich.truncated({ shown: preview.length, cap: input.preview_limit });
276
- }
296
+ /**
297
+ * A preview shorter than the download is disclosed as a notice and a total, not
298
+ * as `truncated`: the download itself is complete, and `budgetExceeded` is what
299
+ * says when it is not. `notice` is last-wins, so every sentence is collected and
300
+ * written once.
301
+ */
302
+ ctx.enrich.total(stats.rowCount);
277
303
  const notices = [];
278
304
  if (stats.budgetExceeded) {
279
305
  notices.push(`The byte budget stopped this transfer after ${stats.bytesRead.toLocaleString()} bytes, so these ${stats.rowCount.toLocaleString()} observations are the start of "${input.dataset_code}" and not all of it. Add dimension filters or a since_period/until_period range to fit the dataset inside the budget, or raise EUROSTAT_BULK_MAX_BYTES.`);
280
306
  }
307
+ if (stats.rowCount > preview.length) {
308
+ notices.push(`preview_limit=${input.preview_limit.toLocaleString()} returns the first ${preview.length.toLocaleString()} of ${stats.rowCount.toLocaleString()} downloaded observations inline; it does not reduce the download.`);
309
+ }
281
310
  if (!staged) {
282
- notices.push(`This deployment runs without a dataframe canvas, so nothing was staged: only the ${preview.length.toLocaleString()} observations returned inline are retained, and the other ${(stats.rowCount - preview.length).toLocaleString()} were counted and discarded. Set CANVAS_PROVIDER_TYPE=duckdb to keep the download, or use eurostat_query_dataset with dimension filters to fetch a slice small enough to return whole.`);
311
+ /**
312
+ * A narrower query is advice only for a download larger than preview_limit can
313
+ * ever return; below that, the rows either all came back or are one larger
314
+ * preview_limit away.
315
+ */
316
+ const discarded = stats.rowCount - preview.length;
317
+ notices.push(discarded === 0
318
+ ? `This deployment runs without a dataframe canvas, so nothing was staged; all ${stats.rowCount.toLocaleString()} downloaded observations are returned inline.`
319
+ : `This deployment runs without a dataframe canvas, so nothing was staged: only the ${preview.length.toLocaleString()} observations returned inline are retained, and the other ${discarded.toLocaleString()} were counted and discarded. ${stats.rowCount <= PREVIEW_MAX
320
+ ? `Raise preview_limit to ${stats.rowCount.toLocaleString()} to return every one inline, or set CANVAS_PROVIDER_TYPE=duckdb to keep the download.`
321
+ : 'Set CANVAS_PROVIDER_TYPE=duckdb to keep the download, or use eurostat_query_dataset with dimension filters to fetch a slice small enough to return whole.'}`);
283
322
  }
284
323
  else {
285
324
  notices.push(`All ${staged.stagedRowCount.toLocaleString()} downloaded observations are staged as table "${staged.tableName}" on canvas "${staged.canvasId}". Call eurostat_dataframe_describe with that canvas_id first to confirm the table and columns, then call eurostat_dataframe_query.`);
286
325
  }
287
- if (notices.length > 0)
288
- ctx.enrich.notice(notices.join(' '));
326
+ ctx.enrich.notice(notices.join(' '));
289
327
  return {
290
328
  datasetCode: input.dataset_code,
291
329
  dimensionsUsed: download.header.dimensions,
@@ -355,6 +393,12 @@ export function mapBulkFailure(err, datasetCode) {
355
393
  message,
356
394
  hint: `Eurostat expected a different number of filter positions for "${datasetCode}" than its metadata reports. Re-read the dimensions with eurostat_get_dataset_info, or retry without filters.`,
357
395
  };
396
+ case 'invalid_period':
397
+ return {
398
+ reason,
399
+ message,
400
+ hint: `Eurostat could not read the period range for "${datasetCode}". Write since_period/until_period as ${PERIOD_FORMS}, for example "2020", "2020-01" or "2020-Q1".`,
401
+ };
358
402
  case 'async_queued':
359
403
  return {
360
404
  reason,
@@ -1 +1 @@
1
- {"version":3,"file":"eurostat-download-dataset.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-download-dataset.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAiB,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EACL,aAAa,EACb,sBAAsB,GACvB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAE3F,0EAA0E;AAC1E,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB;;;;;GAKG;AACH,KAAK,SAAS,CAAC,CAAC,UAAU,CACxB,IAA6B,EAC7B,OAAkB,EAClB,KAAa;IAEb,IAAI,KAAK,EAAE,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QAC7B,IAAI,OAAO,CAAC,MAAM,GAAG,KAAK;YAAE,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9C,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC,2BAA2B,EAAE;IACvE,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,6vCAA6vC;IAC/vC,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,+CAA+C,CAAC;QACzF,OAAO,EAAE,CAAC;aACP,MAAM,CAAC,CAAC,CAAC,MAAM,E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;;GAQG;AACH,MAAM,UAAU,cAAc,CAC5B,GAAY,EACZ,WAAmB;IAEnB,MAAM,MAAM,GAAI,GAAgB,CAAC,IAAI,EAAE,MAAM,CAAC;IAC9C,MAAM,OAAO,GAAI,GAAa,CAAC,OAAO,CAAC;IACvC,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,WAAW;YACd,OAAO;gBACL,MAAM;gBACN,OAAO;gBACP,IAAI,EAAE,YAAY,WAAW,oHAAoH;aAClJ,CAAC;QACJ,KAAK,mBAAmB;YACtB,OAAO;gBACL,MAAM;gBACN,OAAO;gBACP,IAAI,EAAE,kCAAkC,WAAW,yJAAyJ;aAC7M,CAAC;QACJ,KAAK,cAAc;YACjB,OAAO;gBACL,MAAM;gBACN,OAAO;gBACP,IAAI,EAAE,iEAAiE,WAAW,+GAA+G;aAClM,CAAC;QACJ,KAAK,cAAc;YACjB,OAAO;gBACL,MAAM;gBACN,OAAO;gBACP,IAAI,EAAE,4JAA4J,WAAW,qBAAqB;aACnM,CAAC;QACJ,KAAK,gBAAgB;YACnB,OAAO;gBACL,MAAM;gBACN,OAAO;gBACP,IAAI,EAAE,qDAAqD,WAAW,0EAA0E;aACjJ,CAAC;QACJ;YACE,OAAO;IACX,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"eurostat-download-dataset.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-download-dataset.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,EAAiB,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,EACL,aAAa,EACb,sBAAsB,GACvB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,EAAE,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;gBACL,MAAM;gBACN,OAAO;gBACP,IAAI,EAAE,iEAAiE,WAAW,+GAA+G;aAClM,CAAC;QACJ,KAAK,gBAAgB;YACnB,OAAO;gBACL,MAAM;gBACN,OAAO;gBACP,IAAI,EAAE,iDAAiD,WAAW,yCAAyC,YAAY,+CAA+C;aACvK,CAAC;QACJ,KAAK,cAAc;YACjB,OAAO;gBACL,MAAM;gBACN,OAAO;gBACP,IAAI,EAAE,4JAA4J,WAAW,qBAAqB;aACnM,CAAC;QACJ,KAAK,gBAAgB;YACnB,OAAO;gBACL,MAAM;gBACN,OAAO;gBACP,IAAI,EAAE,qDAAqD,WAAW,0EAA0E;aACjJ,CAAC;QACJ;YACE,OAAO;IACX,CAAC;AACH,CAAC"}
@@ -8,7 +8,7 @@ import { getEurostatDataService } from '../../../services/eurostat-data/eurostat
8
8
  import { GEO_LEVEL_VALUES } from '../../../services/eurostat-data/types.js';
9
9
  export const eurostatGetDimensionValues = tool('eurostat_get_dimension_values', {
10
10
  title: 'Get Eurostat Dimension Values',
11
- description: 'List all valid values for a specific dimension in a Eurostat dataset (e.g., all unit codes for nama_10_gdp, all geo codes for a regional dataset). Use this when eurostat_get_dataset_info returns more values than the 10-item sample, or to confirm exact codes before querying. For the "geo" dimension, use geo_level to filter by NUTS hierarchy (country, nuts1, nuts2, nuts3). Invalid dimension_value codes silently return no data from eurostat_query_dataset, and are rejected by Eurostat as a fault on eurostat_download_dataset; use this tool to verify codes first.',
11
+ description: 'List all valid values for a specific dimension in a Eurostat dataset (e.g., all unit codes for nama_10_gdp, all geo codes for a regional dataset). Use this when eurostat_get_dataset_info returns more values than the 10-item sample, or to confirm exact codes before querying. For the "geo" dimension, use geo_level to filter by NUTS hierarchy (country, nuts1, nuts2, nuts3). An invalid code matches nothing: eurostat_query_dataset names it in unmatchedValues, or in its no_results error when the query matched nothing at all, and Eurostat rejects it as a fault on eurostat_download_dataset; use this tool to verify codes first.',
12
12
  annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
13
13
  input: z.object({
14
14
  dataset_code: z.string().min(1).describe('Dataset code (e.g., "nama_10_gdp").'),