@cyanheads/eurostat-mcp-server 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +3 -2
- package/CLAUDE.md +3 -2
- package/Dockerfile +5 -5
- package/README.md +34 -37
- package/changelog/0.10.x/0.10.1.md +27 -0
- package/dist/config/server-config.d.ts +1 -0
- package/dist/config/server-config.d.ts.map +1 -1
- package/dist/config/server-config.js +9 -4
- package/dist/config/server-config.js.map +1 -1
- package/dist/index.js +25 -7
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/clamp-read-limit.d.ts +11 -0
- package/dist/mcp-server/tools/clamp-read-limit.d.ts.map +1 -0
- package/dist/mcp-server/tools/clamp-read-limit.js +14 -0
- package/dist/mcp-server/tools/clamp-read-limit.js.map +1 -0
- package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.d.ts +3 -1
- package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.js +96 -33
- package/dist/mcp-server/tools/definitions/eurostat-dataframe-query.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.d.ts +100 -0
- 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 +22 -11
- package/dist/mcp-server/tools/definitions/eurostat-download-dataset.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/eurostat-query-dataset.tool.d.ts +101 -0
- 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 +13 -9
- 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 +45 -0
- 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 +12 -9
- package/dist/mcp-server/tools/definitions/eurostat-search-datasets.tool.js.map +1 -1
- package/dist/services/eurostat-bulk/eurostat-bulk-service.d.ts.map +1 -1
- package/dist/services/eurostat-bulk/eurostat-bulk-service.js +72 -24
- package/dist/services/eurostat-bulk/eurostat-bulk-service.js.map +1 -1
- package/dist/services/eurostat-bulk/types.d.ts +1 -1
- package/dist/services/eurostat-bulk/types.d.ts.map +1 -1
- package/dist/services/eurostat-catalogue/eurostat-catalogue-service.d.ts.map +1 -1
- package/dist/services/eurostat-catalogue/eurostat-catalogue-service.js +15 -6
- package/dist/services/eurostat-catalogue/eurostat-catalogue-service.js.map +1 -1
- package/dist/services/eurostat-data/eurostat-data-service.d.ts.map +1 -1
- package/dist/services/eurostat-data/eurostat-data-service.js +12 -5
- package/dist/services/eurostat-data/eurostat-data-service.js.map +1 -1
- package/package.json +6 -6
- package/server.json +31 -17
|
@@ -6,10 +6,41 @@
|
|
|
6
6
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
7
7
|
import { CanvasIdSchema } from '@cyanheads/mcp-ts-core/canvas';
|
|
8
8
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
9
|
+
import { fitPage, INLINE_BUDGET_BYTES, utf8Bytes, } from '../value-list-paging.js';
|
|
9
10
|
import { acquireCanvas, getCanvas, isCanvasFailure } from '../../../services/canvas-accessor.js';
|
|
11
|
+
const QueryOutputSchema = z.object({
|
|
12
|
+
canvasId: z.string().describe('Canvas identifier the query ran against.'),
|
|
13
|
+
columns: z.array(z.string()).describe('Column names in projection order.'),
|
|
14
|
+
rows: z
|
|
15
|
+
.array(z.record(z.string(), z.unknown()))
|
|
16
|
+
.describe('Complete result rows, keyed by column name, bounded by the canvas row limit and 64,000 bytes per serialized surface. Nested cells render as JSON; 64-bit integers arrive as strings so they survive intact. Cast to DOUBLE in SQL if a number is wanted.'),
|
|
17
|
+
rowCount: z
|
|
18
|
+
.number()
|
|
19
|
+
.describe('Complete rows returned after the canvas row limit and the 64,000-byte budget per serialized response surface. Advance SQL OFFSET by this actual count.'),
|
|
20
|
+
truncated: z
|
|
21
|
+
.boolean()
|
|
22
|
+
.describe('True when the canvas row limit or the 64,000-byte budget per serialized response surface omitted rows. At least one complete row is retained even if oversized. Follow notice for SQL paging.'),
|
|
23
|
+
});
|
|
24
|
+
/** JSON cells preserve nested values, string quoting and escaped line breaks. */
|
|
25
|
+
function renderRow(columns, row) {
|
|
26
|
+
return columns.map((column) => `${column}=${JSON.stringify(row[column])}`).join(' | ');
|
|
27
|
+
}
|
|
28
|
+
/** Shared by the formatter and the serialized response budget. */
|
|
29
|
+
function renderText(result) {
|
|
30
|
+
return [
|
|
31
|
+
`# Query result (canvas \`${result.canvasId}\`)`,
|
|
32
|
+
`**Rows:** ${result.rowCount} | **Truncated:** ${result.truncated}`,
|
|
33
|
+
`**Columns:** ${result.columns.join(', ')}\n`,
|
|
34
|
+
...result.rows.map((row) => renderRow(result.columns, row)),
|
|
35
|
+
].join('\n');
|
|
36
|
+
}
|
|
37
|
+
/** Paging depends on a fixed deterministic SELECT over unchanged staged tables. */
|
|
38
|
+
function cutNotice(rows) {
|
|
39
|
+
return `Returned ${rows.toLocaleString('en-US')} complete rows; the canvas row limit or the 64,000-byte budget per serialized response surface cut this result. Page with the same deterministic SELECT and a total ORDER BY (add tie-breakers for tied keys), using LIMIT/OFFSET and advancing OFFSET by the actual returned rowCount, not the requested LIMIT. If the first page had no ORDER BY, restart sorted at OFFSET 0. Volatile expressions and changing or expired tables do not support stable paging.`;
|
|
40
|
+
}
|
|
10
41
|
export const eurostatDataframeQuery = tool('eurostat_dataframe_query', {
|
|
11
42
|
title: 'Query Eurostat Dataframes',
|
|
12
|
-
description: 'Run a read-only SQL SELECT against tables staged on a Eurostat dataframe canvas — the way to reach observations past the 5,000-row inline cap of eurostat_query_dataset and past the inline preview of a eurostat_download_dataset bulk download, and to aggregate, group, or join across staged tables without re-fetching from Eurostat. Call eurostat_dataframe_describe first for the table and column names, which differ between the tools that stage them. Only a single SELECT statement runs: statement chaining, non-SELECT verbs, and functions that read files or external data are rejected. Columns are flat — every dimension is a code column named after the dimension, the measure is obs_value, the observation flag is obs_flag / obs_flag_label and the confidentiality marker is conf_status / conf_status_label; a "_label" companion per dimension exists only on tables eurostat_query_dataset staged. Both observation stagers write the same five measure columns with the same codes, so join their tables on dimension codes and time and compare obs_flag or conf_status across them directly; a DS-* table also carries obs_value_text, a value published as text (e.g. a PRODCOM unit "KG"). A value list eurostat_get_dimension_values staged has two columns, code and label: join it to the code column of a download (e.g. JOIN df_x g ON d.geo = g.code) to label that table.',
|
|
43
|
+
description: 'Run a read-only SQL SELECT against tables staged on a Eurostat dataframe canvas — the way to reach observations past the 5,000-row inline cap of eurostat_query_dataset and past the inline preview of a eurostat_download_dataset bulk download, and to aggregate, group, or join across staged tables without re-fetching from Eurostat. Call eurostat_dataframe_describe first for the table and column names, which differ between the tools that stage them. Only a single SELECT statement runs: statement chaining, non-SELECT verbs, and functions that read files or external data are rejected. Columns are flat — every dimension is a code column named after the dimension, the measure is obs_value, the observation flag is obs_flag / obs_flag_label and the confidentiality marker is conf_status / conf_status_label; a "_label" companion per dimension exists only on tables eurostat_query_dataset staged. Both observation stagers write the same five measure columns with the same codes, so join their tables on dimension codes and time and compare obs_flag or conf_status across them directly; a DS-* table also carries obs_value_text, a value published as text (e.g. a PRODCOM unit "KG"). A value list eurostat_get_dimension_values staged has two columns, code and label: join it to the code column of a download (e.g. JOIN df_x g ON d.geo = g.code) to label that table. Returns complete rows within the canvas row limit and 64,000 bytes per serialized response surface, retaining at least one complete row even if oversized. Nested cells render as JSON. A cut sets truncated and adds a notice: page the same deterministic SELECT over unchanged tables with a total ORDER BY and LIMIT/OFFSET, advancing by actual rowCount; restart an unordered first page sorted at offset zero. Tied keys need tie-breakers; volatile SQL and changing or expired tables cannot provide stable paging.',
|
|
13
44
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
14
45
|
input: z.object({
|
|
15
46
|
canvas_id: CanvasIdSchema.describe('Canvas identifier returned as canvasId by eurostat_query_dataset, eurostat_download_dataset, or eurostat_get_dimension_values. Identifies the workspace holding the staged tables.'),
|
|
@@ -18,19 +49,13 @@ export const eurostatDataframeQuery = tool('eurostat_dataframe_query', {
|
|
|
18
49
|
.min(1)
|
|
19
50
|
.describe("A single read-only SELECT statement. Reference tables by the names eurostat_dataframe_describe reports. Example: SELECT geo, geo_label, AVG(obs_value) AS mean FROM df_a1b2c3d4 WHERE time >= '2020' GROUP BY geo, geo_label ORDER BY mean DESC."),
|
|
20
51
|
}),
|
|
21
|
-
output:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.
|
|
26
|
-
.describe('
|
|
27
|
-
|
|
28
|
-
.number()
|
|
29
|
-
.describe('Rows materialized into this response. Equals the full result size unless truncated is true.'),
|
|
30
|
-
truncated: z
|
|
31
|
-
.boolean()
|
|
32
|
-
.describe('True when the result exceeded the canvas row limit and was cut short. Add a LIMIT, an aggregate, or a narrower WHERE clause to see the rest.'),
|
|
33
|
-
}),
|
|
52
|
+
output: QueryOutputSchema,
|
|
53
|
+
enrichment: {
|
|
54
|
+
notice: z
|
|
55
|
+
.string()
|
|
56
|
+
.optional()
|
|
57
|
+
.describe('Whole-row cut disclosure and deterministic SQL paging guidance. Omitted when no rows were omitted.'),
|
|
58
|
+
},
|
|
34
59
|
errors: [
|
|
35
60
|
{
|
|
36
61
|
reason: 'canvas_disabled',
|
|
@@ -81,30 +106,68 @@ export const eurostatDataframeQuery = tool('eurostat_dataframe_query', {
|
|
|
81
106
|
* reasons with a vaguer message.
|
|
82
107
|
*/
|
|
83
108
|
const result = await instance.query(input.sql, { signal: ctx.signal }).catch(asDeclared);
|
|
84
|
-
|
|
85
|
-
canvasId: instance.canvasId,
|
|
86
|
-
rowCount: result.rowCount,
|
|
87
|
-
truncated: result.truncated === true,
|
|
88
|
-
});
|
|
89
|
-
return {
|
|
109
|
+
const page = (count) => ({
|
|
90
110
|
canvasId: instance.canvasId,
|
|
91
111
|
columns: result.columns,
|
|
92
|
-
rows: result.rows,
|
|
93
|
-
rowCount:
|
|
112
|
+
rows: result.rows.slice(0, count),
|
|
113
|
+
rowCount: count,
|
|
114
|
+
truncated: result.truncated === true || count < result.rows.length,
|
|
115
|
+
});
|
|
116
|
+
const measure = (count) => {
|
|
117
|
+
const output = page(count);
|
|
118
|
+
const notice = output.truncated ? cutNotice(count) : undefined;
|
|
119
|
+
const content = [
|
|
120
|
+
{ type: 'text', text: renderText(output) },
|
|
121
|
+
...(notice ? [{ type: 'text', text: `\n\n> ${notice}` }] : []),
|
|
122
|
+
];
|
|
123
|
+
return {
|
|
124
|
+
structured: utf8Bytes(JSON.stringify({ ...output, ...(notice && { notice }) })),
|
|
125
|
+
text: utf8Bytes(JSON.stringify(content)),
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
const costs = [];
|
|
129
|
+
const costOf = (index) => {
|
|
130
|
+
const cached = costs[index];
|
|
131
|
+
if (cached)
|
|
132
|
+
return cached;
|
|
133
|
+
const row = result.rows[index];
|
|
134
|
+
const cost = {
|
|
135
|
+
structured: utf8Bytes(JSON.stringify(row)) + 1,
|
|
136
|
+
text: utf8Bytes(JSON.stringify(`\n${renderRow(result.columns, row)}`)) - 2,
|
|
137
|
+
};
|
|
138
|
+
costs[index] = cost;
|
|
139
|
+
return cost;
|
|
140
|
+
};
|
|
141
|
+
/**
|
|
142
|
+
* A full result has no cut notice, so it can fit when a partial prefix plus
|
|
143
|
+
* that notice cannot. Test that case with additive row costs, stopping at
|
|
144
|
+
* the budget instead of serializing an arbitrarily large full result.
|
|
145
|
+
*/
|
|
146
|
+
const empty = {
|
|
147
|
+
...page(0),
|
|
148
|
+
rowCount: result.rows.length,
|
|
94
149
|
truncated: result.truncated === true,
|
|
95
150
|
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
for (const row of result.rows) {
|
|
105
|
-
lines.push(result.columns.map((col) => `${col}=${row[col] === null ? 'NULL' : row[col]}`).join(' | '));
|
|
151
|
+
let structured = utf8Bytes(JSON.stringify(empty));
|
|
152
|
+
let text = utf8Bytes(JSON.stringify([{ type: 'text', text: renderText(empty) }]));
|
|
153
|
+
let fullFits = !empty.truncated;
|
|
154
|
+
for (let index = 0; fullFits && index < result.rows.length; index++) {
|
|
155
|
+
const cost = costOf(index);
|
|
156
|
+
structured += cost.structured - (index === 0 ? 1 : 0);
|
|
157
|
+
text += cost.text;
|
|
158
|
+
fullFits = structured <= INLINE_BUDGET_BYTES && text <= INLINE_BUDGET_BYTES;
|
|
106
159
|
}
|
|
107
|
-
|
|
160
|
+
const count = fullFits ? result.rows.length : fitPage(result.rows.length, measure, costOf);
|
|
161
|
+
const output = page(count);
|
|
162
|
+
if (output.truncated)
|
|
163
|
+
ctx.enrich.notice(cutNotice(count));
|
|
164
|
+
ctx.log.info('Canvas query complete', {
|
|
165
|
+
canvasId: instance.canvasId,
|
|
166
|
+
rowCount: output.rowCount,
|
|
167
|
+
truncated: output.truncated,
|
|
168
|
+
});
|
|
169
|
+
return output;
|
|
108
170
|
},
|
|
171
|
+
format: (result) => [{ type: 'text', text: renderText(result) }],
|
|
109
172
|
});
|
|
110
173
|
//# sourceMappingURL=eurostat-dataframe-query.tool.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eurostat-dataframe-query.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-dataframe-query.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAE1F,MAAM,CAAC,MAAM,
|
|
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,EACL,OAAO,EACP,mBAAmB,EAEnB,SAAS,GACV,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAE1F,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IACzE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IAC1E,IAAI,EAAE,CAAC;SACJ,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;SACxC,QAAQ,CACP,0PAA0P,CAC3P;IACH,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,CACP,wJAAwJ,CACzJ;IACH,SAAS,EAAE,CAAC;SACT,OAAO,EAAE;SACT,QAAQ,CACP,+LAA+L,CAChM;CACJ,CAAC,CAAC;AAGH,iFAAiF;AACjF,SAAS,SAAS,CAAC,OAAiB,EAAE,GAA4B;IAChE,OAAO,OAAO,CAAC,GAAG,CAAC,CA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,100 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
7
7
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
8
|
+
/** Selects the advertised limit policy before registration. */
|
|
9
|
+
export declare const createEurostatDownloadDataset: (clampLimits: boolean) => import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
10
|
+
dataset_code: z.ZodString;
|
|
11
|
+
filters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
12
|
+
since_period: z.ZodOptional<z.ZodString>;
|
|
13
|
+
until_period: z.ZodOptional<z.ZodString>;
|
|
14
|
+
preview_limit: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
canvas_id: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
17
|
+
datasetCode: z.ZodString;
|
|
18
|
+
dimensionsUsed: z.ZodArray<z.ZodString>;
|
|
19
|
+
rowCount: z.ZodNumber;
|
|
20
|
+
missingCount: z.ZodNumber;
|
|
21
|
+
periodRange: z.ZodObject<{
|
|
22
|
+
start: z.ZodOptional<z.ZodString>;
|
|
23
|
+
end: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
bytesRead: z.ZodNumber;
|
|
26
|
+
compressed: z.ZodBoolean;
|
|
27
|
+
budgetExceeded: z.ZodBoolean;
|
|
28
|
+
observations: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodNull]>>>;
|
|
29
|
+
canvasId: z.ZodOptional<z.ZodString>;
|
|
30
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
31
|
+
stagedRowCount: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
}, z.core.$strip>, readonly [{
|
|
33
|
+
readonly reason: "byte_budget_exceeded";
|
|
34
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
35
|
+
readonly when: "The decoded TSV byte budget was exhausted before a complete header and usable observation could be read.";
|
|
36
|
+
readonly recovery: "Add dimension filters or narrow since_period/until_period to reduce the transfer, or raise EUROSTAT_BULK_MAX_BYTES.";
|
|
37
|
+
readonly thrownBy: "service";
|
|
38
|
+
}, {
|
|
39
|
+
readonly reason: "not_found";
|
|
40
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
41
|
+
readonly when: "The dataset code is not available for dissemination (HTTP 404, SDMX faultcode 100).";
|
|
42
|
+
readonly recovery: "Use eurostat_search_datasets or eurostat_browse_themes to find a valid dataset code.";
|
|
43
|
+
readonly thrownBy: "service";
|
|
44
|
+
}, {
|
|
45
|
+
readonly reason: "invalid_dimension";
|
|
46
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
47
|
+
readonly when: "A filter names a dimension the dataset does not have, or a value or period range Eurostat rejects (SDMX faultcode 150).";
|
|
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.";
|
|
49
|
+
readonly thrownBy: "service";
|
|
50
|
+
}, {
|
|
51
|
+
readonly reason: "filter_arity";
|
|
52
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
53
|
+
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.";
|
|
54
|
+
readonly recovery: "Retry without filters to download the whole dataset, or re-read the dimensions with eurostat_get_dataset_info.";
|
|
55
|
+
readonly thrownBy: "service";
|
|
56
|
+
}, {
|
|
57
|
+
readonly reason: "invalid_period";
|
|
58
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
59
|
+
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.";
|
|
60
|
+
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.";
|
|
61
|
+
}, {
|
|
62
|
+
readonly reason: "async_queued";
|
|
63
|
+
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
64
|
+
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.";
|
|
65
|
+
readonly retryable: false;
|
|
66
|
+
readonly recovery: "Add dimension filters or a period range so Eurostat serves the extraction inline; the queued result cannot be collected here.";
|
|
67
|
+
readonly thrownBy: "service";
|
|
68
|
+
}, {
|
|
69
|
+
readonly reason: "no_results";
|
|
70
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
71
|
+
readonly when: "The download completed but carried no populated observation cells. Nothing is staged, and no canvas is created or touched.";
|
|
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.";
|
|
73
|
+
}, {
|
|
74
|
+
readonly reason: "extraction_too_big";
|
|
75
|
+
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
76
|
+
readonly when: "Eurostat refused the extraction as too large (SDMX faultcode 413, HTTP 413): past its 5,000,000-row extraction limit, or an unfiltered download of a large DS-* Comext collection, which Eurostat serves only filtered. Covers every dataset, on either host.";
|
|
77
|
+
readonly retryable: false;
|
|
78
|
+
readonly recovery: "Add dimension filters or a narrower since_period/until_period range to shrink the extraction; the same request fails the same way on every retry.";
|
|
79
|
+
readonly thrownBy: "service";
|
|
80
|
+
}, {
|
|
81
|
+
readonly reason: "upstream_fault";
|
|
82
|
+
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; or the data endpoint — or, for a filtered download, the structure endpoint — answered HTTP 5xx or could not be reached on every retry, which the error marks retryable.";
|
|
84
|
+
readonly recovery: "Retry in a few minutes, or narrow the request with dimension filters.";
|
|
85
|
+
readonly thrownBy: "service";
|
|
86
|
+
}, {
|
|
87
|
+
readonly reason: "canvas_not_found";
|
|
88
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
89
|
+
readonly when: "A canvas_id was supplied for staging but is unknown or its lifetime has elapsed.";
|
|
90
|
+
readonly recovery: "Omit canvas_id so the download starts a fresh canvas and returns its canvasId.";
|
|
91
|
+
}], {
|
|
92
|
+
readonly totalCount: z.ZodNumber;
|
|
93
|
+
readonly appliedQuery: z.ZodObject<{
|
|
94
|
+
filters: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
95
|
+
sincePeriod: z.ZodOptional<z.ZodString>;
|
|
96
|
+
untilPeriod: z.ZodOptional<z.ZodString>;
|
|
97
|
+
url: z.ZodString;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}>;
|
|
101
|
+
/** Default-on read-limit policy; startup selects the deployment policy explicitly. */
|
|
8
102
|
export declare const eurostatDownloadDataset: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
9
103
|
dataset_code: z.ZodString;
|
|
10
104
|
filters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
@@ -29,6 +123,12 @@ export declare const eurostatDownloadDataset: import("@cyanheads/mcp-ts-core").T
|
|
|
29
123
|
tableName: z.ZodOptional<z.ZodString>;
|
|
30
124
|
stagedRowCount: z.ZodOptional<z.ZodNumber>;
|
|
31
125
|
}, z.core.$strip>, readonly [{
|
|
126
|
+
readonly reason: "byte_budget_exceeded";
|
|
127
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
128
|
+
readonly when: "The decoded TSV byte budget was exhausted before a complete header and usable observation could be read.";
|
|
129
|
+
readonly recovery: "Add dimension filters or narrow since_period/until_period to reduce the transfer, or raise EUROSTAT_BULK_MAX_BYTES.";
|
|
130
|
+
readonly thrownBy: "service";
|
|
131
|
+
}, {
|
|
32
132
|
readonly reason: "not_found";
|
|
33
133
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
34
134
|
readonly when: "The dataset code is not available for dissemination (HTTP 404, SDMX faultcode 100).";
|
|
@@ -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;AA6ChF,+DAA+D;AAC/D,eAAO,MAAM,6BAA6B,gBAAiB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+e9D,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAsC,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
7
7
|
import { CanvasIdSchema } from '@cyanheads/mcp-ts-core/canvas';
|
|
8
8
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
9
|
+
import { clampReadLimit } from '../clamp-read-limit.js';
|
|
9
10
|
import { dimensionsToNarrow, narrowingAdvice } from '../narrowing-advice.js';
|
|
10
11
|
import { acquireCanvas, getCanvas, isCanvasFailure, newTableName, } from '../../../services/canvas-accessor.js';
|
|
11
12
|
import { bulkRowSchema, getEurostatBulkService, } from '../../../services/eurostat-bulk/eurostat-bulk-service.js';
|
|
@@ -33,9 +34,10 @@ async function* prepend(first, rest) {
|
|
|
33
34
|
yield first;
|
|
34
35
|
yield* rest;
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
+
/** Selects the advertised limit policy before registration. */
|
|
38
|
+
export const createEurostatDownloadDataset = (clampLimits) => tool('eurostat_download_dataset', {
|
|
37
39
|
title: 'Download Eurostat Dataset',
|
|
38
|
-
description: 'Download a Eurostat dataset in bulk through the SDMX 2.1 TSV endpoint and stage every observation as a SQL table on the dataframe canvas — the route to a whole dataset, where eurostat_query_dataset is the route to a slice of one. The TSV wire format is roughly half the bytes of the JSON-stat body eurostat_query_dataset reads, so it reaches datasets that would otherwise time out, and it is expanded here into one row per observation. Filters take the same dimension-code map eurostat_query_dataset uses and are applied server-side by Eurostat; call eurostat_get_dataset_info first for the dimension codes and eurostat_get_dimension_values for their values. Narrow with since_period/until_period rather than asking for the most recent N periods — the TSV layout keeps a column for every period whichever is requested, so a period range is what actually shrinks the response. Transfers are bounded by a byte budget enforced while streaming:
|
|
40
|
+
description: 'Download a Eurostat dataset in bulk through the SDMX 2.1 TSV endpoint and stage every observation as a SQL table on the dataframe canvas — the route to a whole dataset, where eurostat_query_dataset is the route to a slice of one. The TSV wire format is roughly half the bytes of the JSON-stat body eurostat_query_dataset reads, so it reaches datasets that would otherwise time out, and it is expanded here into one row per observation. Filters take the same dimension-code map eurostat_query_dataset uses and are applied server-side by Eurostat; call eurostat_get_dataset_info first for the dimension codes and eurostat_get_dimension_values for their values. Narrow with since_period/until_period rather than asking for the most recent N periods — the TSV layout keeps a column for every period whichever is requested, so a period range is what actually shrinks the response. Transfers are bounded by a decoded-byte budget enforced while streaming: complete observations within the allowed prefix are retained with budgetExceeded set; a budget too small for a usable observation fails as byte_budget_exceeded with narrowing guidance. Only preview_limit rows come back inline. When a table is staged, call eurostat_dataframe_describe first to confirm its columns, then eurostat_dataframe_query; without a canvas, rows past the preview are not retained.',
|
|
39
41
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
40
42
|
input: z.object({
|
|
41
43
|
dataset_code: z
|
|
@@ -54,13 +56,11 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
|
|
|
54
56
|
.string()
|
|
55
57
|
.optional()
|
|
56
58
|
.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").'),
|
|
57
|
-
preview_limit:
|
|
58
|
-
.number()
|
|
59
|
-
.int()
|
|
60
|
-
.min(1)
|
|
61
|
-
.max(PREVIEW_MAX)
|
|
59
|
+
preview_limit: (clampLimits
|
|
60
|
+
? z.number().multipleOf(1).min(1)
|
|
61
|
+
: z.number().int().min(1).max(PREVIEW_MAX))
|
|
62
62
|
.default(50)
|
|
63
|
-
.describe(
|
|
63
|
+
.describe(`How many observations to echo inline, from the start of the download. Default 50; ${clampLimits ? 'positive integers above 500 are clamped to 500 with a notice' : 'maximum 500; larger values are rejected'}. The full download is on the canvas table when one was staged; this is orientation, not the result set.`),
|
|
64
64
|
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. A download that carries no observations fails as no_results and leaves the canvas untouched.'),
|
|
65
65
|
}),
|
|
66
66
|
output: z.object({
|
|
@@ -88,7 +88,7 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
|
|
|
88
88
|
.describe('Period coverage of the rows actually downloaded. Narrower than the dataset when budgetExceeded is true or a period range was applied.'),
|
|
89
89
|
bytesRead: z
|
|
90
90
|
.number()
|
|
91
|
-
.describe('Decoded TSV bytes
|
|
91
|
+
.describe('Decoded TSV bytes accepted for parsing, after decompression when applicable; never more than EUROSTAT_BULK_MAX_BYTES, including an incomplete trailing line that is discarded.'),
|
|
92
92
|
compressed: z
|
|
93
93
|
.boolean()
|
|
94
94
|
.describe('True when Eurostat sent the body gzip-compressed. It does so without a Content-Encoding header on large responses, so this reports what the stream actually carried.'),
|
|
@@ -149,6 +149,13 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
|
|
|
149
149
|
},
|
|
150
150
|
},
|
|
151
151
|
errors: [
|
|
152
|
+
{
|
|
153
|
+
reason: 'byte_budget_exceeded',
|
|
154
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
155
|
+
when: 'The decoded TSV byte budget was exhausted before a complete header and usable observation could be read.',
|
|
156
|
+
recovery: 'Add dimension filters or narrow since_period/until_period to reduce the transfer, or raise EUROSTAT_BULK_MAX_BYTES.',
|
|
157
|
+
thrownBy: 'service',
|
|
158
|
+
},
|
|
152
159
|
{
|
|
153
160
|
reason: 'not_found',
|
|
154
161
|
code: JsonRpcErrorCode.NotFound,
|
|
@@ -212,7 +219,9 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
|
|
|
212
219
|
recovery: 'Omit canvas_id so the download starts a fresh canvas and returns its canvasId.',
|
|
213
220
|
},
|
|
214
221
|
],
|
|
215
|
-
async handler(
|
|
222
|
+
async handler(request, ctx) {
|
|
223
|
+
const previewLimit = clampReadLimit(request.preview_limit, PREVIEW_MAX, 'preview_limit', 'eurostat_download_dataset', ctx);
|
|
224
|
+
const input = { ...request, preview_limit: previewLimit.value };
|
|
216
225
|
const bulk = getEurostatBulkService();
|
|
217
226
|
// Trimmed, checked, and rewritten to canonical form: this is both what is sent and
|
|
218
227
|
// what appliedQuery echoes.
|
|
@@ -352,7 +361,7 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
|
|
|
352
361
|
* written once.
|
|
353
362
|
*/
|
|
354
363
|
ctx.enrich.total(stats.rowCount);
|
|
355
|
-
const notices = [];
|
|
364
|
+
const notices = previewLimit.notice ? [previewLimit.notice] : [];
|
|
356
365
|
if (stats.budgetExceeded) {
|
|
357
366
|
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.`);
|
|
358
367
|
}
|
|
@@ -414,6 +423,8 @@ export const eurostatDownloadDataset = tool('eurostat_download_dataset', {
|
|
|
414
423
|
return [{ type: 'text', text: lines.join('\n') }];
|
|
415
424
|
},
|
|
416
425
|
});
|
|
426
|
+
/** Default-on read-limit policy; startup selects the deployment policy explicitly. */
|
|
427
|
+
export const eurostatDownloadDataset = createEurostatDownloadDataset(true);
|
|
417
428
|
/**
|
|
418
429
|
* Translate a service-layer failure into the tool's declared contract.
|
|
419
430
|
*
|
|
@@ -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,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAiB,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,w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O;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,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC7F,OAAO,EACL,aAAa,EACb,SAAS,EACT,eAAe,EACf,YAAY,GACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,aAAa,EACb,sBAAsB,GACvB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAE9E,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,yFAAyF;AACzF,KAAK,SAAS,CAAC,CAAC,OAAO,CAAC,KAAc,EAAE,IAA6B;IACn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
|
|
@@ -4,6 +4,107 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
+
/** Selects the advertised limit policy before registration. */
|
|
8
|
+
export declare const createEurostatQueryDataset: (clampLimits: boolean) => import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
9
|
+
dataset_code: z.ZodString;
|
|
10
|
+
filters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
11
|
+
geo_level: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
aggregate: "aggregate";
|
|
13
|
+
country: "country";
|
|
14
|
+
nuts1: "nuts1";
|
|
15
|
+
nuts2: "nuts2";
|
|
16
|
+
nuts3: "nuts3";
|
|
17
|
+
}>>;
|
|
18
|
+
since_period: z.ZodOptional<z.ZodString>;
|
|
19
|
+
until_period: z.ZodOptional<z.ZodString>;
|
|
20
|
+
last_n_periods: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
preview_limit: z.ZodDefault<z.ZodNumber>;
|
|
22
|
+
lang: z.ZodDefault<z.ZodEnum<{
|
|
23
|
+
DE: "DE";
|
|
24
|
+
EN: "EN";
|
|
25
|
+
FR: "FR";
|
|
26
|
+
}>>;
|
|
27
|
+
canvas_id: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
29
|
+
datasetCode: z.ZodString;
|
|
30
|
+
datasetLabel: z.ZodString;
|
|
31
|
+
dimensionsUsed: z.ZodArray<z.ZodString>;
|
|
32
|
+
observations: z.ZodArray<z.ZodObject<{
|
|
33
|
+
dimensions: z.ZodObject<{}, z.core.$loose>;
|
|
34
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
35
|
+
valueText: z.ZodOptional<z.ZodString>;
|
|
36
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
code: z.ZodString;
|
|
38
|
+
label: z.ZodString;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
confStatus: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
code: z.ZodString;
|
|
42
|
+
label: z.ZodString;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
obsCount: z.ZodNumber;
|
|
46
|
+
truncated: z.ZodBoolean;
|
|
47
|
+
canvasId: z.ZodOptional<z.ZodString>;
|
|
48
|
+
tableName: z.ZodOptional<z.ZodString>;
|
|
49
|
+
stagedRowCount: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
timeRange: z.ZodObject<{
|
|
51
|
+
start: z.ZodOptional<z.ZodString>;
|
|
52
|
+
end: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
missingObsCount: z.ZodNumber;
|
|
55
|
+
unmatchedValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
56
|
+
}, z.core.$strip>, readonly [{
|
|
57
|
+
readonly reason: "not_found";
|
|
58
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
59
|
+
readonly when: "The dataset code does not exist (HTTP 404 carrying Eurostat error id 100).";
|
|
60
|
+
readonly recovery: "Use eurostat_search_datasets or eurostat_browse_themes to find a valid dataset code.";
|
|
61
|
+
}, {
|
|
62
|
+
readonly reason: "no_results";
|
|
63
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
64
|
+
readonly when: "The query matched no observation cells — including Eurostat HTTP-200 error id 100. The dataset is valid, but no cell carries a value or a status flag for that filter combination and period range. When Eurostat returns the empty table, the error names the filter values that matched nothing (data.unmatchedValues) and the selected periods that carry no value (data.matchedPeriods, the newest 24, with data.matchedPeriodCount counting all of them).";
|
|
65
|
+
readonly recovery: "Verify dimension values with eurostat_get_dimension_values and keep the period range inside the dataset coverage; both an unmatched value and an out-of-coverage range return no data rather than an error.";
|
|
66
|
+
}, {
|
|
67
|
+
readonly reason: "invalid_period";
|
|
68
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
69
|
+
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; a period Eurostat itself rejects maps here too.";
|
|
70
|
+
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.";
|
|
71
|
+
}, {
|
|
72
|
+
readonly reason: "async_response";
|
|
73
|
+
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
74
|
+
readonly when: "Eurostat returned an async warning or an HTTP-413 error array — the query matched too many observations, including an EXTRACTION_TOO_BIG refusal past Eurostat's 5,000,000-row limit.";
|
|
75
|
+
readonly retryable: false;
|
|
76
|
+
readonly recovery: "Filter on the dataset dimensions this query left unfiltered, or narrow the period range, then retry.";
|
|
77
|
+
}, {
|
|
78
|
+
readonly reason: "invalid_dimension";
|
|
79
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
80
|
+
readonly when: "A dimension code in filters does not exist in this dataset (HTTP 400, Eurostat error id 150), or a filter key names a request control (lang, format, geoLevel, sinceTimePeriod, untilTimePeriod, lastTimePeriod, in any case) rather than a dimension — rejected before any request, naming the input that sets it.";
|
|
81
|
+
readonly recovery: "Use eurostat_get_dataset_info to see valid dimension codes for this dataset; set a control through its own input (lang, geo_level, since_period, until_period, last_n_periods), not filters.";
|
|
82
|
+
}, {
|
|
83
|
+
readonly reason: "conflicting_params";
|
|
84
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
85
|
+
readonly when: "Mutually exclusive parameters were combined: \"geo\" filter + geo_level, since_period/until_period + last_n_periods, or a \"time\"/\"time_period\" filter + since_period, until_period or last_n_periods. Checked before any request; Eurostat's own refusal of two time selections maps here too.";
|
|
86
|
+
readonly recovery: "Keep one of each pair: filters.geo or geo_level; since_period/until_period or last_n_periods; filters.time or a period input.";
|
|
87
|
+
}, {
|
|
88
|
+
readonly reason: "canvas_not_found";
|
|
89
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
90
|
+
readonly when: "A canvas_id was supplied for staging but is unknown or its lifetime has elapsed.";
|
|
91
|
+
readonly recovery: "Omit canvas_id so the response starts a fresh canvas and returns its canvasId.";
|
|
92
|
+
}, {
|
|
93
|
+
readonly reason: "upstream_fault";
|
|
94
|
+
readonly code: JsonRpcErrorCode.ServiceUnavailable;
|
|
95
|
+
readonly when: "The Statistics API answered HTTP 5xx or could not be reached on every attempt of the retry loop. The error is marked retryable, except for HTTP 501, which is marked not retryable.";
|
|
96
|
+
readonly recovery: "The failure is on Eurostat's side, not in the request: when the error is marked retryable, call again in a few minutes.";
|
|
97
|
+
}], {
|
|
98
|
+
readonly appliedFilters: z.ZodObject<{
|
|
99
|
+
filters: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
|
|
100
|
+
geoLevel: z.ZodOptional<z.ZodString>;
|
|
101
|
+
sincePeriod: z.ZodOptional<z.ZodString>;
|
|
102
|
+
untilPeriod: z.ZodOptional<z.ZodString>;
|
|
103
|
+
lastNPeriods: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
106
|
+
}>;
|
|
107
|
+
/** Default-on read-limit policy; startup selects the deployment policy explicitly. */
|
|
7
108
|
export declare const eurostatQueryDataset: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
8
109
|
dataset_code: z.ZodString;
|
|
9
110
|
filters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eurostat-query-dataset.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-query-dataset.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAiB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"eurostat-query-dataset.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurostat-query-dataset.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAiB,MAAM,+BAA+B,CAAC;AAkChF,+DAA+D;AAC/D,eAAO,MAAM,0BAA0B,gBAAiB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAohB3D,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmC,CAAC"}
|