@rnsk/toolkits 0.0.10 → 0.0.11
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/README.md +12 -2
- package/dist/index.d.ts +11 -1
- package/dist/index.js +21 -1
- package/dist/toolkits/bitbucket/tools/index.d.ts +5 -5
- package/dist/toolkits/bitbucket/tools/reports.d.ts +5 -5
- package/dist/toolkits/cloudflare/tools/create-list.d.ts +1 -1
- package/dist/toolkits/cloudflare/tools/create-zone.d.ts +1 -1
- package/dist/toolkits/cloudflare/tools/index.d.ts +4 -4
- package/dist/toolkits/cloudflare/tools/list-pools.d.ts +1 -1
- package/dist/toolkits/cloudflare/tools/list-zones.d.ts +1 -1
- package/dist/toolkits/convex/icon.d.ts +5 -0
- package/dist/toolkits/convex/icon.js +10 -0
- package/dist/toolkits/convex/manifest.d.ts +3 -0
- package/dist/toolkits/convex/manifest.js +33 -0
- package/dist/toolkits/convex/tools/client.d.ts +28 -0
- package/dist/toolkits/convex/tools/client.js +85 -0
- package/dist/toolkits/convex/tools/deploy-keys.d.ts +10 -0
- package/dist/toolkits/convex/tools/deploy-keys.js +46 -0
- package/dist/toolkits/convex/tools/deployments.d.ts +35 -0
- package/dist/toolkits/convex/tools/deployments.js +126 -0
- package/dist/toolkits/convex/tools/domains.d.ts +7 -0
- package/dist/toolkits/convex/tools/domains.js +29 -0
- package/dist/toolkits/convex/tools/functions.d.ts +14 -0
- package/dist/toolkits/convex/tools/functions.js +49 -0
- package/dist/toolkits/convex/tools/index.d.ts +176 -0
- package/dist/toolkits/convex/tools/index.js +145 -0
- package/dist/toolkits/convex/tools/logging.d.ts +5 -0
- package/dist/toolkits/convex/tools/logging.js +25 -0
- package/dist/toolkits/convex/tools/projects.d.ts +31 -0
- package/dist/toolkits/convex/tools/projects.js +111 -0
- package/dist/toolkits/convex/tools/teams.d.ts +12 -0
- package/dist/toolkits/convex/tools/teams.js +62 -0
- package/dist/toolkits/datadog/icon.d.ts +5 -0
- package/dist/toolkits/datadog/icon.js +6 -0
- package/dist/toolkits/datadog/manifest.d.ts +3 -0
- package/dist/toolkits/datadog/manifest.js +44 -0
- package/dist/toolkits/datadog/tools/api-keys.d.ts +21 -0
- package/dist/toolkits/datadog/tools/api-keys.js +42 -0
- package/dist/toolkits/datadog/tools/apm.d.ts +51 -0
- package/dist/toolkits/datadog/tools/apm.js +106 -0
- package/dist/toolkits/datadog/tools/client.d.ts +19 -0
- package/dist/toolkits/datadog/tools/client.js +81 -0
- package/dist/toolkits/datadog/tools/dashboards.d.ts +93 -0
- package/dist/toolkits/datadog/tools/dashboards.js +127 -0
- package/dist/toolkits/datadog/tools/events.d.ts +35 -0
- package/dist/toolkits/datadog/tools/events.js +56 -0
- package/dist/toolkits/datadog/tools/hosts.d.ts +49 -0
- package/dist/toolkits/datadog/tools/hosts.js +87 -0
- package/dist/toolkits/datadog/tools/incidents.d.ts +18 -0
- package/dist/toolkits/datadog/tools/incidents.js +34 -0
- package/dist/toolkits/datadog/tools/index.d.ts +999 -0
- package/dist/toolkits/datadog/tools/index.js +450 -0
- package/dist/toolkits/datadog/tools/integrations.d.ts +32 -0
- package/dist/toolkits/datadog/tools/integrations.js +47 -0
- package/dist/toolkits/datadog/tools/logs.d.ts +39 -0
- package/dist/toolkits/datadog/tools/logs.js +121 -0
- package/dist/toolkits/datadog/tools/metrics.d.ts +27 -0
- package/dist/toolkits/datadog/tools/metrics.js +83 -0
- package/dist/toolkits/datadog/tools/monitors.d.ts +95 -0
- package/dist/toolkits/datadog/tools/monitors.js +190 -0
- package/dist/toolkits/datadog/tools/oncall-notifications.d.ts +61 -0
- package/dist/toolkits/datadog/tools/oncall-notifications.js +155 -0
- package/dist/toolkits/datadog/tools/oncall-policies.d.ts +28 -0
- package/dist/toolkits/datadog/tools/oncall-policies.js +72 -0
- package/dist/toolkits/datadog/tools/oncall-schedules.d.ts +31 -0
- package/dist/toolkits/datadog/tools/oncall-schedules.js +87 -0
- package/dist/toolkits/datadog/tools/oncall-teams.d.ts +14 -0
- package/dist/toolkits/datadog/tools/oncall-teams.js +54 -0
- package/dist/toolkits/datadog/tools/slos.d.ts +43 -0
- package/dist/toolkits/datadog/tools/slos.js +62 -0
- package/dist/toolkits/datadog/tools/synthetics.d.ts +58 -0
- package/dist/toolkits/datadog/tools/synthetics.js +90 -0
- package/dist/toolkits/datadog/tools/usage.d.ts +7 -0
- package/dist/toolkits/datadog/tools/usage.js +25 -0
- package/dist/toolkits/datadog/tools/users.d.ts +35 -0
- package/dist/toolkits/datadog/tools/users.js +66 -0
- package/dist/toolkits/dev-to/icon.d.ts +5 -0
- package/dist/toolkits/dev-to/icon.js +10 -0
- package/dist/toolkits/dev-to/manifest.d.ts +3 -0
- package/dist/toolkits/dev-to/manifest.js +34 -0
- package/dist/toolkits/dev-to/tools/articles.d.ts +78 -0
- package/dist/toolkits/dev-to/tools/articles.js +262 -0
- package/dist/toolkits/dev-to/tools/client.d.ts +25 -0
- package/dist/toolkits/dev-to/tools/client.js +65 -0
- package/dist/toolkits/dev-to/tools/community.d.ts +61 -0
- package/dist/toolkits/dev-to/tools/community.js +244 -0
- package/dist/toolkits/dev-to/tools/index.d.ts +202 -0
- package/dist/toolkits/dev-to/tools/index.js +37 -0
- package/dist/toolkits/dev-to/tools/listings.d.ts +26 -0
- package/dist/toolkits/dev-to/tools/listings.js +92 -0
- package/dist/toolkits/discord/tools/applications.d.ts +5 -5
- package/dist/toolkits/discord/tools/index.d.ts +5 -5
- package/dist/toolkits/figma/tools/create-modify-delete-variables.d.ts +1 -1
- package/dist/toolkits/figma/tools/get-file-nodes.d.ts +1 -1
- package/dist/toolkits/figma/tools/index.d.ts +3 -3
- package/dist/toolkits/figma/tools/render-images-of-file-nodes.d.ts +1 -1
- package/dist/toolkits/google-analytics/tools/reports.d.ts +9 -9
- package/dist/toolkits/google-classroom/tools/index.d.ts +7 -7
- package/dist/toolkits/google-classroom/tools/invitations.d.ts +2 -2
- package/dist/toolkits/google-classroom/tools/misc.d.ts +1 -1
- package/dist/toolkits/google-classroom/tools/roster.d.ts +5 -5
- package/dist/toolkits/google-search-console/tools/index.d.ts +2 -2
- package/dist/toolkits/google-search-console/tools/search-analytics-query.d.ts +2 -2
- package/dist/toolkits/hostinger/tools/index.d.ts +1 -1
- package/dist/toolkits/hostinger/tools/whois.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/datasets-viewer.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/datasets.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/index.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/models.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/repos.d.ts +1 -1
- package/dist/toolkits/hugging-face/tools/spaces.d.ts +1 -1
- package/dist/toolkits/jira/tools/index.d.ts +4 -4
- package/dist/toolkits/jira/tools/meta.d.ts +2 -2
- package/dist/toolkits/jira/tools/users.d.ts +3 -3
- package/dist/toolkits/kaggle/icon.d.ts +5 -0
- package/dist/toolkits/kaggle/icon.js +6 -0
- package/dist/toolkits/kaggle/manifest.d.ts +3 -0
- package/dist/toolkits/kaggle/manifest.js +32 -0
- package/dist/toolkits/kaggle/tools/client.d.ts +10 -0
- package/dist/toolkits/kaggle/tools/client.js +94 -0
- package/dist/toolkits/kaggle/tools/competitions.d.ts +48 -0
- package/dist/toolkits/kaggle/tools/competitions.js +109 -0
- package/dist/toolkits/kaggle/tools/config.d.ts +110 -0
- package/dist/toolkits/kaggle/tools/config.js +256 -0
- package/dist/toolkits/kaggle/tools/datasets.d.ts +88 -0
- package/dist/toolkits/kaggle/tools/datasets.js +161 -0
- package/dist/toolkits/kaggle/tools/index.d.ts +482 -0
- package/dist/toolkits/kaggle/tools/index.js +53 -0
- package/dist/toolkits/kaggle/tools/kernels.d.ts +62 -0
- package/dist/toolkits/kaggle/tools/kernels.js +121 -0
- package/dist/toolkits/kaggle/tools/model_instance_files.d.ts +11 -0
- package/dist/toolkits/kaggle/tools/model_instance_files.js +23 -0
- package/dist/toolkits/kaggle/tools/model_instances.d.ts +8 -0
- package/dist/toolkits/kaggle/tools/model_instances.js +20 -0
- package/dist/toolkits/kaggle/tools/models.d.ts +14 -0
- package/dist/toolkits/kaggle/tools/models.js +33 -0
- package/dist/toolkits/nasa/icon.d.ts +5 -0
- package/dist/toolkits/nasa/icon.js +56 -0
- package/dist/toolkits/nasa/manifest.d.ts +3 -0
- package/dist/toolkits/nasa/manifest.js +49 -0
- package/dist/toolkits/nasa/tools/agage.d.ts +60 -0
- package/dist/toolkits/nasa/tools/agage.js +176 -0
- package/dist/toolkits/nasa/tools/client.d.ts +95 -0
- package/dist/toolkits/nasa/tools/client.js +337 -0
- package/dist/toolkits/nasa/tools/cmr.d.ts +268 -0
- package/dist/toolkits/nasa/tools/cmr.js +984 -0
- package/dist/toolkits/nasa/tools/donki.d.ts +63 -0
- package/dist/toolkits/nasa/tools/donki.js +301 -0
- package/dist/toolkits/nasa/tools/eonet.d.ts +74 -0
- package/dist/toolkits/nasa/tools/eonet.js +279 -0
- package/dist/toolkits/nasa/tools/icesat2.d.ts +25 -0
- package/dist/toolkits/nasa/tools/icesat2.js +97 -0
- package/dist/toolkits/nasa/tools/imagery.d.ts +36 -0
- package/dist/toolkits/nasa/tools/imagery.js +138 -0
- package/dist/toolkits/nasa/tools/index.d.ts +1063 -0
- package/dist/toolkits/nasa/tools/index.js +865 -0
- package/dist/toolkits/nasa/tools/neo.d.ts +15 -0
- package/dist/toolkits/nasa/tools/neo.js +75 -0
- package/dist/toolkits/nasa/tools/ntrs.d.ts +152 -0
- package/dist/toolkits/nasa/tools/ntrs.js +292 -0
- package/dist/toolkits/nasa/tools/osdr.d.ts +72 -0
- package/dist/toolkits/nasa/tools/osdr.js +290 -0
- package/dist/toolkits/nasa/tools/planetary.d.ts +58 -0
- package/dist/toolkits/nasa/tools/planetary.js +312 -0
- package/dist/toolkits/nasa/tools/power.d.ts +52 -0
- package/dist/toolkits/nasa/tools/power.js +213 -0
- package/dist/toolkits/nasa/tools/ssc.d.ts +44 -0
- package/dist/toolkits/nasa/tools/ssc.js +92 -0
- package/dist/toolkits/nasa/tools/tolnet.d.ts +84 -0
- package/dist/toolkits/nasa/tools/tolnet.js +254 -0
- package/dist/toolkits/neo4j/tools/analytics.d.ts +1 -1
- package/dist/toolkits/neo4j/tools/index.d.ts +3 -3
- package/dist/toolkits/neo4j/tools/instances.d.ts +2 -2
- package/dist/toolkits/neon/tools/auth.d.ts +4 -4
- package/dist/toolkits/neon/tools/dataapi.d.ts +1 -1
- package/dist/toolkits/neon/tools/index.d.ts +7 -7
- package/dist/toolkits/neon/tools/projects.d.ts +2 -2
- package/dist/toolkits/new-relic/icon.d.ts +5 -0
- package/dist/toolkits/new-relic/icon.js +6 -0
- package/dist/toolkits/new-relic/manifest.d.ts +3 -0
- package/dist/toolkits/new-relic/manifest.js +41 -0
- package/dist/toolkits/new-relic/tools/admin.d.ts +310 -0
- package/dist/toolkits/new-relic/tools/admin.js +282 -0
- package/dist/toolkits/new-relic/tools/alert-policies.d.ts +74 -0
- package/dist/toolkits/new-relic/tools/alert-policies.js +136 -0
- package/dist/toolkits/new-relic/tools/apm.d.ts +129 -0
- package/dist/toolkits/new-relic/tools/apm.js +228 -0
- package/dist/toolkits/new-relic/tools/client.d.ts +62 -0
- package/dist/toolkits/new-relic/tools/client.js +167 -0
- package/dist/toolkits/new-relic/tools/conditions.d.ts +190 -0
- package/dist/toolkits/new-relic/tools/conditions.js +265 -0
- package/dist/toolkits/new-relic/tools/config.d.ts +73 -0
- package/dist/toolkits/new-relic/tools/config.js +131 -0
- package/dist/toolkits/new-relic/tools/dashboards.d.ts +204 -0
- package/dist/toolkits/new-relic/tools/dashboards.js +159 -0
- package/dist/toolkits/new-relic/tools/entities.d.ts +160 -0
- package/dist/toolkits/new-relic/tools/entities.js +218 -0
- package/dist/toolkits/new-relic/tools/index.d.ts +23 -0
- package/dist/toolkits/new-relic/tools/index.js +179 -0
- package/dist/toolkits/new-relic/tools/ingest.d.ts +31 -0
- package/dist/toolkits/new-relic/tools/ingest.js +80 -0
- package/dist/toolkits/new-relic/tools/notifications.d.ts +186 -0
- package/dist/toolkits/new-relic/tools/notifications.js +232 -0
- package/dist/toolkits/new-relic/tools/nrql-conditions.d.ts +105 -0
- package/dist/toolkits/new-relic/tools/nrql-conditions.js +136 -0
- package/dist/toolkits/new-relic/tools/nrql.d.ts +38 -0
- package/dist/toolkits/new-relic/tools/nrql.js +99 -0
- package/dist/toolkits/new-relic/tools/synthetics.d.ts +176 -0
- package/dist/toolkits/new-relic/tools/synthetics.js +246 -0
- package/dist/toolkits/notebook-lm/icon.d.ts +5 -0
- package/dist/toolkits/notebook-lm/icon.js +6 -0
- package/dist/toolkits/notebook-lm/manifest.d.ts +3 -0
- package/dist/toolkits/notebook-lm/manifest.js +44 -0
- package/dist/toolkits/notebook-lm/tools/add-text-sources.d.ts +36 -0
- package/dist/toolkits/notebook-lm/tools/add-text-sources.js +51 -0
- package/dist/toolkits/notebook-lm/tools/create-audio-overview.d.ts +47 -0
- package/dist/toolkits/notebook-lm/tools/create-audio-overview.js +55 -0
- package/dist/toolkits/notebook-lm/tools/create-notebook.d.ts +52 -0
- package/dist/toolkits/notebook-lm/tools/create-notebook.js +49 -0
- package/dist/toolkits/notebook-lm/tools/delete-audio-overview.d.ts +33 -0
- package/dist/toolkits/notebook-lm/tools/delete-audio-overview.js +46 -0
- package/dist/toolkits/notebook-lm/tools/delete-notebooks.d.ts +32 -0
- package/dist/toolkits/notebook-lm/tools/delete-notebooks.js +46 -0
- package/dist/toolkits/notebook-lm/tools/delete-sources.d.ts +33 -0
- package/dist/toolkits/notebook-lm/tools/delete-sources.js +47 -0
- package/dist/toolkits/notebook-lm/tools/get-notebook.d.ts +52 -0
- package/dist/toolkits/notebook-lm/tools/get-notebook.js +45 -0
- package/dist/toolkits/notebook-lm/tools/get-source.d.ts +53 -0
- package/dist/toolkits/notebook-lm/tools/get-source.js +47 -0
- package/dist/toolkits/notebook-lm/tools/index.d.ts +516 -0
- package/dist/toolkits/notebook-lm/tools/index.js +93 -0
- package/dist/toolkits/notebook-lm/tools/list-recent-notebooks.d.ts +32 -0
- package/dist/toolkits/notebook-lm/tools/list-recent-notebooks.js +41 -0
- package/dist/toolkits/notebook-lm/tools/share-notebook.d.ts +48 -0
- package/dist/toolkits/notebook-lm/tools/share-notebook.js +57 -0
- package/dist/toolkits/notebook-lm/tools/upload-source-file.d.ts +40 -0
- package/dist/toolkits/notebook-lm/tools/upload-source-file.js +62 -0
- package/dist/toolkits/notebook-lm/tools/utils.d.ts +15 -0
- package/dist/toolkits/notebook-lm/tools/utils.js +46 -0
- package/dist/toolkits/npm/icon.d.ts +5 -0
- package/dist/toolkits/npm/icon.js +11 -0
- package/dist/toolkits/npm/manifest.d.ts +3 -0
- package/dist/toolkits/npm/manifest.js +35 -0
- package/dist/toolkits/npm/tools/client.d.ts +19 -0
- package/dist/toolkits/npm/tools/client.js +64 -0
- package/dist/toolkits/npm/tools/downloads.d.ts +19 -0
- package/dist/toolkits/npm/tools/downloads.js +39 -0
- package/dist/toolkits/npm/tools/index.d.ts +14 -0
- package/dist/toolkits/npm/tools/index.js +24 -0
- package/dist/toolkits/npm/tools/registry.d.ts +24 -0
- package/dist/toolkits/npm/tools/registry.js +58 -0
- package/dist/toolkits/npm/tools/security.d.ts +9 -0
- package/dist/toolkits/npm/tools/security.js +29 -0
- package/dist/toolkits/slack/tools/admin-users.d.ts +1 -1
- package/dist/toolkits/slack/tools/slack-lists.d.ts +3 -3
- package/dist/toolkits/snowflake/icon.d.ts +5 -0
- package/dist/toolkits/snowflake/icon.js +6 -0
- package/dist/toolkits/snowflake/manifest.d.ts +3 -0
- package/dist/toolkits/snowflake/manifest.js +32 -0
- package/dist/toolkits/snowflake/tools/catalog.d.ts +56 -0
- package/dist/toolkits/snowflake/tools/catalog.js +123 -0
- package/dist/toolkits/snowflake/tools/client.d.ts +53 -0
- package/dist/toolkits/snowflake/tools/client.js +145 -0
- package/dist/toolkits/snowflake/tools/index.d.ts +14 -0
- package/dist/toolkits/snowflake/tools/index.js +28 -0
- package/dist/toolkits/snowflake/tools/statements.d.ts +27 -0
- package/dist/toolkits/snowflake/tools/statements.js +84 -0
- package/dist/toolkits/snowflake/tools/status.d.ts +22 -0
- package/dist/toolkits/snowflake/tools/status.js +54 -0
- package/dist/toolkits/telegram/icon.d.ts +5 -0
- package/dist/toolkits/telegram/icon.js +6 -0
- package/dist/toolkits/telegram/manifest.d.ts +3 -0
- package/dist/toolkits/telegram/manifest.js +34 -0
- package/dist/toolkits/telegram/tools/bot.d.ts +13 -0
- package/dist/toolkits/telegram/tools/bot.js +23 -0
- package/dist/toolkits/telegram/tools/chats.d.ts +22 -0
- package/dist/toolkits/telegram/tools/chats.js +46 -0
- package/dist/toolkits/telegram/tools/client.d.ts +12 -0
- package/dist/toolkits/telegram/tools/client.js +46 -0
- package/dist/toolkits/telegram/tools/index.d.ts +15 -0
- package/dist/toolkits/telegram/tools/index.js +31 -0
- package/dist/toolkits/telegram/tools/messages.d.ts +86 -0
- package/dist/toolkits/telegram/tools/messages.js +134 -0
- package/dist/toolkits/telegram/tools/updates.d.ts +23 -0
- package/dist/toolkits/telegram/tools/updates.js +54 -0
- package/dist/toolkits/youtube/tools/get-channel-activities.d.ts +1 -1
- package/dist/toolkits/youtube/tools/index.d.ts +5 -5
- package/dist/toolkits/youtube/tools/list-channel-sections.d.ts +1 -1
- package/dist/toolkits/youtube/tools/post-comment.d.ts +1 -1
- package/dist/toolkits/youtube/tools/subscribe-channel.d.ts +1 -1
- package/dist/toolkits/youtube/tools/unsubscribe-channel.d.ts +1 -1
- package/package.json +2 -3
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { nasaGet, toNasaError, enc, convertEonet } from './client.js';
|
|
5
|
+
export const nasaGetEonetCategories = tool({
|
|
6
|
+
description: "Tool to retrieve a list of all event categories from EONET. Use when you need current category IDs, titles, descriptions, and info links. Note: category IDs are EONET-specific and do not map to CMR (Common Metadata Repository) IDs; use them only for EONET-internal filtering, not cross-system lookups.",
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
9
|
+
}),
|
|
10
|
+
execute: async ({ nasaApiKey }) => {
|
|
11
|
+
try {
|
|
12
|
+
return await nasaGet("https://eonet.gsfc.nasa.gov/api/v3", `/categories`);
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
return toNasaError(error, "Failed to get eonet categories");
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
export const nasaGetEonetCategoryEvents = tool({
|
|
20
|
+
description: "Tool to retrieve natural events filtered by a specific category from NASA's EONET. Use when you need events for a specific category like wildfires, volcanoes, or severe storms.",
|
|
21
|
+
inputSchema: z.object({
|
|
22
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
23
|
+
end: z.string().optional().describe("Ending date for event filtering in YYYY-MM-DD format. Use with 'start' parameter to define a date range."),
|
|
24
|
+
days: z.number().int().positive().optional().describe("Limit events to those occurring within the last N days (including today)."),
|
|
25
|
+
limit: z.number().int().positive().optional().describe("Limit the number of events returned. Must be a positive integer."),
|
|
26
|
+
start: z.string().optional().describe("Starting date for event filtering in YYYY-MM-DD format. Use with 'end' parameter to define a date range."),
|
|
27
|
+
source: z.string().optional().describe("Filter events by source ID (e.g., 'IRWIN', 'JTWC'). Multiple sources can be comma-separated for boolean OR filtering."),
|
|
28
|
+
status: z.enum(["open", "closed"]).optional().describe("Event status filter options for EONET events."),
|
|
29
|
+
categoryId: z.string().describe("Filter events by category ID (e.g., 'wildfires', 'volcanoes', 'severeStorms'). This is required to retrieve events for a specific category."),
|
|
30
|
+
}),
|
|
31
|
+
execute: async ({ nasaApiKey, categoryId, end, days, limit, start, source, status }) => {
|
|
32
|
+
try {
|
|
33
|
+
const query = {};
|
|
34
|
+
if (status !== undefined)
|
|
35
|
+
query["status"] = status;
|
|
36
|
+
if (limit !== undefined)
|
|
37
|
+
query["limit"] = limit;
|
|
38
|
+
if (days !== undefined)
|
|
39
|
+
query["days"] = days;
|
|
40
|
+
if (start !== undefined)
|
|
41
|
+
query["start"] = start;
|
|
42
|
+
if (end !== undefined)
|
|
43
|
+
query["end"] = end;
|
|
44
|
+
if (source !== undefined)
|
|
45
|
+
query["source"] = source;
|
|
46
|
+
return await nasaGet("https://eonet.gsfc.nasa.gov/api/v3", `/categories/${enc(categoryId)}`, { query });
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
return toNasaError(error, "Failed to get eonet category events");
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
export const nasaGetEonetEvent = tool({
|
|
54
|
+
description: "Tool to retrieve a specific natural event by its unique ID from NASA's Earth Observatory Natural Event Tracker (EONET). Use when you need detailed information about a particular wildfire, storm, flood, volcano, earthquake, or other natural phenomenon.",
|
|
55
|
+
inputSchema: z.object({
|
|
56
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
57
|
+
eventId: z.string().describe("Unique identifier of the EONET event (e.g., 'EONET_17841')"),
|
|
58
|
+
}),
|
|
59
|
+
execute: async ({ nasaApiKey, eventId }) => {
|
|
60
|
+
try {
|
|
61
|
+
return await nasaGet("https://eonet.gsfc.nasa.gov/api/v3", `/events/${enc(eventId)}`);
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
return toNasaError(error, "Failed to get eonet event");
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
export const nasaGetEonetEvents = tool({
|
|
69
|
+
description: "Tool to retrieve natural events from NASA's Earth Observatory Natural Event Tracker (EONET). Use when you need structured JSON data about wildfires, storms, floods, volcanoes, earthquakes, and other natural phenomena. Supports filtering by source, category, status, date range, magnitude, and geographic bounding box.",
|
|
70
|
+
inputSchema: z.object({
|
|
71
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
72
|
+
end: z.string().optional().describe("Ending date for events in YYYY-MM-DD format. Only events on or before this date will be returned."),
|
|
73
|
+
bbox: z.string().optional().describe("Bounding box filter in format 'lon1,lat1,lon2,lat2' where (lon1,lat1) is upper-left corner and (lon2,lat2) is lower-right corner. Returns events with datapoints within this box."),
|
|
74
|
+
days: z.number().int().positive().optional().describe("Filter events from the last N days (including today). For example, days=7 returns events from the past week."),
|
|
75
|
+
limit: z.number().int().positive().optional().describe("Limits the number of events returned. Must be a positive integer."),
|
|
76
|
+
magID: z.enum(["mag_kts", "mms", "sq_NM"]).optional().describe("Magnitude identifier types for filtering events."),
|
|
77
|
+
start: z.string().optional().describe("Starting date for events in YYYY-MM-DD format. Only events on or after this date will be returned."),
|
|
78
|
+
magMax: z.number().optional().describe("Maximum magnitude value for filtering events. Requires magID to be specified."),
|
|
79
|
+
magMin: z.number().optional().describe("Minimum magnitude value for filtering events. Requires magID to be specified."),
|
|
80
|
+
source: z.string().optional().describe("Filter events by source ID. Multiple sources can be comma-separated (e.g., 'IRWIN,JTWC'). Operates as boolean OR."),
|
|
81
|
+
status: z.enum(["open", "closed", "all"]).optional().describe("Status filter for EONET events."),
|
|
82
|
+
category: z.string().optional().describe("Filter events by category ID. Multiple categories can be comma-separated (e.g., 'wildfires,floods'). Operates as boolean OR."),
|
|
83
|
+
}),
|
|
84
|
+
execute: async ({ nasaApiKey, end, bbox, days, limit, magID, start, magMax, magMin, source, status, category }) => {
|
|
85
|
+
try {
|
|
86
|
+
const query = {};
|
|
87
|
+
if (start !== undefined)
|
|
88
|
+
query["start"] = start;
|
|
89
|
+
if (end !== undefined)
|
|
90
|
+
query["end"] = end;
|
|
91
|
+
if (bbox !== undefined)
|
|
92
|
+
query["bbox"] = bbox;
|
|
93
|
+
if (days !== undefined)
|
|
94
|
+
query["days"] = days;
|
|
95
|
+
if (limit !== undefined)
|
|
96
|
+
query["limit"] = limit;
|
|
97
|
+
if (magID !== undefined)
|
|
98
|
+
query["magID"] = magID;
|
|
99
|
+
if (magMin !== undefined)
|
|
100
|
+
query["magMin"] = magMin;
|
|
101
|
+
if (magMax !== undefined)
|
|
102
|
+
query["magMax"] = magMax;
|
|
103
|
+
if (source !== undefined)
|
|
104
|
+
query["source"] = source;
|
|
105
|
+
if (status !== undefined)
|
|
106
|
+
query["status"] = status;
|
|
107
|
+
if (category !== undefined)
|
|
108
|
+
query["category"] = category;
|
|
109
|
+
return await nasaGet("https://eonet.gsfc.nasa.gov/api/v3", `/events`, { query });
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
return toNasaError(error, "Failed to get eonet events");
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
export const nasaGetEonetEventsAtom = tool({
|
|
117
|
+
description: "Tool to retrieve a list of natural events in ATOM format. Use when you need a machine-readable XML feed of recent natural events from EONET.",
|
|
118
|
+
inputSchema: z.object({
|
|
119
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
120
|
+
end: z.string().optional().describe("End date (inclusive) for events, in YYYY-MM-DD format."),
|
|
121
|
+
bbox: z.string().optional().describe("Bounding box in 'minLon,minLat,maxLon,maxLat' format to restrict events geographically."),
|
|
122
|
+
days: z.number().int().min(0).optional().describe("Return events from the past N days (including today). Must be ≥ 0."),
|
|
123
|
+
limit: z.number().int().min(1).optional().describe("Maximum number of events to return. Must be ≥ 1."),
|
|
124
|
+
start: z.string().optional().describe("Start date (inclusive) for events, in YYYY-MM-DD format."),
|
|
125
|
+
magMax: z.number().optional().describe("Maximum magnitude value (inclusive)."),
|
|
126
|
+
magMin: z.number().optional().describe("Minimum magnitude value (inclusive)."),
|
|
127
|
+
magId: z.string().optional().describe("Magnitude ID to filter by (see /magnitudes endpoint)."),
|
|
128
|
+
source: z.string().optional().describe("Comma-separated list of Source IDs to filter events by. Operates as a boolean OR when multiple provided."),
|
|
129
|
+
status: z.enum(["open", "closed", "all"]).optional().describe("Filter by event status. 'open' (default) returns only active events; 'closed' returns only ended events; 'all' returns both."),
|
|
130
|
+
category: z.string().optional().describe("Comma-separated list of Category IDs to filter events by. Operates as a boolean OR when multiple provided."),
|
|
131
|
+
}),
|
|
132
|
+
execute: async ({ nasaApiKey, end, bbox, days, limit, start, magMax, magMin, magId, source, status, category }) => {
|
|
133
|
+
try {
|
|
134
|
+
const query = {};
|
|
135
|
+
if (end !== undefined)
|
|
136
|
+
query["end"] = end;
|
|
137
|
+
if (bbox !== undefined)
|
|
138
|
+
query["bbox"] = bbox;
|
|
139
|
+
if (days !== undefined)
|
|
140
|
+
query["days"] = days;
|
|
141
|
+
if (limit !== undefined)
|
|
142
|
+
query["limit"] = limit;
|
|
143
|
+
if (start !== undefined)
|
|
144
|
+
query["start"] = start;
|
|
145
|
+
if (magMax !== undefined)
|
|
146
|
+
query["magMax"] = magMax;
|
|
147
|
+
if (magMin !== undefined)
|
|
148
|
+
query["magMin"] = magMin;
|
|
149
|
+
if (magId !== undefined)
|
|
150
|
+
query["mag_id"] = magId;
|
|
151
|
+
if (source !== undefined)
|
|
152
|
+
query["source"] = source;
|
|
153
|
+
if (status !== undefined)
|
|
154
|
+
query["status"] = status;
|
|
155
|
+
if (category !== undefined)
|
|
156
|
+
query["category"] = category;
|
|
157
|
+
const data = await nasaGet("https://eonet.gsfc.nasa.gov/api/v3", `/events`, { query });
|
|
158
|
+
return convertEonet(data, "atom");
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
return toNasaError(error, "Failed to get eonet events atom");
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
});
|
|
165
|
+
export const nasaGetEonetEventsGeojson = tool({
|
|
166
|
+
description: "Tool to retrieve natural events from NASA's Earth Observatory Natural Event Tracker (EONET) in GeoJSON format. Use when you need geographic event data in GeoJSON format for mapping applications or GIS integration. Supports filtering by source, category, status, date range, and geographic bounding box.",
|
|
167
|
+
inputSchema: z.object({
|
|
168
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
169
|
+
end: z.string().optional().describe("Ending date for events in YYYY-MM-DD format. Only events on or before this date will be returned."),
|
|
170
|
+
bbox: z.string().optional().describe("Bounding box filter in format 'lon1,lat1,lon2,lat2' where (lon1,lat1) is upper-left corner and (lon2,lat2) is lower-right corner. Returns events with datapoints within this box."),
|
|
171
|
+
days: z.number().int().positive().optional().describe("Filter events from the last N days (including today). For example, days=7 returns events from the past week."),
|
|
172
|
+
limit: z.number().int().positive().optional().describe("Limits the number of events returned. Must be a positive integer."),
|
|
173
|
+
start: z.string().optional().describe("Starting date for events in YYYY-MM-DD format. Only events on or after this date will be returned."),
|
|
174
|
+
source: z.string().optional().describe("Filter events by source ID. Multiple sources can be comma-separated (e.g., 'IRWIN,JTWC'). Operates as boolean OR."),
|
|
175
|
+
status: z.enum(["open", "closed", "all"]).optional().describe("Status filter for EONET events."),
|
|
176
|
+
category: z.string().optional().describe("Filter events by category ID. Multiple categories can be comma-separated (e.g., 'wildfires,floods'). Operates as boolean OR."),
|
|
177
|
+
}),
|
|
178
|
+
execute: async ({ nasaApiKey, end, bbox, days, limit, start, source, status, category }) => {
|
|
179
|
+
try {
|
|
180
|
+
const query = {};
|
|
181
|
+
if (end !== undefined)
|
|
182
|
+
query["end"] = end;
|
|
183
|
+
if (bbox !== undefined)
|
|
184
|
+
query["bbox"] = bbox;
|
|
185
|
+
if (days !== undefined)
|
|
186
|
+
query["days"] = days;
|
|
187
|
+
if (limit !== undefined)
|
|
188
|
+
query["limit"] = limit;
|
|
189
|
+
if (start !== undefined)
|
|
190
|
+
query["start"] = start;
|
|
191
|
+
if (source !== undefined)
|
|
192
|
+
query["source"] = source;
|
|
193
|
+
if (status !== undefined)
|
|
194
|
+
query["status"] = status;
|
|
195
|
+
if (category !== undefined)
|
|
196
|
+
query["category"] = category;
|
|
197
|
+
const data = await nasaGet("https://eonet.gsfc.nasa.gov/api/v3", `/events`, { query });
|
|
198
|
+
return convertEonet(data, "geojson");
|
|
199
|
+
}
|
|
200
|
+
catch (error) {
|
|
201
|
+
return toNasaError(error, "Failed to get eonet events geojson");
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
export const nasaGetEonetEventsRss = tool({
|
|
206
|
+
description: "Retrieve natural events from NASA's Earth Observatory Natural Event Tracker (EONET) in RSS/GeoRSS XML format. This tool provides a standardized RSS 2.0 feed with GeoRSS extensions, ideal for RSS readers, mapping applications, or systems that need spatial event data in XML format. The feed includes wildfires, storms, floods, volcanoes, icebergs, and other natural phenomena with geographical coordinates, magnitudes, and source references. Use this when you need RSS/XML format specifically. For programmatic access with structured data, consider using the JSON events endpoint instead.",
|
|
207
|
+
inputSchema: z.object({
|
|
208
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
209
|
+
days: z.number().int().positive().optional().describe("Filter events that occurred within the last N days. For example, days=10 returns events from the past 10 days only."),
|
|
210
|
+
limit: z.number().int().positive().optional().describe("Limit the number of events returned in the RSS feed. Must be a positive integer. Useful for getting just the most recent events."),
|
|
211
|
+
source: z.string().optional().describe("Filter events by source ID (e.g., 'IRWIN', 'JTWC', 'BYU_ICE'). Only events from the specified source will be included in the RSS feed."),
|
|
212
|
+
status: z.string().optional().describe("Filter events by status: 'open' for ongoing events or 'closed' for completed events. Defaults to all statuses if not specified."),
|
|
213
|
+
}),
|
|
214
|
+
execute: async ({ nasaApiKey, days, limit, source, status }) => {
|
|
215
|
+
try {
|
|
216
|
+
const query = {};
|
|
217
|
+
if (days !== undefined)
|
|
218
|
+
query["days"] = days;
|
|
219
|
+
if (limit !== undefined)
|
|
220
|
+
query["limit"] = limit;
|
|
221
|
+
if (source !== undefined)
|
|
222
|
+
query["source"] = source;
|
|
223
|
+
if (status !== undefined)
|
|
224
|
+
query["status"] = status;
|
|
225
|
+
const data = await nasaGet("https://eonet.gsfc.nasa.gov/api/v3", `/events`, { query });
|
|
226
|
+
return convertEonet(data, "rss");
|
|
227
|
+
}
|
|
228
|
+
catch (error) {
|
|
229
|
+
return toNasaError(error, "Failed to get eonet events rss");
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
});
|
|
233
|
+
export const nasaGetEonetLayers = tool({
|
|
234
|
+
description: "Retrieves NASA EONET imagery layers for visualizing natural events. Returns web map service (WMS/WMTS) layer definitions that can be used to display satellite imagery related to events like wildfires, volcanoes, severe storms, etc. Each layer includes service URLs and parameters needed to fetch imagery tiles. Use the optional category parameter to get layers specific to an event type (recommended to avoid empty results).",
|
|
235
|
+
inputSchema: z.object({
|
|
236
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
237
|
+
category: z.string().optional().describe("Category ID to filter layers by specific event type. Valid values include: 'wildfires', 'volcanoes', 'severeStorms', 'floods', 'landslides', 'earthquakes', 'drought', 'dustHaze', 'snow', 'seaLakeIce', 'tempExtremes', 'waterColor', 'manmade'. If omitted, returns all layers (note: may return empty list)."),
|
|
238
|
+
}),
|
|
239
|
+
execute: async ({ nasaApiKey, category }) => {
|
|
240
|
+
try {
|
|
241
|
+
const query = {};
|
|
242
|
+
if (category !== undefined)
|
|
243
|
+
query["category"] = category;
|
|
244
|
+
return await nasaGet("https://eonet.gsfc.nasa.gov/api/v3", `/layers`, { query });
|
|
245
|
+
}
|
|
246
|
+
catch (error) {
|
|
247
|
+
return toNasaError(error, "Failed to get eonet layers");
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
});
|
|
251
|
+
export const nasaGetEonetMagnitudes = tool({
|
|
252
|
+
description: "Tool to retrieve a list of available event magnitudes and their descriptions. Use after determining you need valid magnitude filters before querying events data.",
|
|
253
|
+
inputSchema: z.object({
|
|
254
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
255
|
+
}),
|
|
256
|
+
execute: async ({ nasaApiKey }) => {
|
|
257
|
+
try {
|
|
258
|
+
return await nasaGet("https://eonet.gsfc.nasa.gov/api/v3", `/magnitudes`);
|
|
259
|
+
}
|
|
260
|
+
catch (error) {
|
|
261
|
+
return toNasaError(error, "Failed to get eonet magnitudes");
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
export const nasaGetEonetSources = tool({
|
|
266
|
+
description: "Retrieves the complete list of event data sources available in NASA's EONET (Earth Observatory Natural Event Tracker) system. Each source provides natural event data such as wildfires, volcanoes, hurricanes, floods, and earthquakes. Use this tool to: - Discover which organizations provide event data to EONET - Get source IDs for filtering events by specific data providers - Access homepage URLs and filtered event endpoints for each source No parameters required - returns all available sources.",
|
|
267
|
+
inputSchema: z.object({
|
|
268
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
269
|
+
}),
|
|
270
|
+
execute: async ({ nasaApiKey }) => {
|
|
271
|
+
try {
|
|
272
|
+
return await nasaGet("https://eonet.gsfc.nasa.gov/api/v3", `/sources`);
|
|
273
|
+
}
|
|
274
|
+
catch (error) {
|
|
275
|
+
return toNasaError(error, "Failed to get eonet sources");
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
});
|
|
279
|
+
//# sourceMappingURL=eonet.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const nasaGetIcesat2Tracks: import("ai").Tool<{
|
|
2
|
+
date?: string | undefined;
|
|
3
|
+
nasaApiKey?: string | undefined;
|
|
4
|
+
maxx?: number | undefined;
|
|
5
|
+
maxy?: number | undefined;
|
|
6
|
+
minx?: number | undefined;
|
|
7
|
+
miny?: number | undefined;
|
|
8
|
+
outputFormat?: "json" | "csv" | undefined;
|
|
9
|
+
}, any>;
|
|
10
|
+
export declare const nasaGetLevel3Data: import("ai").Tool<{
|
|
11
|
+
product: "atl06" | "atl07" | "atl08" | "atl10" | "atl12" | "atl13";
|
|
12
|
+
maxx: number;
|
|
13
|
+
maxy: number;
|
|
14
|
+
minx: number;
|
|
15
|
+
miny: number;
|
|
16
|
+
trackId: number;
|
|
17
|
+
date?: string | undefined;
|
|
18
|
+
client?: string | undefined;
|
|
19
|
+
startDate?: string | undefined;
|
|
20
|
+
endDate?: string | undefined;
|
|
21
|
+
nasaApiKey?: string | undefined;
|
|
22
|
+
outputFormat?: "json" | "csv" | "zip" | undefined;
|
|
23
|
+
beamNames?: string[] | undefined;
|
|
24
|
+
}, any>;
|
|
25
|
+
//# sourceMappingURL=icesat2.d.ts.map
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { nasaGetText, nasaGet, toNasaError, enc } from './client.js';
|
|
5
|
+
export const nasaGetIcesat2Tracks = tool({
|
|
6
|
+
description: "Retrieves a list of ICESat-2 satellite tracks (Reference Ground Tracks - RGTs) within a specified geographic bounding box. Use this when you need to identify which ICESat-2 tracks pass through a particular region of interest. The returned track identifiers can be used to query detailed altimetry data for those specific tracks. Supports optional date filtering to find tracks from a specific collection date.",
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
9
|
+
date: z.string().optional().describe("Data collection date filter in yyyy-MM-dd format (e.g., '2019-12-25'). If specified, only tracks from this date will be returned."),
|
|
10
|
+
maxx: z.number().optional().describe("Maximum x coordinate (longitude) of the bounding box in decimal degrees. Eastern boundary of the area of interest."),
|
|
11
|
+
maxy: z.number().optional().describe("Maximum y coordinate (latitude) of the bounding box in decimal degrees. Northern boundary of the area of interest."),
|
|
12
|
+
minx: z.number().optional().describe("Minimum x coordinate (longitude) of the bounding box in decimal degrees. Western boundary of the area of interest."),
|
|
13
|
+
miny: z.number().optional().describe("Minimum y coordinate (latitude) of the bounding box in decimal degrees. Southern boundary of the area of interest."),
|
|
14
|
+
outputFormat: z.enum(["csv", "json"]).optional().describe("Output format of the result. 'json' returns structured JSON data, 'csv' returns comma-separated values."),
|
|
15
|
+
}),
|
|
16
|
+
execute: async ({ nasaApiKey, date, maxx, maxy, minx, miny, outputFormat }) => {
|
|
17
|
+
try {
|
|
18
|
+
const query = {};
|
|
19
|
+
if (minx !== undefined)
|
|
20
|
+
query["minx"] = minx;
|
|
21
|
+
if (miny !== undefined)
|
|
22
|
+
query["miny"] = miny;
|
|
23
|
+
if (maxx !== undefined)
|
|
24
|
+
query["maxx"] = maxx;
|
|
25
|
+
if (maxy !== undefined)
|
|
26
|
+
query["maxy"] = maxy;
|
|
27
|
+
if (date !== undefined)
|
|
28
|
+
query["date"] = date;
|
|
29
|
+
if (outputFormat !== undefined)
|
|
30
|
+
query["outputFormat"] = outputFormat;
|
|
31
|
+
const fmt = (outputFormat ?? 'json').toLowerCase();
|
|
32
|
+
if (fmt === 'csv')
|
|
33
|
+
return await nasaGetText("https://openaltimetry.earthdatacloud.nasa.gov/data", `/api/icesat2/getTracks`, { query });
|
|
34
|
+
return await nasaGet("https://openaltimetry.earthdatacloud.nasa.gov/data", `/api/icesat2/getTracks`, { query });
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
return toNasaError(error, "Failed to get icesat2 tracks");
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
export const nasaGetLevel3Data = tool({
|
|
42
|
+
description: "Tool to access ICESat-2 Level-3A product data from OpenAltimetry. Use when you need satellite altimetry measurements for land ice, sea ice, vegetation, ocean surface, or inland water surface heights. Requests are limited to 5x5 degree spatial bounding box selection and up to 1 year of data. Note: This endpoint is marked as COMING SOON in documentation but is functionally operational.",
|
|
43
|
+
inputSchema: z.object({
|
|
44
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
45
|
+
maxx: z.number().describe("Maximum longitude (x-coordinate) for the bounding box in decimal degrees. Must define a bounding box no larger than 5x5 degrees."),
|
|
46
|
+
maxy: z.number().describe("Maximum latitude (y-coordinate) for the bounding box in decimal degrees. Must define a bounding box no larger than 5x5 degrees."),
|
|
47
|
+
minx: z.number().describe("Minimum longitude (x-coordinate) for the bounding box in decimal degrees. Must define a bounding box no larger than 5x5 degrees."),
|
|
48
|
+
miny: z.number().describe("Minimum latitude (y-coordinate) for the bounding box in decimal degrees. Must define a bounding box no larger than 5x5 degrees."),
|
|
49
|
+
client: z.string().optional().describe("Referring client identifier for API usage tracking purposes."),
|
|
50
|
+
endDate: z.string().optional().describe("End date for temporal filtering in YYYY-MM-DD format. Filters data to include only observations on or before this date."),
|
|
51
|
+
product: z.enum(["atl06", "atl07", "atl08", "atl10", "atl12", "atl13"]).describe("ICESat-2 data product type to retrieve. Options: atl06 (Land Ice Height), atl07 (Sea Ice Height), atl08 (Land and Vegetation Height), atl10 (Sea Ice Freeboard), atl12 (Ocean Surface Height), atl13 (Inland Water Surface Height)."),
|
|
52
|
+
trackId: z.number().int().describe("Reference ground track ID for ICESat-2 satellite track to retrieve data from."),
|
|
53
|
+
beamNames: z.array(z.string()).optional().describe("List of specific beam names to filter results. ICESat-2 has 6 beams: gt1l, gt1r, gt2l, gt2r, gt3l, gt3r."),
|
|
54
|
+
startDate: z.string().optional().describe("Start date for temporal filtering in YYYY-MM-DD format. Filters data to include only observations on or after this date."),
|
|
55
|
+
outputFormat: z.enum(["csv", "json", "zip"]).optional().describe("Output format for the Level-3A data."),
|
|
56
|
+
date: z.string().optional().describe("Date in YYYY-MM-DD format. Defaults to startDate when omitted."),
|
|
57
|
+
}),
|
|
58
|
+
execute: async ({ nasaApiKey, product, minx, miny, maxx, maxy, trackId, client, endDate, beamNames, startDate, outputFormat, date }) => {
|
|
59
|
+
try {
|
|
60
|
+
const query = {};
|
|
61
|
+
if (date !== undefined)
|
|
62
|
+
query["date"] = date;
|
|
63
|
+
if (minx !== undefined)
|
|
64
|
+
query["minx"] = minx;
|
|
65
|
+
if (miny !== undefined)
|
|
66
|
+
query["miny"] = miny;
|
|
67
|
+
if (maxx !== undefined)
|
|
68
|
+
query["maxx"] = maxx;
|
|
69
|
+
if (maxy !== undefined)
|
|
70
|
+
query["maxy"] = maxy;
|
|
71
|
+
if (trackId !== undefined)
|
|
72
|
+
query["trackId"] = trackId;
|
|
73
|
+
if (outputFormat !== undefined)
|
|
74
|
+
query["outputFormat"] = outputFormat;
|
|
75
|
+
if (client !== undefined)
|
|
76
|
+
query["client"] = client;
|
|
77
|
+
if (startDate !== undefined)
|
|
78
|
+
query["startDate"] = startDate;
|
|
79
|
+
if (endDate !== undefined)
|
|
80
|
+
query["endDate"] = endDate;
|
|
81
|
+
if (date !== undefined)
|
|
82
|
+
query["date"] = date;
|
|
83
|
+
else if (startDate !== undefined)
|
|
84
|
+
query["date"] = startDate;
|
|
85
|
+
if (beamNames !== undefined)
|
|
86
|
+
query['beamNames'] = beamNames.join(',');
|
|
87
|
+
const fmt = String(outputFormat ?? 'json').toLowerCase();
|
|
88
|
+
if (fmt === 'json')
|
|
89
|
+
return await nasaGet("https://openaltimetry.earthdatacloud.nasa.gov/data", `/api/icesat2/${enc(product)}`, { query });
|
|
90
|
+
return await nasaGetText("https://openaltimetry.earthdatacloud.nasa.gov/data", `/api/icesat2/${enc(product)}`, { query });
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
return toNasaError(error, "Failed to get level3 data");
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=icesat2.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const nasaGetTechportProject: import("ai").Tool<{
|
|
2
|
+
id: number;
|
|
3
|
+
nasaApiKey?: string | undefined;
|
|
4
|
+
}, any>;
|
|
5
|
+
export declare const nasaQueryExoplanetArchive: import("ai").Tool<{
|
|
6
|
+
table: string;
|
|
7
|
+
order?: string | undefined;
|
|
8
|
+
where?: string | undefined;
|
|
9
|
+
select?: string | undefined;
|
|
10
|
+
format?: "json" | "ascii" | "csv" | "ipac" | undefined;
|
|
11
|
+
nasaApiKey?: string | undefined;
|
|
12
|
+
}, any>;
|
|
13
|
+
export declare const nasaSearchTechtransferSoftware: import("ai").Tool<{
|
|
14
|
+
keywords?: string | undefined;
|
|
15
|
+
nasaApiKey?: string | undefined;
|
|
16
|
+
}, any>;
|
|
17
|
+
export declare const nasaGetImageAsset: import("ai").Tool<{
|
|
18
|
+
nasaId: string;
|
|
19
|
+
nasaApiKey?: string | undefined;
|
|
20
|
+
}, any>;
|
|
21
|
+
export declare const nasaGetImageMetadata: import("ai").Tool<{
|
|
22
|
+
nasaId: string;
|
|
23
|
+
nasaApiKey?: string | undefined;
|
|
24
|
+
}, any>;
|
|
25
|
+
export declare const nasaGetVideoCaptions: import("ai").Tool<{
|
|
26
|
+
nasaId: string;
|
|
27
|
+
nasaApiKey?: string | undefined;
|
|
28
|
+
}, any>;
|
|
29
|
+
export declare const nasaSearchSvsVisualizations: import("ai").Tool<{
|
|
30
|
+
limit?: any;
|
|
31
|
+
search?: string | undefined;
|
|
32
|
+
offset?: number | undefined;
|
|
33
|
+
nasaApiKey?: string | undefined;
|
|
34
|
+
missions?: string[] | undefined;
|
|
35
|
+
}, any>;
|
|
36
|
+
//# sourceMappingURL=imagery.d.ts.map
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { nasaGet, toNasaError, requireApiKey, enc, tapSync } from './client.js';
|
|
5
|
+
export const nasaGetTechportProject = tool({
|
|
6
|
+
description: "Retrieves detailed information about a specific NASA technology project from TechPort. Returns comprehensive project data including title, description, benefits, status, program details, contacts, organizations, and technology readiness levels. Use this when you need information about a specific NASA technology project by its TechPort ID.",
|
|
7
|
+
inputSchema: z.object({
|
|
8
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
9
|
+
id: z.number().int().describe("TechPort project ID. This is the unique identifier for the NASA technology project."),
|
|
10
|
+
}),
|
|
11
|
+
execute: async ({ nasaApiKey, id }) => {
|
|
12
|
+
const missing = requireApiKey(nasaApiKey);
|
|
13
|
+
if (missing)
|
|
14
|
+
return missing;
|
|
15
|
+
try {
|
|
16
|
+
const query = {};
|
|
17
|
+
query['api_key'] = nasaApiKey;
|
|
18
|
+
return await nasaGet("https://api.nasa.gov", `/techport/api/projects/${enc(id)}`, { query });
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
return toNasaError(error, "Failed to get techport project");
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
export const nasaQueryExoplanetArchive = tool({
|
|
26
|
+
description: "Tool to query NASA's Exoplanet Archive NSTED API for exoplanet and related astronomical data. Use when you need to search, filter, or retrieve data about confirmed exoplanets, Kepler Objects of Interest (KOIs), planetary systems, or composite planet parameters. Supports SQL-like filtering, column selection, sorting, and multiple output formats (JSON, CSV, ASCII, IPAC).",
|
|
27
|
+
inputSchema: z.object({
|
|
28
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
29
|
+
order: z.string().optional().describe("Column name to sort results by, optionally followed by 'desc' for descending order (e.g., 'koi_period', 'koi_period desc'). Defaults to ascending order if 'desc' is not specified."),
|
|
30
|
+
table: z.string().describe("Specifies which data table to query. Common tables: 'cumulative' (Kepler cumulative table), 'exoplanets' (confirmed exoplanets), 'ps' (planetary systems), 'koi' (Kepler Objects of Interest), 'compositepars' (composite planet parameters)."),
|
|
31
|
+
where: z.string().optional().describe("SQL-like filter conditions to narrow results (e.g., 'koi_period>300 and koi_prad<2', 'pl_masse>1.0'). Supports comparison operators (<, >, <=, >=, =, !=) and logical operators (and, or)."),
|
|
32
|
+
format: z.enum(["csv", "json", "ascii", "ipac"]).optional().describe("Output format for exoplanet data."),
|
|
33
|
+
select: z.string().optional().describe("Comma-separated list of column names to return (e.g., 'pl_hostname,ra,dec,pl_orbper'). Use '*' to return all columns. If omitted, returns all columns by default."),
|
|
34
|
+
}),
|
|
35
|
+
execute: async ({ nasaApiKey, table, order, where, format, select }) => {
|
|
36
|
+
try {
|
|
37
|
+
return await tapSync({ table, where, select, order, format: format ?? 'json' });
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
return toNasaError(error, "Failed to query exoplanet archive");
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
export const nasaSearchTechtransferSoftware = tool({
|
|
45
|
+
description: "Search NASA's Technology Transfer software catalog for available tools and applications. Returns software entries with titles, descriptions, NASA case numbers, and licensing information. Use this when searching for NASA software tools available for public use, licensing, or download.",
|
|
46
|
+
inputSchema: z.object({
|
|
47
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
48
|
+
keywords: z.string().optional().describe("Search keywords to filter the software catalog. If not provided, returns all available software entries. Examples: 'visualization', 'machine learning', 'data processing'."),
|
|
49
|
+
}),
|
|
50
|
+
execute: async ({ nasaApiKey, keywords }) => {
|
|
51
|
+
const missing = requireApiKey(nasaApiKey);
|
|
52
|
+
if (missing)
|
|
53
|
+
return missing;
|
|
54
|
+
try {
|
|
55
|
+
const query = {};
|
|
56
|
+
if (keywords !== undefined)
|
|
57
|
+
query["keywords"] = keywords;
|
|
58
|
+
query['api_key'] = nasaApiKey;
|
|
59
|
+
return await nasaGet("https://api.nasa.gov", `/techtransfer/software/`, { query });
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
return toNasaError(error, "Failed to search techtransfer software");
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
export const nasaGetImageAsset = tool({
|
|
67
|
+
description: "Retrieve a media asset's manifest from the NASA Image and Video Library, including links to all available sizes and formats. Returns URLs for different image sizes (original, large, medium, small, thumbnail) and metadata. Use when you need to access specific media files after finding them through search.",
|
|
68
|
+
inputSchema: z.object({
|
|
69
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
70
|
+
nasaId: z.string().describe("NASA ID of the media item to retrieve the asset manifest for (e.g., 'as11-40-5874'). This ID can be obtained from search results."),
|
|
71
|
+
}),
|
|
72
|
+
execute: async ({ nasaApiKey, nasaId }) => {
|
|
73
|
+
try {
|
|
74
|
+
return await nasaGet("https://images-api.nasa.gov", `/asset/${enc(nasaId)}`);
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
return toNasaError(error, "Failed to get image asset");
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
export const nasaGetImageMetadata = tool({
|
|
82
|
+
description: "Retrieve the location URL of a media asset's metadata manifest from the NASA Image and Video Library. Returns the URL to the metadata JSON file containing detailed information including EXIF/camera data. Use when you need to access comprehensive metadata for NASA images or videos.",
|
|
83
|
+
inputSchema: z.object({
|
|
84
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
85
|
+
nasaId: z.string().describe("NASA ID of the media item to retrieve the metadata location for (e.g., 'as11-40-5874'). This ID can be obtained from search results."),
|
|
86
|
+
}),
|
|
87
|
+
execute: async ({ nasaApiKey, nasaId }) => {
|
|
88
|
+
try {
|
|
89
|
+
return await nasaGet("https://images-api.nasa.gov", `/metadata/${enc(nasaId)}`);
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
return toNasaError(error, "Failed to get image metadata");
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
export const nasaGetVideoCaptions = tool({
|
|
97
|
+
description: "Retrieves the location URL of caption files for NASA video assets from the NASA Image and Video Library. Returns the URL to the captions file (typically in SRT format) for the specified video NASA ID. Use this when you need to access subtitles or captions for NASA video content.",
|
|
98
|
+
inputSchema: z.object({
|
|
99
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
100
|
+
nasaId: z.string().describe("NASA ID of the video for which to retrieve captions. This is typically the video title or identifier (e.g., 'Apollo 14 Launch Coverage')."),
|
|
101
|
+
}),
|
|
102
|
+
execute: async ({ nasaApiKey, nasaId }) => {
|
|
103
|
+
try {
|
|
104
|
+
return await nasaGet("https://images-api.nasa.gov", `/captions/${enc(nasaId)}`);
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
return toNasaError(error, "Failed to get video captions");
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
export const nasaSearchSvsVisualizations = tool({
|
|
112
|
+
description: "Tool to search for visualizations in the Scientific Visualization Studio (SVS). Use when you need to query SVS visualizations by keywords or mission filters.",
|
|
113
|
+
inputSchema: z.object({
|
|
114
|
+
nasaApiKey: z.string().optional().describe("NASA API key (injected when connected; only sent to api.nasa.gov endpoints)"),
|
|
115
|
+
limit: z.any().optional().describe("Maximum number of results to return. Use an integer up to 2000, or 'all'/'none' to fetch all available results."),
|
|
116
|
+
offset: z.number().int().min(0).optional().describe("Number of initial results to skip (for pagination)."),
|
|
117
|
+
search: z.string().optional().describe("Free-text term to search titles and descriptions (e.g. 'Apollo')."),
|
|
118
|
+
missions: z.array(z.string()).optional().describe("List of mission names to filter results. Multiple values will be joined with commas (e.g., ['JWST', 'Hubble'])."),
|
|
119
|
+
}),
|
|
120
|
+
execute: async ({ nasaApiKey, limit, offset, search, missions }) => {
|
|
121
|
+
try {
|
|
122
|
+
const query = {};
|
|
123
|
+
if (search !== undefined)
|
|
124
|
+
query["search"] = search;
|
|
125
|
+
if (missions !== undefined)
|
|
126
|
+
query["missions"] = missions;
|
|
127
|
+
if (limit !== undefined)
|
|
128
|
+
query["limit"] = limit;
|
|
129
|
+
if (offset !== undefined)
|
|
130
|
+
query["offset"] = offset;
|
|
131
|
+
return await nasaGet("https://svs.gsfc.nasa.gov", `/api/search/`, { query });
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
return toNasaError(error, "Failed to search svs visualizations");
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
//# sourceMappingURL=imagery.js.map
|