@cyanheads/eurostat-mcp-server 0.11.0 → 0.11.2
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.
- package/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +11 -8
- package/changelog/0.11.x/0.11.1.md +23 -0
- package/changelog/0.11.x/0.11.2.md +27 -0
- package/dist/mcp-server/resources/definitions/eurostat-dataset.resource.d.ts +14 -1
- package/dist/mcp-server/resources/definitions/eurostat-dataset.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/eurostat-dataset.resource.js +17 -0
- package/dist/mcp-server/resources/definitions/eurostat-dataset.resource.js.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-browse-themes.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-browse-themes.tool.js +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-browse-themes.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.d.ts +14 -12
- package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.js +98 -41
- package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-get-dataset-info.tool.d.ts +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-get-dataset-info.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-get-dataset-info.tool.js +10 -1
- package/dist/mcp-server/tools/definitions/eurostat-get-dataset-info.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-get-dimension-values.tool.d.ts +4 -4
- package/dist/mcp-server/tools/definitions/eurostat-get-dimension-values.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-get-dimension-values.tool.js +25 -4
- package/dist/mcp-server/tools/definitions/eurostat-get-dimension-values.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.d.ts +6 -4
- package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.js +88 -24
- package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-search-datasets.tool.d.ts +4 -4
- package/dist/mcp-server/tools/definitions/eurostat-search-datasets.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-search-datasets.tool.js +18 -6
- package/dist/mcp-server/tools/definitions/eurostat-search-datasets.tool.js.map +1 -1
- package/dist/mcp-server/tools/hoist-dimensions.d.ts +18 -0
- package/dist/mcp-server/tools/hoist-dimensions.d.ts.map +1 -0
- package/dist/mcp-server/tools/hoist-dimensions.js +29 -0
- package/dist/mcp-server/tools/hoist-dimensions.js.map +1 -0
- package/dist/mcp-server/tools/narrowing-advice.d.ts +8 -7
- package/dist/mcp-server/tools/narrowing-advice.d.ts.map +1 -1
- package/dist/mcp-server/tools/narrowing-advice.js +16 -9
- package/dist/mcp-server/tools/narrowing-advice.js.map +1 -1
- package/dist/services/eurostat-bulk/eurostat-bulk-service.d.ts +5 -4
- package/dist/services/eurostat-bulk/eurostat-bulk-service.d.ts.map +1 -1
- package/dist/services/eurostat-bulk/eurostat-bulk-service.js +96 -18
- package/dist/services/eurostat-bulk/eurostat-bulk-service.js.map +1 -1
- package/dist/services/eurostat-bulk/types.d.ts +21 -4
- package/dist/services/eurostat-bulk/types.d.ts.map +1 -1
- package/dist/services/eurostat-catalogue/eurostat-catalogue-service.d.ts +14 -8
- package/dist/services/eurostat-catalogue/eurostat-catalogue-service.d.ts.map +1 -1
- package/dist/services/eurostat-catalogue/eurostat-catalogue-service.js +34 -17
- package/dist/services/eurostat-catalogue/eurostat-catalogue-service.js.map +1 -1
- package/dist/services/eurostat-codelists.d.ts +2 -1
- package/dist/services/eurostat-codelists.d.ts.map +1 -1
- package/dist/services/eurostat-codelists.js +2 -1
- package/dist/services/eurostat-codelists.js.map +1 -1
- package/dist/services/eurostat-data/eurostat-data-service.d.ts +12 -1
- package/dist/services/eurostat-data/eurostat-data-service.d.ts.map +1 -1
- package/dist/services/eurostat-data/eurostat-data-service.js +129 -26
- package/dist/services/eurostat-data/eurostat-data-service.js.map +1 -1
- package/dist/services/eurostat-data/types.d.ts +22 -11
- package/dist/services/eurostat-data/types.d.ts.map +1 -1
- package/dist/services/eurostat-data/types.js.map +1 -1
- package/dist/services/eurostat-periods.d.ts +107 -1
- package/dist/services/eurostat-periods.d.ts.map +1 -1
- package/dist/services/eurostat-periods.js +182 -7
- package/dist/services/eurostat-periods.js.map +1 -1
- package/package.json +4 -4
- package/server.json +3 -3
- package/skills/eurostat-guide/SKILL.md +4 -3
- package/skills/eurostat-guide/references/sql-analysis.md +18 -2
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** @cyanheads/eurostat-mcp-server
|
|
4
|
-
**Version:** 0.11.
|
|
4
|
+
**Version:** 0.11.2
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.18`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` `^2.4.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.11.
|
|
4
|
+
**Version:** 0.11.2
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.18`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` `^2.4.0`
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/eurostat-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/eurostat-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -42,7 +42,7 @@ The three `eurostat_dataframe_*` tools need the dataframe canvas, which is on by
|
|
|
42
42
|
| `eurostat_get_dataset_info` | Fetch dataset metadata: dimensions with sample values, time range, observation count, and last-update date |
|
|
43
43
|
| `eurostat_get_dimension_values` | List all valid codes for one dataset dimension, paged, with a code/label word filter and NUTS hierarchy filtering for `geo` |
|
|
44
44
|
| `eurostat_query_dataset` | Fetch a bounded preview of decoded observations with dimension filters, NUTS geo-level, and time-range controls |
|
|
45
|
-
| `eurostat_download_dataset` | Download a whole dataset via the SDMX bulk endpoint and stage every
|
|
45
|
+
| `eurostat_download_dataset` | Download a whole dataset via the SDMX bulk endpoint and stage every row on the dataframe canvas |
|
|
46
46
|
| `eurostat_dataframe_describe` | List the tables staged on a dataframe canvas, with row counts and column types |
|
|
47
47
|
| `eurostat_dataframe_query` | Run a read-only SQL SELECT across staged tables |
|
|
48
48
|
| `eurostat_dataframe_drop` | Remove one staged table from a dataframe canvas, leaving its other tables in place (opt-in) |
|
|
@@ -65,7 +65,7 @@ The same metadata is available through `eurostat_get_dataset_info` for tool-only
|
|
|
65
65
|
### `eurostat_search_datasets` <sub>tool</sub>
|
|
66
66
|
|
|
67
67
|
- `query` words are ANDed case-insensitively across each dataset's label, theme breadcrumb, and code, ignoring spacing beside punctuation (`Rev.2` finds `Rev. 2`); `limit` is a positive integer (default 20), clamped to 100 with a notice. Page by passing `nextCursor` back as `cursor`; cursor calls ignore `limit`
|
|
68
|
-
- Results carry `code`, `label`, `type` (`dataset` / `table`), period coverage, `obsCount`, `lastUpdated`, and `themePath`, with `totalMatches` across every page; fails as `no_match` (naming the words whose removal finds matches), `invalid_cursor`, or a retryable `upstream_fault` when no catalogue is loaded and Eurostat's table of contents is unreachable
|
|
68
|
+
- Results carry `code`, `label`, `type` (`dataset` / `table`), period coverage, `obsCount`, `lastUpdated`, and `themePath`, with `totalMatches` across every page; fails as `no_match` (naming the words whose removal finds matches or, when none does, the words that match no dataset), `invalid_cursor`, or a retryable `upstream_fault` when no catalogue is loaded and Eurostat's table of contents is unreachable
|
|
69
69
|
- If the Comext dataflow list cannot be loaded, results carry `comextListMissing` and a `notice`; a catalogue that could not be refreshed carries `catalogueLoadedAt`
|
|
70
70
|
|
|
71
71
|
---
|
|
@@ -98,16 +98,19 @@ The same metadata is available through `eurostat_get_dataset_info` for tool-only
|
|
|
98
98
|
- `dataset_code` plus `filters` (`{dimension_code: [values]}`), `geo_level`, and either `since_period` / `until_period` (`2020`, `2020-Q1`, `2020-01`, down to `YYYY-Wnn` and `YYYY-Dnnn`) or `last_n_periods`; `preview_limit` is a positive integer (default 25), clamped to 500 with a notice; `lang` is `EN`, `FR`, or `DE`
|
|
99
99
|
- `stage: true` stages the whole match on an available canvas, regardless of size; reuse `canvas_id` or omit it to create one. Without it, automatic staging starts above 5,000 observations. `truncated` still describes that threshold; `tableName` identifies a staged result. Canvas-disabled deployments disclose an explicit staging request as unavailable
|
|
100
100
|
- `last_n_periods` counts dataset time positions, which can include periods with no populated cells. A notice names gaps across the full match (up to the newest 24, with an omitted count); increase N or replace it with `until_period` to reach earlier observations
|
|
101
|
-
-
|
|
102
|
-
-
|
|
101
|
+
- Eurostat keeps only periods wholly inside `since_period`–`until_period`, per frequency. A notice names a period a bound falls inside and the bound that includes it. A one-day range goes out as `time=<date>`, because Eurostat ignores one-day bounds
|
|
102
|
+
- Each observation carries code/label pairs per dimension, a nullable `value`, `status` (OBS_FLAG), and `confStatus` (CONF_STATUS); `obsCount`, `missingObsCount`, `absentCellCount` (periods a matched series lacks, which are not observations and are never staged), and `timeRange` cover the whole match, `truncated` is true above 5,000 observations, and `unmatchedValues` names filter values that matched nothing
|
|
103
|
+
- Fails as `not_found`, `no_results` (naming the unmatched values, the periods with no value, why a range selected no period, or `geo_level` as the likely cause when Eurostat's reply says nothing more), `invalid_dimension`, `invalid_period`, `conflicting_params`, a non-retryable `async_response` for a query too large to serve, `canvas_not_found`, or a retryable `upstream_fault` when the Statistics API is down
|
|
103
104
|
|
|
104
105
|
---
|
|
105
106
|
|
|
106
107
|
### `eurostat_download_dataset` <sub>tool</sub>
|
|
107
108
|
|
|
108
109
|
- `dataset_code` plus the same `filters` map and `since_period` / `until_period` (no `last_n_periods`: the TSV keeps a column per period unless a range drops it); `preview_limit` is a positive integer (default 25), clamped to 500 with a notice
|
|
109
|
-
-
|
|
110
|
-
-
|
|
110
|
+
- The wholly-inside rule and its notice apply here too. A one-day range requests that day and the next, and the later day's column is dropped before anything is counted or staged
|
|
111
|
+
- Stages one row per non-blank TSV cell. A row with null `obs_value` and no flag, status or text (an unflagged `:`) is not an observation: it is a period the series lacks, or a period of a frequency the series has no observation of (the padding of a mixed-frequency slice)
|
|
112
|
+
- Returns `rowCount` (echoed as `totalCount`), `missingCount`, `absentCellCount` (the unflagged rows at periods of a frequency the series carries), `periodRange` (bounded by rows carrying a value, flag, status, or text), and `bytesRead` for the whole download; fails as `not_found`, `invalid_dimension`, `invalid_period`, `filter_arity`, a non-retryable `async_queued` or `extraction_too_big`, `no_results`, `upstream_fault` (retryable when the SDMX endpoint is down), or `canvas_not_found`
|
|
113
|
+
- The `EUROSTAT_BULK_MAX_BYTES` budget (default 50 MiB decoded) retains complete rows within the permitted prefix and returns `budgetExceeded: true`. A budget too small for a complete header and usable row fails as `byte_budget_exceeded`, with the configured limit and narrowing guidance. `bytesRead` counts accepted decoded bytes, never more than the budget; incomplete trailing rows are discarded.
|
|
111
114
|
|
|
112
115
|
---
|
|
113
116
|
|
|
@@ -135,7 +138,7 @@ The same metadata is available through `eurostat_get_dataset_info` for tool-only
|
|
|
135
138
|
|
|
136
139
|
### `eurostat://dataset/{dataset_code}` <sub>resource</sub>
|
|
137
140
|
|
|
138
|
-
- Same payload as `eurostat_get_dataset_info`, returned as `application/json`; a failed read carries the same `reason
|
|
141
|
+
- Same payload as `eurostat_get_dataset_info`, returned as `application/json`; a failed read carries the same `reason` and a recovery hint, and `retryable` on an outage
|
|
139
142
|
- `dataset_code` comes from `eurostat_search_datasets` or `eurostat_browse_themes`
|
|
140
143
|
|
|
141
144
|
## Features
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Period bounds that fall inside a period now say so, one-day ranges select that day instead of the whole series, a query whose geo_level selects nothing names it as the likely cause, the dimension-values hint offers only levels the dataset lists, and result rows stop repeating single-valued dimensions."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.11.1 — 2026-10-31
|
|
8
|
+
|
|
9
|
+
## Changed
|
|
10
|
+
|
|
11
|
+
- **`since_period` / `until_period`** on `eurostat_query_dataset` and `eurostat_download_dataset`: a success names each period a bound falls inside, which Eurostat excludes because it keeps only periods wholly inside a range, and the bound that includes it. The download names only frequencies its TSV header shows. When both bounds cut one period, the query notice uses a plural form naming both. The descriptions state the rule in place of "mapped onto the dataset's own" ([#84](https://github.com/cyanheads/eurostat-mcp-server/issues/84)).
|
|
12
|
+
- **`content[]`** of both tools lists each dimension holding one value across the rows shown once above the rows; `urb_cpop1` at `preview_limit: 500` went from 43,856 to 13,016 bytes ([#86](https://github.com/cyanheads/eurostat-mcp-server/issues/86)).
|
|
13
|
+
- **`eurostat_get_dimension_values`** `no_results` for an empty `geo_level` offers only the levels the dataset's `geo` codes carry, and offers omitting `geo_level` only when `country` is among them ([#87](https://github.com/cyanheads/eurostat-mcp-server/issues/87)).
|
|
14
|
+
- **`eurostat_query_dataset`** `no_results` for a query that set `geo_level` names it as the likely cause when Eurostat's reply says nothing more, lists the dimensions of a dataset without `geo`, and recommends dropping `geo_level` ([#85](https://github.com/cyanheads/eurostat-mcp-server/issues/85)).
|
|
15
|
+
- **Recovery hints** that read the dataset structure do so under a fixed 5 s deadline across retries: the query's `no_results` and `async_response`, and the download's `extraction_too_big` when no filter has read it already. `async_response` and `extraction_too_big` hints previously read under `EUROSTAT_REQUEST_TIMEOUT_MS` ([#85](https://github.com/cyanheads/eurostat-mcp-server/issues/85)).
|
|
16
|
+
- **`skills/eurostat-guide`** 1.0 → 1.1.
|
|
17
|
+
|
|
18
|
+
## Fixed
|
|
19
|
+
|
|
20
|
+
- **One-day ranges** select that day: the query sends `time=<date>`, and the download requests the day and the next, dropping the later column before anything is counted or staged. Both used to return the whole series. The download's `appliedQuery.url` shows an `endPeriod` a day past `untilPeriod` ([#88](https://github.com/cyanheads/eurostat-mcp-server/issues/88)).
|
|
21
|
+
- **Rejected forms:** a one-day range whose day holds no published period, or on a dataset with no period that short, used to return the whole series and now fails. The query fails as `no_results`; the download fails as `invalid_dimension` (fault 150) or `no_results`, depending on Eurostat's reply ([#88](https://github.com/cyanheads/eurostat-mcp-server/issues/88)).
|
|
22
|
+
- **`eurostat_query_dataset` `no_results` for a range that selects no period** is diagnosed as outside the coverage, holding no whole period (naming the bound or bounds that select one), or holding no published period (pointing to `eurostat_get_dimension_values` with `dimension: "time"`). Previously every case read as outside the coverage. A `filters.time` that selects nothing, with no bounds set, keeps its outside-coverage message ([#84](https://github.com/cyanheads/eurostat-mcp-server/issues/84)).
|
|
23
|
+
- **Download fault 150** splits on `allowed: TIME_PERIOD: [<>]=`: a range that selects no period reports `invalid_dimension` with a range message that omits Eurostat's clause, and a filter value spelling that clause stays a filter fault. It previously read as a rejected filter value, with a range outside the coverage as the one alternative ([#84](https://github.com/cyanheads/eurostat-mcp-server/issues/84)).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "eurostat_query_dataset and eurostat_download_dataset report absentCellCount, the periods a series lacks; the dataset resource's errors carry recovery hints; a search no_match names the query words that match no catalogue entry; the download's periodRange spans observations only; an HTTP 501 gets its own hint."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.11.2 — 2026-11-02
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`absentCellCount`** on `eurostat_query_dataset` and `eurostat_download_dataset`: the periods a matched series lacks, counted only at frequencies that series carries (an annual series beside a monthly one lacks no months). The query stages no row for them and, when the count is above zero, adds a notice naming it and how many series it falls in; the download keeps them as rows with null `obs_value` and describes them as non-observations ([#90](https://github.com/cyanheads/eurostat-mcp-server/issues/90)).
|
|
12
|
+
- **`eurostat_search_datasets`** `no_match` names the query words that match no dataset label, theme breadcrumb, or code when no single word's removal finds matches. It names none while the Comext dataflow list is missing ([#92](https://github.com/cyanheads/eurostat-mcp-server/issues/92)).
|
|
13
|
+
|
|
14
|
+
## Changed
|
|
15
|
+
|
|
16
|
+
- **`eurostat_download_dataset`** descriptions, notices, error messages and `content[]` call downloaded items rows rather than observations, and say what an unflagged `:` row is: a period its series lacks or, in a mixed-frequency slice, a period of a frequency the series does not carry; `rowCount`, `missingCount` and `totalCount` keep their values ([#90](https://github.com/cyanheads/eurostat-mcp-server/issues/90)). A download whose rows are all unflagged `:` cells, which already succeeded, now carries a notice and a `content[]` period line saying no row carries an observation ([#93](https://github.com/cyanheads/eurostat-mcp-server/issues/93)).
|
|
17
|
+
- **`skills/eurostat-guide`** 1.1 → 1.1.1: the coverage gate and the SQL missingness query separate absent periods from observations ([#90](https://github.com/cyanheads/eurostat-mcp-server/issues/90)).
|
|
18
|
+
|
|
19
|
+
## Fixed
|
|
20
|
+
|
|
21
|
+
- **`eurostat://dataset/{dataset_code}`** declares the `not_found` and `upstream_fault` contract entries of `eurostat_get_dataset_info`, so a read failing with either reason carries `data.recovery.hint` ([#91](https://github.com/cyanheads/eurostat-mcp-server/issues/91)).
|
|
22
|
+
- **`eurostat_download_dataset` `periodRange`** is bounded by rows carrying a value, flag, status or text; unflagged `:` rows no longer set a bound, and with no such row both bounds are omitted ([#93](https://github.com/cyanheads/eurostat-mcp-server/issues/93)).
|
|
23
|
+
- **HTTP 501** from the SDMX structure or data endpoint gets a hint naming the status and `eurostat_query_dataset` as the fallback, in `eurostat_get_dataset_info`, `eurostat_get_dimension_values` and `eurostat_download_dataset`; it no longer reads as an unreadable structure or TSV body. A filtered download whose structure read returns a definition it cannot build a filter key from gets a hint saying so, where it said the endpoint returned no TSV table. The `upstream_fault` `when` of those tools, `eurostat_search_datasets` and `eurostat_browse_themes` covers the non-retried 501 ([#94](https://github.com/cyanheads/eurostat-mcp-server/issues/94)).
|
|
24
|
+
|
|
25
|
+
## Dependencies
|
|
26
|
+
|
|
27
|
+
- `@biomejs/biome` 2.6.3 → 2.6.4, `@types/node` 26.6.5 → 26.6.6, `tsc-alias` ^1.9.9 → ^1.9.10 (dev).
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @module mcp-server/resources/definitions/eurostat-dataset.resource
|
|
4
4
|
*/
|
|
5
5
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
6
7
|
export declare const eurostatDatasetResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<z.ZodObject<{
|
|
7
8
|
dataset_code: z.ZodString;
|
|
8
9
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -24,5 +25,17 @@ export declare const eurostatDatasetResource: import("@cyanheads/mcp-ts-core").R
|
|
|
24
25
|
obsCount: z.ZodOptional<z.ZodNumber>;
|
|
25
26
|
lastUpdated: z.ZodOptional<z.ZodString>;
|
|
26
27
|
metadataUrl: z.ZodOptional<z.ZodString>;
|
|
27
|
-
}, z.core.$strip>,
|
|
28
|
+
}, z.core.$strip>, readonly [{
|
|
29
|
+
readonly reason: "not_found";
|
|
30
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
31
|
+
readonly when: "The dataset code does not exist or is not available for dissemination.";
|
|
32
|
+
readonly recovery: "Use eurostat_search_datasets or eurostat_browse_themes to find a valid dataset code.";
|
|
33
|
+
readonly thrownBy: "service";
|
|
34
|
+
}, {
|
|
35
|
+
readonly reason: "upstream_fault";
|
|
36
|
+
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
37
|
+
readonly when: "Eurostat returned a dataset structure or content constraint this server cannot read — malformed, truncated, not XML, or missing the requested dataset's dataflow; the structure endpoint answered HTTP 501, which is not retried; or it answered another HTTP 5xx or could not be reached on every retry, which the error marks retryable.";
|
|
38
|
+
readonly recovery: "Retry in a few minutes, since a failed structure read is not cached. If it fails the same way, eurostat_query_dataset reads the observations, with dimension codes and labels, from a separate endpoint.";
|
|
39
|
+
readonly thrownBy: "service";
|
|
40
|
+
}]>;
|
|
28
41
|
//# sourceMappingURL=eurostat-dataset.resource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FlC,CAAC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* @module mcp-server/resources/definitions/eurostat-dataset.resource
|
|
4
4
|
*/
|
|
5
5
|
import { resource, z } from '@cyanheads/mcp-ts-core';
|
|
6
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
6
7
|
import { getEurostatDataService } from '../../../services/eurostat-data/eurostat-data-service.js';
|
|
7
8
|
export const eurostatDatasetResource = resource('eurostat://dataset/{dataset_code}', {
|
|
8
9
|
name: 'eurostat-dataset-info',
|
|
@@ -59,6 +60,22 @@ export const eurostatDatasetResource = resource('eurostat://dataset/{dataset_cod
|
|
|
59
60
|
.describe('ISO 8601 timestamp of last data update. Omitted when Eurostat does not report it.'),
|
|
60
61
|
metadataUrl: z.string().optional().describe('Link to ESMS metadata page, when available.'),
|
|
61
62
|
}),
|
|
63
|
+
errors: [
|
|
64
|
+
{
|
|
65
|
+
reason: 'not_found',
|
|
66
|
+
code: JsonRpcErrorCode.NotFound,
|
|
67
|
+
when: 'The dataset code does not exist or is not available for dissemination.',
|
|
68
|
+
recovery: 'Use eurostat_search_datasets or eurostat_browse_themes to find a valid dataset code.',
|
|
69
|
+
thrownBy: 'service',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
reason: 'upstream_fault',
|
|
73
|
+
code: JsonRpcErrorCode.ServiceUnavailable,
|
|
74
|
+
when: "Eurostat returned a dataset structure or content constraint this server cannot read — malformed, truncated, not XML, or missing the requested dataset's dataflow; the structure endpoint answered HTTP 501, which is not retried; or it answered another HTTP 5xx or could not be reached on every retry, which the error marks retryable.",
|
|
75
|
+
recovery: 'Retry in a few minutes, since a failed structure read is not cached. If it fails the same way, eurostat_query_dataset reads the observations, with dimension codes and labels, from a separate endpoint.',
|
|
76
|
+
thrownBy: 'service',
|
|
77
|
+
},
|
|
78
|
+
],
|
|
62
79
|
handler(params, ctx) {
|
|
63
80
|
const svc = getEurostatDataService();
|
|
64
81
|
return svc.getDatasetInfo(params.dataset_code, ctx);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eurostat-dataset.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/eur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V,QAAQ,CACP,wIAAwI,CACzI;SACJ,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;
|
|
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,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,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,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,YAAY,EAAE,CAAC;aACZ,MAAM,EAAE;aACR,QAAQ,CAAC,6EAA6E,CA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AE;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;IACF,MAAM,EAAE;QACN;YACE,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,wEAAwE;YAC9E,QAAQ,EACN,sFAAsF;YACxF,QAAQ,EAAE,SAAS;SACpB;QACD;YACE,MAAM,EAAE,gBAAgB;YACxB,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;YACzC,IAAI,EAAE,4UAA4U;YAClV,QAAQ,EACN,0MAA0M;YAC5M,QAAQ,EAAE,SAAS;SACpB;KACF;IAED,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"}
|
|
@@ -36,7 +36,7 @@ export declare const eurostatBrowseThemes: import("@cyanheads/mcp-ts-core").Tool
|
|
|
36
36
|
}, {
|
|
37
37
|
readonly reason: "upstream_fault";
|
|
38
38
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
39
|
-
readonly when: "The server had no catalogue loaded yet, and Eurostat's table of contents answered HTTP 5xx or could not be reached on every retry, which the error marks retryable. Once a catalogue is loaded, a failed refresh serves that copy instead.";
|
|
39
|
+
readonly when: "The server had no catalogue loaded yet, and Eurostat's table of contents answered HTTP 501, which is not retried; or it answered another HTTP 5xx or could not be reached on every retry, which the error marks retryable. Once a catalogue is loaded, a failed refresh serves that copy instead.";
|
|
40
40
|
readonly recovery: "Retry in a few minutes: the catalogue load failed on Eurostat's side and runs again on the next call.";
|
|
41
41
|
}], {
|
|
42
42
|
readonly itemCount: z.ZodNumber;
|
|
@@ -91,7 +91,7 @@ export const eurostatBrowseThemes = tool('eurostat_browse_themes', {
|
|
|
91
91
|
{
|
|
92
92
|
reason: 'upstream_fault',
|
|
93
93
|
code: JsonRpcErrorCode.ServiceUnavailable,
|
|
94
|
-
when: "The server had no catalogue loaded yet, and Eurostat's table of contents answered HTTP 5xx or could not be reached on every retry, which the error marks retryable. Once a catalogue is loaded, a failed refresh serves that copy instead.",
|
|
94
|
+
when: "The server had no catalogue loaded yet, and Eurostat's table of contents answered HTTP 501, which is not retried; or it answered another HTTP 5xx or could not be reached on every retry, which the error marks retryable. Once a catalogue is loaded, a failed refresh serves that copy instead.",
|
|
95
95
|
recovery: "Retry in a few minutes: the catalogue load failed on Eurostat's side and runs again on the next call.",
|
|
96
96
|
},
|
|
97
97
|
],
|
|
@@ -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;AAC1G,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAE7D,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,wBAAwB,EAAE;IACjE,KAAK,EAAE,iCAAiC;IACxC,WAAW,EACT,yzBAAyzB;IAC3zB,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;aAC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Q,EAAE;aACV,QAAQ,CACP,+FAA+F,CAChG;KACJ,CAAC;IACF,UAAU,EAAE;QACV,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;QACzE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;QAC/F,iBAAiB,EAAE,CAAC;aACjB,OAAO,EAAE;aACT,QAAQ,EAAE;aACV,QAAQ,CACP,mKAAmK,CACpK;QACH,iBAAiB,EAAE,CAAC;aACjB,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,wJAAwJ,CACzJ;QACH,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,4LAA4L,CAC7L;KACJ;IAED,MAAM,EAAE;QACN;YACE,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,uKAAuK;YAC7K,QAAQ,EACN,+QAA+Q;SAClR;QACD;YACE,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,gBAAgB,CAAC,eAAe;YACtC,IAAI,EAAE,kFAAkF;YACxF,QAAQ,EACN,yGAAyG;SAC5G;QACD;YACE,MAAM,EAAE,gBAAgB;YACxB,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;YACzC,IAAI,EAAE,
|
|
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;AAC1G,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA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|
18
18
|
dimensionsUsed: z.ZodArray<z.ZodString>;
|
|
19
19
|
rowCount: z.ZodNumber;
|
|
20
20
|
missingCount: z.ZodNumber;
|
|
21
|
+
absentCellCount: z.ZodNumber;
|
|
21
22
|
periodRange: z.ZodObject<{
|
|
22
23
|
start: z.ZodOptional<z.ZodString>;
|
|
23
24
|
end: z.ZodOptional<z.ZodString>;
|
|
@@ -32,7 +33,7 @@ export declare const createEurostatDownloadDataset: (clampLimits: boolean) => im
|
|
|
32
33
|
}, z.core.$strip>, readonly [{
|
|
33
34
|
readonly reason: "byte_budget_exceeded";
|
|
34
35
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
35
|
-
readonly when: "The decoded TSV byte budget was exhausted before a complete header and usable
|
|
36
|
+
readonly when: "The decoded TSV byte budget was exhausted before a complete header and usable row could be read.";
|
|
36
37
|
readonly recovery: "Add dimension filters or narrow since_period/until_period to reduce the transfer, or raise EUROSTAT_BULK_MAX_BYTES.";
|
|
37
38
|
readonly thrownBy: "service";
|
|
38
39
|
}, {
|
|
@@ -44,8 +45,8 @@ export declare const createEurostatDownloadDataset: (clampLimits: boolean) => im
|
|
|
44
45
|
}, {
|
|
45
46
|
readonly reason: "invalid_dimension";
|
|
46
47
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
47
|
-
readonly when: "A filter names a dimension the dataset does not have, or a value or period range
|
|
48
|
-
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.";
|
|
48
|
+
readonly when: "A filter names a dimension the dataset does not have, or a value Eurostat rejects, or the period range selects no period of the dataset (SDMX faultcode 150): it misses the coverage, or holds no whole period. The fault covers all of these; its TIME_PERIOD clause tells the period range apart.";
|
|
49
|
+
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, holding a whole period.";
|
|
49
50
|
readonly thrownBy: "service";
|
|
50
51
|
}, {
|
|
51
52
|
readonly reason: "filter_arity";
|
|
@@ -68,8 +69,8 @@ export declare const createEurostatDownloadDataset: (clampLimits: boolean) => im
|
|
|
68
69
|
}, {
|
|
69
70
|
readonly reason: "no_results";
|
|
70
71
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
71
|
-
readonly when: "The download completed but
|
|
72
|
-
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.";
|
|
72
|
+
readonly when: "The download completed but yielded no row: a header-only table, or a one-day reply whose only cells fall on the next day. Nothing is staged, and no canvas is created or touched. A table whose only rows are unflagged \":\" cells succeeds with those rows, with periodRange omitted.";
|
|
73
|
+
readonly recovery: "Verify the filter values with eurostat_get_dimension_values and keep since_period/until_period inside the series' coverage, holding a whole period — a combination that exists in no cell and a range that misses the series both download as an empty table.";
|
|
73
74
|
}, {
|
|
74
75
|
readonly reason: "extraction_too_big";
|
|
75
76
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
@@ -80,7 +81,7 @@ export declare const createEurostatDownloadDataset: (clampLimits: boolean) => im
|
|
|
80
81
|
}, {
|
|
81
82
|
readonly reason: "upstream_fault";
|
|
82
83
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
83
|
-
readonly when: "The SDMX data endpoint returned a fault this server does not model, or a body that is not a TSV table;
|
|
84
|
+
readonly when: "The SDMX data endpoint returned a fault this server does not model, or a body that is not a TSV table; for a filtered download, the structure endpoint returned a structure this server cannot build a filter key from; the data endpoint — or, for a filtered download, the structure endpoint — answered HTTP 501, which is not retried; or it answered another HTTP 5xx or could not be reached on every retry, which the error marks retryable.";
|
|
84
85
|
readonly recovery: "Retry in a few minutes, or narrow the request with dimension filters.";
|
|
85
86
|
readonly thrownBy: "service";
|
|
86
87
|
}, {
|
|
@@ -111,6 +112,7 @@ export declare const eurostatDownloadDataset: import("@cyanheads/mcp-ts-core").T
|
|
|
111
112
|
dimensionsUsed: z.ZodArray<z.ZodString>;
|
|
112
113
|
rowCount: z.ZodNumber;
|
|
113
114
|
missingCount: z.ZodNumber;
|
|
115
|
+
absentCellCount: z.ZodNumber;
|
|
114
116
|
periodRange: z.ZodObject<{
|
|
115
117
|
start: z.ZodOptional<z.ZodString>;
|
|
116
118
|
end: z.ZodOptional<z.ZodString>;
|
|
@@ -125,7 +127,7 @@ export declare const eurostatDownloadDataset: import("@cyanheads/mcp-ts-core").T
|
|
|
125
127
|
}, z.core.$strip>, readonly [{
|
|
126
128
|
readonly reason: "byte_budget_exceeded";
|
|
127
129
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
128
|
-
readonly when: "The decoded TSV byte budget was exhausted before a complete header and usable
|
|
130
|
+
readonly when: "The decoded TSV byte budget was exhausted before a complete header and usable row could be read.";
|
|
129
131
|
readonly recovery: "Add dimension filters or narrow since_period/until_period to reduce the transfer, or raise EUROSTAT_BULK_MAX_BYTES.";
|
|
130
132
|
readonly thrownBy: "service";
|
|
131
133
|
}, {
|
|
@@ -137,8 +139,8 @@ export declare const eurostatDownloadDataset: import("@cyanheads/mcp-ts-core").T
|
|
|
137
139
|
}, {
|
|
138
140
|
readonly reason: "invalid_dimension";
|
|
139
141
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
140
|
-
readonly when: "A filter names a dimension the dataset does not have, or a value or period range
|
|
141
|
-
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.";
|
|
142
|
+
readonly when: "A filter names a dimension the dataset does not have, or a value Eurostat rejects, or the period range selects no period of the dataset (SDMX faultcode 150): it misses the coverage, or holds no whole period. The fault covers all of these; its TIME_PERIOD clause tells the period range apart.";
|
|
143
|
+
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, holding a whole period.";
|
|
142
144
|
readonly thrownBy: "service";
|
|
143
145
|
}, {
|
|
144
146
|
readonly reason: "filter_arity";
|
|
@@ -161,8 +163,8 @@ export declare const eurostatDownloadDataset: import("@cyanheads/mcp-ts-core").T
|
|
|
161
163
|
}, {
|
|
162
164
|
readonly reason: "no_results";
|
|
163
165
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
164
|
-
readonly when: "The download completed but
|
|
165
|
-
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.";
|
|
166
|
+
readonly when: "The download completed but yielded no row: a header-only table, or a one-day reply whose only cells fall on the next day. Nothing is staged, and no canvas is created or touched. A table whose only rows are unflagged \":\" cells succeeds with those rows, with periodRange omitted.";
|
|
167
|
+
readonly recovery: "Verify the filter values with eurostat_get_dimension_values and keep since_period/until_period inside the series' coverage, holding a whole period — a combination that exists in no cell and a range that misses the series both download as an empty table.";
|
|
166
168
|
}, {
|
|
167
169
|
readonly reason: "extraction_too_big";
|
|
168
170
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
@@ -173,7 +175,7 @@ export declare const eurostatDownloadDataset: import("@cyanheads/mcp-ts-core").T
|
|
|
173
175
|
}, {
|
|
174
176
|
readonly reason: "upstream_fault";
|
|
175
177
|
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
176
|
-
readonly when: "The SDMX data endpoint returned a fault this server does not model, or a body that is not a TSV table;
|
|
178
|
+
readonly when: "The SDMX data endpoint returned a fault this server does not model, or a body that is not a TSV table; for a filtered download, the structure endpoint returned a structure this server cannot build a filter key from; the data endpoint — or, for a filtered download, the structure endpoint — answered HTTP 501, which is not retried; or it answered another HTTP 5xx or could not be reached on every retry, which the error marks retryable.";
|
|
177
179
|
readonly recovery: "Retry in a few minutes, or narrow the request with dimension filters.";
|
|
178
180
|
readonly thrownBy: "service";
|
|
179
181
|
}, {
|
|
@@ -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;
|
|
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;AAoDhF,+DAA+D;AAC/D,eAAO,MAAM,6BAA6B,gBAAiB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8hB9D,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsC,CAAC"}
|