@cyanheads/nasa-power-mcp-server 0.4.0 → 0.4.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 +2 -2
- package/CLAUDE.md +2 -2
- package/README.md +9 -5
- package/changelog/0.4.x/0.4.1.md +20 -0
- package/changelog/0.4.x/0.4.2.md +16 -0
- package/dist/config/server-config.d.ts +29 -0
- package/dist/config/server-config.d.ts.map +1 -1
- package/dist/config/server-config.js +29 -0
- package/dist/config/server-config.js.map +1 -1
- package/dist/mcp-server/tools/definitions/comparison-contracts.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/comparison-contracts.js +10 -4
- package/dist/mcp-server/tools/definitions/comparison-contracts.js.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-compare-locations.tool.d.ts +17 -3
- package/dist/mcp-server/tools/definitions/nasa-power-compare-locations.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-compare-locations.tool.js +19 -3
- package/dist/mcp-server/tools/definitions/nasa-power-compare-locations.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-describe.tool.d.ts +3 -3
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-describe.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-describe.tool.js +3 -3
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-describe.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-drop.tool.d.ts +3 -3
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-drop.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-drop.tool.js +3 -3
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-drop.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-query.tool.d.ts +3 -3
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-query.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-query.tool.js +3 -3
- package/dist/mcp-server/tools/definitions/nasa-power-dataframe-query.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-get-climatology.tool.d.ts +37 -3
- package/dist/mcp-server/tools/definitions/nasa-power-get-climatology.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-get-climatology.tool.js +20 -4
- package/dist/mcp-server/tools/definitions/nasa-power-get-climatology.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-get-region.tool.d.ts +17 -3
- package/dist/mcp-server/tools/definitions/nasa-power-get-region.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-get-region.tool.js +26 -6
- package/dist/mcp-server/tools/definitions/nasa-power-get-region.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-get-timeseries.tool.d.ts +37 -3
- package/dist/mcp-server/tools/definitions/nasa-power-get-timeseries.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-get-timeseries.tool.js +20 -4
- package/dist/mcp-server/tools/definitions/nasa-power-get-timeseries.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-list-reference.tool.js +3 -3
- package/dist/mcp-server/tools/definitions/nasa-power-list-reference.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-search-parameters.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/nasa-power-search-parameters.tool.js +14 -5
- package/dist/mcp-server/tools/definitions/nasa-power-search-parameters.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/point-contracts.d.ts +22 -2
- package/dist/mcp-server/tools/definitions/point-contracts.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/point-contracts.js +16 -6
- package/dist/mcp-server/tools/definitions/point-contracts.js.map +1 -1
- package/dist/services/canvas/canvas-service.d.ts +59 -6
- package/dist/services/canvas/canvas-service.d.ts.map +1 -1
- package/dist/services/canvas/canvas-service.js +172 -42
- package/dist/services/canvas/canvas-service.js.map +1 -1
- package/dist/services/canvas/errors.d.ts +12 -3
- package/dist/services/canvas/errors.d.ts.map +1 -1
- package/dist/services/canvas/errors.js +25 -5
- package/dist/services/canvas/errors.js.map +1 -1
- package/dist/services/canvas/inline-split.d.ts +73 -0
- package/dist/services/canvas/inline-split.d.ts.map +1 -0
- package/dist/services/canvas/inline-split.js +358 -0
- package/dist/services/canvas/inline-split.js.map +1 -0
- package/dist/services/canvas/producer-estimate.d.ts +13 -0
- package/dist/services/canvas/producer-estimate.d.ts.map +1 -0
- package/dist/services/canvas/producer-estimate.js +82 -0
- package/dist/services/canvas/producer-estimate.js.map +1 -0
- package/dist/services/power/normalize.d.ts.map +1 -1
- package/dist/services/power/normalize.js +4 -10
- package/dist/services/power/normalize.js.map +1 -1
- package/dist/services/power/power-service.d.ts +18 -2
- package/dist/services/power/power-service.d.ts.map +1 -1
- package/dist/services/power/power-service.js +89 -52
- package/dist/services/power/power-service.js.map +1 -1
- package/dist/services/power/presets.d.ts +7 -2
- package/dist/services/power/presets.d.ts.map +1 -1
- package/dist/services/power/presets.js +27 -2
- package/dist/services/power/presets.js.map +1 -1
- package/dist/services/power/unserved-parameters.d.ts +11 -0
- package/dist/services/power/unserved-parameters.d.ts.map +1 -0
- package/dist/services/power/unserved-parameters.js +47 -0
- package/dist/services/power/unserved-parameters.js.map +1 -0
- package/package.json +1 -1
- package/server.json +3 -3
- package/skills/nasa-power-guide/SKILL.md +10 -10
|
@@ -29,10 +29,10 @@ export declare const dataframeQueryTool: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
29
29
|
readonly recovery: "Check canvas_id against the producing response, or rerun the producing tool to stage a fresh dataset.";
|
|
30
30
|
readonly thrownBy: "service";
|
|
31
31
|
}, {
|
|
32
|
-
readonly reason: "
|
|
32
|
+
readonly reason: "canvas_busy";
|
|
33
33
|
readonly code: JsonRpcErrorCode.RateLimited;
|
|
34
|
-
readonly when: "
|
|
35
|
-
readonly recovery: "
|
|
34
|
+
readonly when: "Another operation occupies this canvas, or the process query pool is full";
|
|
35
|
+
readonly recovery: "A query or operation is already in flight; retry this call when it returns.";
|
|
36
36
|
readonly retryable: true;
|
|
37
37
|
readonly thrownBy: "service";
|
|
38
38
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nasa-power-dataframe-query.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-dataframe-query.tool.ts"],"names":[],"mappings":"AAAA,+IAA+I;AAC/I,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"nasa-power-dataframe-query.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-dataframe-query.tool.ts"],"names":[],"mappings":"AAAA,+IAA+I;AAC/I,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAKjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuI7B,CAAC"}
|
|
@@ -46,10 +46,10 @@ export const dataframeQueryTool = tool('nasa_power_dataframe_query', {
|
|
|
46
46
|
thrownBy: 'service',
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
reason: '
|
|
49
|
+
reason: 'canvas_busy',
|
|
50
50
|
code: JsonRpcErrorCode.RateLimited,
|
|
51
|
-
when: '
|
|
52
|
-
recovery: '
|
|
51
|
+
when: 'Another operation occupies this canvas, or the process query pool is full',
|
|
52
|
+
recovery: 'A query or operation is already in flight; retry this call when it returns.',
|
|
53
53
|
retryable: true,
|
|
54
54
|
thrownBy: 'service',
|
|
55
55
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nasa-power-dataframe-query.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-dataframe-query.tool.ts"],"names":[],"mappings":"AAAA,+IAA+I;AAC/I,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,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,4BAA4B,EAAE;IACnE,KAAK,EAAE,iCAAiC;IACxC,WAAW,EACT,iTAAiT;IACnT,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,CAAC,iDAAiD,CAAC;QACrF,GAAG,EAAE,CAAC;aACH,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC;aAC/B,QAAQ,CAAC,iDAAiD,CAAC;QAC9D,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,GAAG,EAAE;aACL,GAAG,CAAC,CAAC,CAAC;aACN,OAAO,CAAC,GAAG,CAAC;aACZ,QAAQ,CAAC,8EAA8E,CAAC;KAC5F,CAAC;IACF,MAAM,EAAE,iBAAiB;IACzB,UAAU,EAAE;QACV,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,6DAA6D,CAAC;KAC3E;IACD,MAAM,EAAE;QACN;YACE,MAAM,EAAE,oBAAoB;YAC5B,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;YACzC,IAAI,EAAE,mEAAmE;YACzE,QAAQ,EACN,gIAAgI;YAClI,QAAQ,EAAE,SAAS;SACpB;QACD;YACE,MAAM,EAAE,kBAAkB;YAC1B,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,uDAAuD;YAC7D,QAAQ,EACN,uGAAuG;YACzG,QAAQ,EAAE,SAAS;SACpB;QACD;YACE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"nasa-power-dataframe-query.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-dataframe-query.tool.ts"],"names":[],"mappings":"AAAA,+IAA+I;AAC/I,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,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEjF,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,4BAA4B,EAAE;IACnE,KAAK,EAAE,iCAAiC;IACxC,WAAW,EACT,iTAAiT;IACnT,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;IAC/E,KAAK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AAE,gBAAgB,CAAC,eAAe;YACtC,IAAI,EAAE,2DAA2D;YACjE,QAAQ,EACN,yGAAyG;YAC3G,QAAQ,EAAE,SAAS;SACpB;KACF;IACD,OAAO,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CACtB,gBAAgB,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,GAAG,CAAC;IAC9F,MAAM,EAAE,gBAAgB;CACzB,CAAC,CAAC"}
|
|
@@ -163,6 +163,26 @@ export declare const getClimatologyTool: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
163
163
|
describeTool: import("zod").ZodLiteral<"nasa_power_dataframe_describe">;
|
|
164
164
|
queryTool: import("zod").ZodLiteral<"nasa_power_dataframe_query">;
|
|
165
165
|
}, import("zod/v4/core").$strip>>;
|
|
166
|
+
summaryCount: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
167
|
+
summaryDataset: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
168
|
+
canvas_id: import("zod").ZodString;
|
|
169
|
+
table: import("zod").ZodString;
|
|
170
|
+
rowCount: import("zod").ZodNumber;
|
|
171
|
+
expiresAt: import("zod").ZodString;
|
|
172
|
+
columns: import("zod").ZodArray<import("zod").ZodObject<{
|
|
173
|
+
name: import("zod").ZodString;
|
|
174
|
+
type: import("zod").ZodString;
|
|
175
|
+
nullable: import("zod").ZodBoolean;
|
|
176
|
+
units: import("zod").ZodOptional<import("zod").ZodString>;
|
|
177
|
+
valueKind: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
178
|
+
categorical: "categorical";
|
|
179
|
+
number: "number";
|
|
180
|
+
orientation: "orientation";
|
|
181
|
+
}>>;
|
|
182
|
+
}, import("zod/v4/core").$strip>>;
|
|
183
|
+
describeTool: import("zod").ZodLiteral<"nasa_power_dataframe_describe">;
|
|
184
|
+
queryTool: import("zod").ZodLiteral<"nasa_power_dataframe_query">;
|
|
185
|
+
}, import("zod/v4/core").$strip>>;
|
|
166
186
|
request: import("zod").ZodObject<{
|
|
167
187
|
community: import("zod").ZodDefault<import("zod").ZodEnum<{
|
|
168
188
|
AG: "AG";
|
|
@@ -223,8 +243,8 @@ export declare const getClimatologyTool: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
223
243
|
}, import("zod/v4/core").$strip>, readonly [{
|
|
224
244
|
readonly reason: "canvas_required";
|
|
225
245
|
readonly code: JsonRpcErrorCode.ConfigurationError;
|
|
226
|
-
readonly when: "Oversized observations require an enabled workspace";
|
|
227
|
-
readonly recovery: "
|
|
246
|
+
readonly when: "Oversized observations or summaries require an enabled workspace";
|
|
247
|
+
readonly recovery: "Re-send the request as the calls listed in the error, each sized to fit inline, or use the npm or Docker distribution with CANVAS_PROVIDER_TYPE=duckdb.";
|
|
228
248
|
readonly thrownBy: "service";
|
|
229
249
|
}, {
|
|
230
250
|
readonly reason: "canvas_not_found";
|
|
@@ -282,12 +302,26 @@ export declare const getClimatologyTool: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
282
302
|
readonly when: "Complete data exceeds a bounded workload limit";
|
|
283
303
|
readonly recovery: "Narrow the date window, region, selected parameters, or location count and retry the producing tool.";
|
|
284
304
|
readonly thrownBy: "service";
|
|
305
|
+
}, {
|
|
306
|
+
readonly reason: "producer_capacity_exhausted";
|
|
307
|
+
readonly code: JsonRpcErrorCode.RateLimited;
|
|
308
|
+
readonly when: "Other data calls hold the in-flight capacity this call needs past its admission wait";
|
|
309
|
+
readonly recovery: "Another data call is in flight and holds the capacity this call needs; retry when it returns.";
|
|
310
|
+
readonly thrownBy: "service";
|
|
311
|
+
readonly retryable: true;
|
|
285
312
|
}, {
|
|
286
313
|
readonly reason: "canvas_capacity_exhausted";
|
|
287
314
|
readonly code: JsonRpcErrorCode.RateLimited;
|
|
288
|
-
readonly when: "
|
|
315
|
+
readonly when: "Canvas count, table or retained staging capacity is exhausted";
|
|
289
316
|
readonly recovery: "Reuse a canvas_id already returned to you, or wait for staged tables to expire before retrying.";
|
|
290
317
|
readonly thrownBy: "service";
|
|
291
318
|
readonly retryable: true;
|
|
319
|
+
}, {
|
|
320
|
+
readonly reason: "canvas_busy";
|
|
321
|
+
readonly code: JsonRpcErrorCode.RateLimited;
|
|
322
|
+
readonly when: "Another query, staging or removal occupies the supplied canvas";
|
|
323
|
+
readonly recovery: "A query or operation is already in flight; retry this call when it returns.";
|
|
324
|
+
readonly thrownBy: "service";
|
|
325
|
+
readonly retryable: true;
|
|
292
326
|
}], undefined>;
|
|
293
327
|
//# sourceMappingURL=nasa-power-get-climatology.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nasa-power-get-climatology.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-climatology.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,wEAAwE;AACxE,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"nasa-power-get-climatology.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-climatology.tool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,wEAAwE;AACxE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0I7B,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { PointOutputSchema, presentPoint } from './point-contracts.js';
|
|
|
8
8
|
/** Retrieve source observations with complete scientific provenance. */
|
|
9
9
|
export const getClimatologyTool = tool('nasa_power_get_climatology', {
|
|
10
10
|
title: 'Get NASA POWER climatology',
|
|
11
|
-
description: 'Retrieve complete monthly and annual climatology at latitude/longitude. Optionally supply both startYear and endYear; omitted years use the source product range. Use nasa_power_list_reference for presets and tilted solar aliases. Small profiles remain inline; larger profiles return a complete table handle and bounded preview, preserving orientation text. Supply canvas_id to reuse a returned workspace.',
|
|
11
|
+
description: 'Retrieve complete monthly and annual climatology at latitude/longitude. Optionally supply both startYear and endYear; omitted years use the source product range. Use nasa_power_list_reference for presets and tilted solar aliases. Small profiles remain inline; larger profiles return a complete table handle and bounded preview, preserving orientation text. Oversized summaries stage as summaryDataset with exact summaryCount, queried in summaryIndex order. Supply canvas_id to reuse a returned workspace.',
|
|
12
12
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
13
13
|
input: PowerRequestSchema.options[3].omit({ temporalResolution: true }).extend({
|
|
14
14
|
canvas_id: CanvasIdSchema.optional().describe('Reuse a returned canvas token for an oversized profile'),
|
|
@@ -20,8 +20,8 @@ export const getClimatologyTool = tool('nasa_power_get_climatology', {
|
|
|
20
20
|
{
|
|
21
21
|
reason: 'canvas_required',
|
|
22
22
|
code: JsonRpcErrorCode.ConfigurationError,
|
|
23
|
-
when: 'Oversized observations require an enabled workspace',
|
|
24
|
-
recovery: '
|
|
23
|
+
when: 'Oversized observations or summaries require an enabled workspace',
|
|
24
|
+
recovery: 'Re-send the request as the calls listed in the error, each sized to fit inline, or use the npm or Docker distribution with CANVAS_PROVIDER_TYPE=duckdb.',
|
|
25
25
|
thrownBy: 'service',
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -89,14 +89,30 @@ export const getClimatologyTool = tool('nasa_power_get_climatology', {
|
|
|
89
89
|
recovery: 'Narrow the date window, region, selected parameters, or location count and retry the producing tool.',
|
|
90
90
|
thrownBy: 'service',
|
|
91
91
|
},
|
|
92
|
+
{
|
|
93
|
+
reason: 'producer_capacity_exhausted',
|
|
94
|
+
code: JsonRpcErrorCode.RateLimited,
|
|
95
|
+
when: 'Other data calls hold the in-flight capacity this call needs past its admission wait',
|
|
96
|
+
recovery: 'Another data call is in flight and holds the capacity this call needs; retry when it returns.',
|
|
97
|
+
thrownBy: 'service',
|
|
98
|
+
retryable: true,
|
|
99
|
+
},
|
|
92
100
|
{
|
|
93
101
|
reason: 'canvas_capacity_exhausted',
|
|
94
102
|
code: JsonRpcErrorCode.RateLimited,
|
|
95
|
-
when: '
|
|
103
|
+
when: 'Canvas count, table or retained staging capacity is exhausted',
|
|
96
104
|
recovery: 'Reuse a canvas_id already returned to you, or wait for staged tables to expire before retrying.',
|
|
97
105
|
thrownBy: 'service',
|
|
98
106
|
retryable: true,
|
|
99
107
|
},
|
|
108
|
+
{
|
|
109
|
+
reason: 'canvas_busy',
|
|
110
|
+
code: JsonRpcErrorCode.RateLimited,
|
|
111
|
+
when: 'Another query, staging or removal occupies the supplied canvas',
|
|
112
|
+
recovery: 'A query or operation is already in flight; retry this call when it returns.',
|
|
113
|
+
thrownBy: 'service',
|
|
114
|
+
retryable: true,
|
|
115
|
+
},
|
|
100
116
|
],
|
|
101
117
|
async handler(input, ctx) {
|
|
102
118
|
const { canvas_id, ...request } = input;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nasa-power-get-climatology.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-climatology.tool.ts"],"names":[],"mappings":"AAAA,mIAAmI;AACnI,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,kCAAkC,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACvE,wEAAwE;AACxE,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,4BAA4B,EAAE;IACnE,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"nasa-power-get-climatology.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-climatology.tool.ts"],"names":[],"mappings":"AAAA,mIAAmI;AACnI,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,kCAAkC,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACnG,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACvE,wEAAwE;AACxE,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,4BAA4B,EAAE;IACnE,KAAK,EAAE,4BAA4B;IACnC,WAAW,EACT,0fAA0f;IAC5f,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IACxD,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,kBAAkB,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QAC7E,SAAS,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAC3C,wDAAwD,CACzD;KACF,CAAC;IACF,MAAM,EAAE,iB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S,EACT,GAAG,EACH,4BAA4B,CAC7B,CAAC;QACF,OAAO;YACL,GAAG,MAAM;YACT,OAAO,EAAE,EAAE,GAAG,MAAM,CAAC,OAAO,EAAE,kBAAkB,EAAE,aAAsB,EAAE;SAC3E,CAAC;IACJ,CAAC;IACD,MAAM,EAAE,gBAAgB;CACzB,CAAC,CAAC"}
|
|
@@ -263,8 +263,8 @@ export declare const getRegionTool: import("@cyanheads/mcp-ts-core").ToolDefinit
|
|
|
263
263
|
}, {
|
|
264
264
|
readonly reason: "canvas_required";
|
|
265
265
|
readonly code: JsonRpcErrorCode.ConfigurationError;
|
|
266
|
-
readonly when: "Oversized observations require an enabled workspace";
|
|
267
|
-
readonly recovery: "
|
|
266
|
+
readonly when: "Oversized observations or summaries require an enabled workspace";
|
|
267
|
+
readonly recovery: "Re-send the request as the calls listed in the error, each sized to fit inline, or use the npm or Docker distribution with CANVAS_PROVIDER_TYPE=duckdb.";
|
|
268
268
|
readonly thrownBy: "service";
|
|
269
269
|
}, {
|
|
270
270
|
readonly reason: "canvas_not_found";
|
|
@@ -272,13 +272,27 @@ export declare const getRegionTool: import("@cyanheads/mcp-ts-core").ToolDefinit
|
|
|
272
272
|
readonly when: "The supplied canvas token is absent or expired";
|
|
273
273
|
readonly recovery: "Check canvas_id against the producing response, or rerun the producing tool to stage a fresh dataset.";
|
|
274
274
|
readonly thrownBy: "service";
|
|
275
|
+
}, {
|
|
276
|
+
readonly reason: "producer_capacity_exhausted";
|
|
277
|
+
readonly code: JsonRpcErrorCode.RateLimited;
|
|
278
|
+
readonly when: "Other data calls hold the in-flight capacity this call needs past its admission wait";
|
|
279
|
+
readonly recovery: "Another data call is in flight and holds the capacity this call needs; retry when it returns.";
|
|
280
|
+
readonly thrownBy: "service";
|
|
281
|
+
readonly retryable: true;
|
|
275
282
|
}, {
|
|
276
283
|
readonly reason: "canvas_capacity_exhausted";
|
|
277
284
|
readonly code: JsonRpcErrorCode.RateLimited;
|
|
278
|
-
readonly when: "
|
|
285
|
+
readonly when: "Canvas count, table or retained staging capacity is exhausted";
|
|
279
286
|
readonly recovery: "Reuse a canvas_id already returned to you, or wait for staged tables to expire before retrying.";
|
|
280
287
|
readonly thrownBy: "service";
|
|
281
288
|
readonly retryable: true;
|
|
289
|
+
}, {
|
|
290
|
+
readonly reason: "canvas_busy";
|
|
291
|
+
readonly code: JsonRpcErrorCode.RateLimited;
|
|
292
|
+
readonly when: "Another query, staging or removal occupies the supplied canvas";
|
|
293
|
+
readonly recovery: "A query or operation is already in flight; retry this call when it returns.";
|
|
294
|
+
readonly thrownBy: "service";
|
|
295
|
+
readonly retryable: true;
|
|
282
296
|
}, {
|
|
283
297
|
readonly reason: "invalid_region";
|
|
284
298
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nasa-power-get-region.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-region.tool.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"nasa-power-get-region.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-region.tool.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAWjE,uEAAuE;AACvE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8JxB,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { CanvasIdSchema } from '@cyanheads/mcp-ts-core/canvas';
|
|
|
4
4
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
5
5
|
import { formatFaithfully } from '../../../services/canvas/format.js';
|
|
6
6
|
import { getCanvasService } from '../../../services/canvas/index.js';
|
|
7
|
+
import { estimateRegionBytes } from '../../../services/canvas/producer-estimate.js';
|
|
7
8
|
import { DatasetHandleSchema, getPowerService, RegionalDatasetSchema, RegionRequestSchema, } from '../../../services/power/index.js';
|
|
8
9
|
/** Retrieve one parameter across the complete returned native grid. */
|
|
9
10
|
export const getRegionTool = tool('nasa_power_get_region', {
|
|
@@ -78,8 +79,8 @@ export const getRegionTool = tool('nasa_power_get_region', {
|
|
|
78
79
|
{
|
|
79
80
|
reason: 'canvas_required',
|
|
80
81
|
code: JsonRpcErrorCode.ConfigurationError,
|
|
81
|
-
when: 'Oversized observations require an enabled workspace',
|
|
82
|
-
recovery: '
|
|
82
|
+
when: 'Oversized observations or summaries require an enabled workspace',
|
|
83
|
+
recovery: 'Re-send the request as the calls listed in the error, each sized to fit inline, or use the npm or Docker distribution with CANVAS_PROVIDER_TYPE=duckdb.',
|
|
83
84
|
thrownBy: 'service',
|
|
84
85
|
},
|
|
85
86
|
{
|
|
@@ -89,14 +90,30 @@ export const getRegionTool = tool('nasa_power_get_region', {
|
|
|
89
90
|
recovery: 'Check canvas_id against the producing response, or rerun the producing tool to stage a fresh dataset.',
|
|
90
91
|
thrownBy: 'service',
|
|
91
92
|
},
|
|
93
|
+
{
|
|
94
|
+
reason: 'producer_capacity_exhausted',
|
|
95
|
+
code: JsonRpcErrorCode.RateLimited,
|
|
96
|
+
when: 'Other data calls hold the in-flight capacity this call needs past its admission wait',
|
|
97
|
+
recovery: 'Another data call is in flight and holds the capacity this call needs; retry when it returns.',
|
|
98
|
+
thrownBy: 'service',
|
|
99
|
+
retryable: true,
|
|
100
|
+
},
|
|
92
101
|
{
|
|
93
102
|
reason: 'canvas_capacity_exhausted',
|
|
94
103
|
code: JsonRpcErrorCode.RateLimited,
|
|
95
|
-
when: '
|
|
104
|
+
when: 'Canvas count, table or retained staging capacity is exhausted',
|
|
96
105
|
recovery: 'Reuse a canvas_id already returned to you, or wait for staged tables to expire before retrying.',
|
|
97
106
|
thrownBy: 'service',
|
|
98
107
|
retryable: true,
|
|
99
108
|
},
|
|
109
|
+
{
|
|
110
|
+
reason: 'canvas_busy',
|
|
111
|
+
code: JsonRpcErrorCode.RateLimited,
|
|
112
|
+
when: 'Another query, staging or removal occupies the supplied canvas',
|
|
113
|
+
recovery: 'A query or operation is already in flight; retry this call when it returns.',
|
|
114
|
+
thrownBy: 'service',
|
|
115
|
+
retryable: true,
|
|
116
|
+
},
|
|
100
117
|
{
|
|
101
118
|
reason: 'invalid_region',
|
|
102
119
|
code: JsonRpcErrorCode.ValidationError,
|
|
@@ -115,11 +132,14 @@ export const getRegionTool = tool('nasa_power_get_region', {
|
|
|
115
132
|
handler(input, ctx) {
|
|
116
133
|
const { canvas_id, ...request } = input;
|
|
117
134
|
const canvas = getCanvasService();
|
|
118
|
-
return canvas.withProducer(
|
|
135
|
+
return canvas.withProducer(estimateRegionBytes(request), ctx, async (producerCtx, lease) => {
|
|
119
136
|
const power = getPowerService();
|
|
120
|
-
const budget = power.createCallBudget(producerCtx
|
|
137
|
+
const budget = power.createCallBudget(producerCtx, false, {
|
|
138
|
+
deadlineMs: lease.remainingMs(),
|
|
139
|
+
onHeldBytes: lease.bodyBytes,
|
|
140
|
+
});
|
|
121
141
|
const callCtx = { ...producerCtx, signal: budget.signal };
|
|
122
|
-
return canvas.presentRegion(await power.region(request, callCtx, budget), canvas_id, callCtx, 'nasa_power_get_region');
|
|
142
|
+
return canvas.presentRegion(await power.region(request, callCtx, budget), canvas_id, callCtx, 'nasa_power_get_region', lease);
|
|
123
143
|
});
|
|
124
144
|
},
|
|
125
145
|
format: formatFaithfully,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nasa-power-get-region.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-region.tool.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,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,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAEnC,uEAAuE;AACvE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,uBAAuB,EAAE;IACzD,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,skBAAskB;IACxkB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IACxD,KAAK,EAAE,CAAC,CAAC,kBAAkB,CAAC,oBAAoB,EAAE;QAChD,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YACpC,SAAS,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;SAC5F,CAAC;QACF,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YACpC,SAAS,EAAE,cAAc,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;SAC5F,CAAC;QACF,mBAAmB,CAAC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AC/B,IAAI,EAAE,gBAAgB,CAAC,WAAW;YAClC,IAAI,EAAE,uDAAuD;YAC7D,QAAQ,EACN,0GAA0G;YAC5G,QAAQ,EAAE,SAAS;SACpB;QACD;YACE,MAAM,EAAE,oBAAoB;YAC5B,IAAI,EAAE,gBAAgB,CAAC,WAAW;YAClC,IAAI,EAAE,yCAAyC;YAC/C,QAAQ,EAAE,oEAAoE;YAC9E,QAAQ,EAAE,SAAS;YACnB,SAAS,EAAE,IAAI;SAChB;QACD;YACE,MAAM,EAAE,iBAAiB;YACzB,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;YACzC,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"nasa-power-get-region.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-region.tool.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,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,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAEnC,uEAAuE;AACvE,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,uBAAuB,EAAE;IACzD,KAAK,EAAE,uBAAuB;IAC9B,WAAW,EACT,skBAAskB;IACxkB,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IACxD,KAAK,EAAE,CAAC,CAAC,kBAAkB,CAAC,oBAAoB,EAAE;QAChD,mBAAmB,CAAC,O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,EACP,uBAAuB,EACvB,KAAK,CACN,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;IACD,MAAM,EAAE,gBAAgB;CACzB,CAAC,CAAC"}
|
|
@@ -342,6 +342,26 @@ export declare const getTimeseriesTool: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
342
342
|
describeTool: z.ZodLiteral<"nasa_power_dataframe_describe">;
|
|
343
343
|
queryTool: z.ZodLiteral<"nasa_power_dataframe_query">;
|
|
344
344
|
}, z.core.$strip>>;
|
|
345
|
+
summaryCount: z.ZodOptional<z.ZodNumber>;
|
|
346
|
+
summaryDataset: z.ZodOptional<z.ZodObject<{
|
|
347
|
+
canvas_id: z.ZodString;
|
|
348
|
+
table: z.ZodString;
|
|
349
|
+
rowCount: z.ZodNumber;
|
|
350
|
+
expiresAt: z.ZodString;
|
|
351
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
352
|
+
name: z.ZodString;
|
|
353
|
+
type: z.ZodString;
|
|
354
|
+
nullable: z.ZodBoolean;
|
|
355
|
+
units: z.ZodOptional<z.ZodString>;
|
|
356
|
+
valueKind: z.ZodOptional<z.ZodEnum<{
|
|
357
|
+
categorical: "categorical";
|
|
358
|
+
number: "number";
|
|
359
|
+
orientation: "orientation";
|
|
360
|
+
}>>;
|
|
361
|
+
}, z.core.$strip>>;
|
|
362
|
+
describeTool: z.ZodLiteral<"nasa_power_dataframe_describe">;
|
|
363
|
+
queryTool: z.ZodLiteral<"nasa_power_dataframe_query">;
|
|
364
|
+
}, z.core.$strip>>;
|
|
345
365
|
}, z.core.$strip>, readonly [{
|
|
346
366
|
readonly reason: "unsupported_parameter";
|
|
347
367
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
@@ -392,18 +412,32 @@ export declare const getTimeseriesTool: import("@cyanheads/mcp-ts-core").ToolDef
|
|
|
392
412
|
readonly when: "Complete data exceeds a bounded workload limit";
|
|
393
413
|
readonly recovery: "Narrow the date window, region, selected parameters, or location count and retry the producing tool.";
|
|
394
414
|
readonly thrownBy: "service";
|
|
415
|
+
}, {
|
|
416
|
+
readonly reason: "producer_capacity_exhausted";
|
|
417
|
+
readonly code: JsonRpcErrorCode.RateLimited;
|
|
418
|
+
readonly when: "Other data calls hold the in-flight capacity this call needs past its admission wait";
|
|
419
|
+
readonly recovery: "Another data call is in flight and holds the capacity this call needs; retry when it returns.";
|
|
420
|
+
readonly thrownBy: "service";
|
|
421
|
+
readonly retryable: true;
|
|
395
422
|
}, {
|
|
396
423
|
readonly reason: "canvas_capacity_exhausted";
|
|
397
424
|
readonly code: JsonRpcErrorCode.RateLimited;
|
|
398
|
-
readonly when: "
|
|
425
|
+
readonly when: "Canvas count, table or retained staging capacity is exhausted";
|
|
399
426
|
readonly recovery: "Reuse a canvas_id already returned to you, or wait for staged tables to expire before retrying.";
|
|
400
427
|
readonly thrownBy: "service";
|
|
401
428
|
readonly retryable: true;
|
|
429
|
+
}, {
|
|
430
|
+
readonly reason: "canvas_busy";
|
|
431
|
+
readonly code: JsonRpcErrorCode.RateLimited;
|
|
432
|
+
readonly when: "Another query, staging or removal occupies the supplied canvas";
|
|
433
|
+
readonly recovery: "A query or operation is already in flight; retry this call when it returns.";
|
|
434
|
+
readonly thrownBy: "service";
|
|
435
|
+
readonly retryable: true;
|
|
402
436
|
}, {
|
|
403
437
|
readonly reason: "canvas_required";
|
|
404
438
|
readonly code: JsonRpcErrorCode.ConfigurationError;
|
|
405
|
-
readonly when: "Oversized observations require an enabled workspace";
|
|
406
|
-
readonly recovery: "
|
|
439
|
+
readonly when: "Oversized observations or summaries require an enabled workspace";
|
|
440
|
+
readonly recovery: "Re-send the request as the calls listed in the error, each sized to fit inline, or use the npm or Docker distribution with CANVAS_PROVIDER_TYPE=duckdb.";
|
|
407
441
|
readonly thrownBy: "service";
|
|
408
442
|
}, {
|
|
409
443
|
readonly reason: "canvas_not_found";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nasa-power-get-timeseries.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-timeseries.tool.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,wEAAwE;AACxE,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"nasa-power-get-timeseries.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-timeseries.tool.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,wEAAwE;AACxE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAyI5B,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { PointOutputSchema, presentPoint } from './point-contracts.js';
|
|
|
8
8
|
/** Retrieve source observations with complete scientific provenance. */
|
|
9
9
|
export const getTimeseriesTool = tool('nasa_power_get_timeseries', {
|
|
10
10
|
title: 'Get NASA POWER timeseries',
|
|
11
|
-
description: 'Retrieve complete hourly, daily or monthly observations at latitude/longitude. Hourly and daily require startDate/endDate; monthly requires startYear/endYear. Use nasa_power_search_parameters for codes and nasa_power_list_reference for presets. Large results return a full-table canvas handle and preview.',
|
|
11
|
+
description: 'Retrieve complete hourly, daily or monthly observations at latitude/longitude. Hourly and daily require startDate/endDate; monthly requires startYear/endYear. Use nasa_power_search_parameters for codes and nasa_power_list_reference for presets. Large results return a full-table canvas handle and preview; oversized summaries stage as summaryDataset with exact summaryCount, queried in summaryIndex order.',
|
|
12
12
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
13
13
|
input: z.discriminatedUnion('temporalResolution', [
|
|
14
14
|
PowerRequestSchema.options[0].extend({
|
|
@@ -81,19 +81,35 @@ export const getTimeseriesTool = tool('nasa_power_get_timeseries', {
|
|
|
81
81
|
recovery: 'Narrow the date window, region, selected parameters, or location count and retry the producing tool.',
|
|
82
82
|
thrownBy: 'service',
|
|
83
83
|
},
|
|
84
|
+
{
|
|
85
|
+
reason: 'producer_capacity_exhausted',
|
|
86
|
+
code: JsonRpcErrorCode.RateLimited,
|
|
87
|
+
when: 'Other data calls hold the in-flight capacity this call needs past its admission wait',
|
|
88
|
+
recovery: 'Another data call is in flight and holds the capacity this call needs; retry when it returns.',
|
|
89
|
+
thrownBy: 'service',
|
|
90
|
+
retryable: true,
|
|
91
|
+
},
|
|
84
92
|
{
|
|
85
93
|
reason: 'canvas_capacity_exhausted',
|
|
86
94
|
code: JsonRpcErrorCode.RateLimited,
|
|
87
|
-
when: '
|
|
95
|
+
when: 'Canvas count, table or retained staging capacity is exhausted',
|
|
88
96
|
recovery: 'Reuse a canvas_id already returned to you, or wait for staged tables to expire before retrying.',
|
|
89
97
|
thrownBy: 'service',
|
|
90
98
|
retryable: true,
|
|
91
99
|
},
|
|
100
|
+
{
|
|
101
|
+
reason: 'canvas_busy',
|
|
102
|
+
code: JsonRpcErrorCode.RateLimited,
|
|
103
|
+
when: 'Another query, staging or removal occupies the supplied canvas',
|
|
104
|
+
recovery: 'A query or operation is already in flight; retry this call when it returns.',
|
|
105
|
+
thrownBy: 'service',
|
|
106
|
+
retryable: true,
|
|
107
|
+
},
|
|
92
108
|
{
|
|
93
109
|
reason: 'canvas_required',
|
|
94
110
|
code: JsonRpcErrorCode.ConfigurationError,
|
|
95
|
-
when: 'Oversized observations require an enabled workspace',
|
|
96
|
-
recovery: '
|
|
111
|
+
when: 'Oversized observations or summaries require an enabled workspace',
|
|
112
|
+
recovery: 'Re-send the request as the calls listed in the error, each sized to fit inline, or use the npm or Docker distribution with CANVAS_PROVIDER_TYPE=duckdb.',
|
|
97
113
|
thrownBy: 'service',
|
|
98
114
|
},
|
|
99
115
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nasa-power-get-timeseries.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-timeseries.tool.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,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,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACvE,wEAAwE;AACxE,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,2BAA2B,EAAE;IACjE,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"nasa-power-get-timeseries.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-get-timeseries.tool.ts"],"names":[],"mappings":"AAAA,iIAAiI;AACjI,OAAO,EAAE,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,sFAAsF;YAC5F,QAAQ,EACN,+FAA+F;YACjG,QAAQ,EAAE,SAAS;YACnB,SAAS,EAAE,IAAI;SAChB;QACD;YACE,MAAM,EAAE,2BAA2B;YACnC,IAAI,EAAE,gBAAgB,CAAC,WAAW;YAClC,IAAI,EAAE,+DAA+D;YACrE,QAAQ,EACN,iGAAiG;YACnG,QAAQ,EAAE,SAAS;YACnB,SAAS,EAAE,IAAI;SAChB;QACD;YACE,MAAM,EAAE,aAAa;YACrB,IAAI,EAAE,gBAAgB,CAAC,WAAW;YAClC,IAAI,EAAE,gEAAgE;YACtE,QAAQ,EAAE,6EAA6E;YACvF,QAAQ,EAAE,SAAS;YACnB,SAAS,EAAE,IAAI;SAChB;QACD;YACE,MAAM,EAAE,iBAAiB;YACzB,IAAI,EAAE,gBAAgB,CAAC,kBAAkB;YACzC,IAAI,EAAE,kEAAkE;YACxE,QAAQ,EACN,yJAAyJ;YAC3J,QAAQ,EAAE,SAAS;SACpB;QACD;YACE,MAAM,EAAE,kBAAkB;YAC1B,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,mDAAmD;YACzD,QAAQ,EACN,uGAAuG;YACzG,QAAQ,EAAE,SAAS;SACpB;KACF;IACD,OAAO,CAAC,KAAK,EAAE,GAAG;QAChB,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK,CAAC;QACxC,OAAO,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,2BAA2B,CAAC,CAAC;IAC5E,CAAC;IACD,MAAM,EAAE,gBAAgB;CACzB,CAAC,CAAC"}
|
|
@@ -57,7 +57,7 @@ export const listReferenceTool = tool('nasa_power_list_reference', {
|
|
|
57
57
|
description: code === 'water_balance'
|
|
58
58
|
? 'Related precipitation, evapotranspiration and soil-wetness observations; incompatible units prohibit direct subtraction.'
|
|
59
59
|
: code === 'agroclimatology' && resolutions[0] !== 'hourly'
|
|
60
|
-
? 'Includes source-period maximum and minimum temperature; monthly and climatology extremes are source aggregates, not reconstructed daily records or calculated growing degree days.'
|
|
60
|
+
? 'Includes source-period maximum and minimum temperature; monthly and climatology extremes are source aggregates, not reconstructed daily records or calculated growing degree days. Growing degree days (GDD*) are served at daily resolution only; sum the daily values for a monthly or seasonal total.'
|
|
61
61
|
: 'Exact parameter group, validated against the selected community/resolution dictionary at retrieval.',
|
|
62
62
|
});
|
|
63
63
|
entries.push({
|
|
@@ -153,13 +153,13 @@ export const listReferenceTool = tool('nasa_power_list_reference', {
|
|
|
153
153
|
canvasTtlInMs: config.canvas.ttlMs,
|
|
154
154
|
absoluteLifetimeInMs: config.canvas.absoluteCapMs,
|
|
155
155
|
});
|
|
156
|
-
guidance.push('Use nasa_power_dataframe_describe and nasa_power_dataframe_query with the exact returned canvas_id. Tokens expire and cannot cross processes.', 'Oversized comparison summaries have summaryDatasets handles; query in summaryIndex order and group location summaries by locationId. SQL NULL units restore an omitted source unit.', 'Oversized
|
|
156
|
+
guidance.push('Use nasa_power_dataframe_describe and nasa_power_dataframe_query with the exact returned canvas_id. Tokens expire and cannot cross processes.', 'Oversized comparison summaries have summaryDatasets handles; query in summaryIndex order and group location summaries by locationId. SQL NULL units restore an omitted source unit.', 'Oversized region, time-series and climatology summaries have a summaryDataset handle and exact summaryCount; query in summaryIndex order to restore every summary.', 'npm and Docker installs stage larger tables in DuckDB by default; the portable MCPB supports inline data only. Without a native provider, an oversized result is refused with canvas_required listing calls that each fit inline; send those calls.');
|
|
157
157
|
if (getServerConfig().dataframeDropEnabled)
|
|
158
158
|
guidance.push('Use nasa_power_dataframe_drop to remove one explicitly named staged table. Removing the final table retires the canvas; later calls with that token return canvas_not_found.');
|
|
159
159
|
}
|
|
160
160
|
return {
|
|
161
161
|
topic,
|
|
162
|
-
verifiedOn: '2026-10-
|
|
162
|
+
verifiedOn: '2026-10-28',
|
|
163
163
|
documentationUrls: [
|
|
164
164
|
'https://power.larc.nasa.gov/docs/services/api/',
|
|
165
165
|
'https://power.larc.nasa.gov/docs/methodology/',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nasa-power-list-reference.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-list-reference.tool.ts"],"names":[],"mappings":"AAAA,6HAA6H;AAC7H,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEnG,MAAM,WAAW,GAAG,CAAC;KAClB,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,CAAC,CAAC;KAC3F,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAC/B,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IACjD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACtE,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACnF,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,EAAE;SACV,QAAQ,CAAC,mFAAmF,CAAC;IAChG,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uC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AAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC;wBACvF,WAAW;wBACX,WAAW,EACT,IAAI,KAAK,eAAe;4BACtB,CAAC,CAAC,0HAA0H;4BAC5H,CAAC,CAAC,IAAI,KAAK,iBAAiB,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,QAAQ;gCACzD,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"nasa-power-list-reference.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-list-reference.tool.ts"],"names":[],"mappings":"AAAA,6HAA6H;AAC7H,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAEnG,MAAM,WAAW,GAAG,CAAC;KAClB,IAAI,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,CAAC,CAAC;KAC3F,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAC/B,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;IACjD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACtE,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IACnF,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,CAAC,CA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G;iBACrB,CAAC,CAAC;YACL,OAAO,CAAC,IAAI,CACV;gBACE,IAAI,EAAE,KAAK;gBACX,WAAW,EACT,4FAA4F;aAC/F,EACD;gBACE,IAAI,EAAE,KAAK;gBACX,WAAW,EACT,yFAAyF;aAC5F,CACF,CAAC;YACF,QAAQ,CAAC,IAAI,CACX,uIAAuI,CACxI,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC;gBACX,IAAI,EAAE,YAAY;gBAClB,WAAW,EACT,qNAAqN;gBACvN,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,KAAK,QAAQ;gBAClD,WAAW,EAAE,eAAe,EAAE,CAAC,oBAAoB;gBACnD,YAAY,EAAE,YAAY,CAAC,UAAU;gBACrC,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK;gBAClC,oBAAoB,EAAE,MAAM,CAAC,MAAM,CAAC,aAAa;aAClD,CAAC,CAAC;YACH,QAAQ,CAAC,IAAI,CACX,+IAA+I,EAC/I,qLAAqL,EACrL,oKAAoK,EACpK,qPAAqP,CACtP,CAAC;YACF,IAAI,eAAe,EAAE,CAAC,oBAAoB;gBACxC,QAAQ,CAAC,IAAI,CACX,8KAA8K,CAC/K,CAAC;QACN,CAAC;QACD,OAAO;YACL,KAAK;YACL,UAAU,EAAE,YAAY;YACxB,iBAAiB,EAAE;gBACjB,gDAAgD;gBAChD,+CAA+C;aAChD;YACD,OAAO;YACP,QAAQ;SACT,CAAC;IACJ,CAAC;IACD,MAAM,EAAE,gBAAgB;CACzB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nasa-power-search-parameters.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-search-parameters.tool.ts"],"names":[],"mappings":"AAAA,6IAA6I;AAC7I,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"nasa-power-search-parameters.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/nasa-power-search-parameters.tool.ts"],"names":[],"mappings":"AAAA,6IAA6I;AAC7I,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAejE,iEAAiE;AACjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsI/B,CAAC"}
|
|
@@ -3,13 +3,14 @@ import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
|
3
3
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
4
4
|
import { formatFaithfully } from '../../../services/canvas/format.js';
|
|
5
5
|
import { CommunitySchema, DictionaryEntrySchema, getPowerService, REFERENCE_LIMIT_RECOVERY, ResolutionSchema, } from '../../../services/power/index.js';
|
|
6
|
+
import { unservedParameters } from '../../../services/power/unserved-parameters.js';
|
|
6
7
|
const SearchEntrySchema = DictionaryEntrySchema.extend({
|
|
7
8
|
code: z.string().describe('Exact source parameter code'),
|
|
8
9
|
});
|
|
9
10
|
/** Resolve exact source codes before requesting observations. */
|
|
10
11
|
export const searchParametersTool = tool('nasa_power_search_parameters', {
|
|
11
12
|
title: 'Search NASA POWER parameters',
|
|
12
|
-
description: 'Find parameter codes supported by a community and temporalResolution. Every whitespace-separated filter token must match code, name or definition, ignoring case. Filtering covers the complete dictionary before sorted pagination. Blank filter browses all codes; pass returned codes to a producing tool.',
|
|
13
|
+
description: 'Find parameter codes supported by a community and temporalResolution. Every whitespace-separated filter token must match code, name or definition, ignoring case. Filtering covers the complete dictionary before sorted pagination. Codes NASA lists but does not serve at that resolution are left out, and a notice names any the filter matched. Blank filter browses all codes; pass returned codes to a producing tool.',
|
|
13
14
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
14
15
|
input: z.strictObject({
|
|
15
16
|
community: CommunitySchema.default('RE'),
|
|
@@ -38,7 +39,9 @@ export const searchParametersTool = tool('nasa_power_search_parameters', {
|
|
|
38
39
|
filter: z.string().describe('Effective local token filter'),
|
|
39
40
|
offset: z.number().describe('Requested filtered offset'),
|
|
40
41
|
limit: z.number().describe('Effective maximum entry count, capped at 100'),
|
|
41
|
-
total: z
|
|
42
|
+
total: z
|
|
43
|
+
.number()
|
|
44
|
+
.describe('Total matches across the complete dictionary, excluding codes NASA does not serve'),
|
|
42
45
|
hasMore: z.boolean().describe('Whether another filtered page follows'),
|
|
43
46
|
truncated: z.boolean().describe('Whether matching entries remain after this page'),
|
|
44
47
|
entries: z
|
|
@@ -49,7 +52,7 @@ export const searchParametersTool = tool('nasa_power_search_parameters', {
|
|
|
49
52
|
notice: z
|
|
50
53
|
.string()
|
|
51
54
|
.optional()
|
|
52
|
-
.describe('Effective output cap or guidance when the complete filter has no matches'),
|
|
55
|
+
.describe('Effective output cap, matched codes left out because NASA does not serve them at this resolution, or guidance when the complete filter has no matches'),
|
|
53
56
|
},
|
|
54
57
|
errors: [
|
|
55
58
|
{
|
|
@@ -87,7 +90,7 @@ export const searchParametersTool = tool('nasa_power_search_parameters', {
|
|
|
87
90
|
const limit = Math.min(input.limit, 100);
|
|
88
91
|
const dictionary = await getPowerService().dictionary(input.community, input.temporalResolution, ctx);
|
|
89
92
|
const tokens = input.filter.toLowerCase().split(/\s+/).filter(Boolean);
|
|
90
|
-
const
|
|
93
|
+
const filtered = Object.entries(dictionary)
|
|
91
94
|
.filter(([code, entry]) => {
|
|
92
95
|
const text = [code, entry.name, entry.definition]
|
|
93
96
|
.filter((value) => value !== undefined)
|
|
@@ -96,11 +99,17 @@ export const searchParametersTool = tool('nasa_power_search_parameters', {
|
|
|
96
99
|
return tokens.every((token) => text.includes(token));
|
|
97
100
|
})
|
|
98
101
|
.sort(([left], [right]) => left.localeCompare(right));
|
|
102
|
+
const unserved = unservedParameters(filtered.map(([code]) => code), input.temporalResolution);
|
|
103
|
+
const matches = unserved
|
|
104
|
+
? filtered.filter(([code]) => !unserved.parameters.includes(code))
|
|
105
|
+
: filtered;
|
|
99
106
|
ctx.signal.throwIfAborted();
|
|
100
107
|
const notices = [];
|
|
101
108
|
if (input.limit > limit)
|
|
102
109
|
notices.push('The effective entry limit is 100; larger requested limits are capped.');
|
|
103
|
-
if (
|
|
110
|
+
if (unserved)
|
|
111
|
+
notices.push(`Excluded ${unserved.parameters.join(', ')}: NASA lists ${unserved.parameters.length === 1 ? 'this code' : 'these codes'} for ${input.temporalResolution} but does not serve ${unserved.parameters.length === 1 ? 'it' : 'them'} at that resolution. ${unserved.recovery}`);
|
|
112
|
+
else if (matches.length === 0)
|
|
104
113
|
notices.push('No parameters matched this filter for the selected community and temporal resolution. Broaden filter or use nasa_power_list_reference topic presets.');
|
|
105
114
|
if (notices.length)
|
|
106
115
|
ctx.enrich.notice(notices.join(' '));
|