@rnsk/toolkits 0.0.8 → 0.0.10
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 +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +29 -1
- package/dist/toolkits/bitbucket/icon.d.ts +5 -0
- package/dist/toolkits/bitbucket/icon.js +6 -0
- package/dist/toolkits/bitbucket/manifest.d.ts +3 -0
- package/dist/toolkits/bitbucket/manifest.js +56 -0
- package/dist/toolkits/bitbucket/tools/client.d.ts +38 -0
- package/dist/toolkits/bitbucket/tools/client.js +87 -0
- package/dist/toolkits/bitbucket/tools/commits.d.ts +149 -0
- package/dist/toolkits/bitbucket/tools/commits.js +444 -0
- package/dist/toolkits/bitbucket/tools/index.d.ts +1093 -0
- package/dist/toolkits/bitbucket/tools/index.js +770 -0
- package/dist/toolkits/bitbucket/tools/issues.d.ts +73 -0
- package/dist/toolkits/bitbucket/tools/issues.js +234 -0
- package/dist/toolkits/bitbucket/tools/pipelines.d.ts +124 -0
- package/dist/toolkits/bitbucket/tools/pipelines.js +446 -0
- package/dist/toolkits/bitbucket/tools/pull-requests.d.ts +174 -0
- package/dist/toolkits/bitbucket/tools/pull-requests.js +541 -0
- package/dist/toolkits/bitbucket/tools/reports.d.ts +84 -0
- package/dist/toolkits/bitbucket/tools/reports.js +213 -0
- package/dist/toolkits/bitbucket/tools/repositories.d.ts +156 -0
- package/dist/toolkits/bitbucket/tools/repositories.js +531 -0
- package/dist/toolkits/bitbucket/tools/search.d.ts +17 -0
- package/dist/toolkits/bitbucket/tools/search.js +67 -0
- package/dist/toolkits/bitbucket/tools/snippets.d.ts +34 -0
- package/dist/toolkits/bitbucket/tools/snippets.js +122 -0
- package/dist/toolkits/bitbucket/tools/users-workspaces.d.ts +65 -0
- package/dist/toolkits/bitbucket/tools/users-workspaces.js +294 -0
- package/dist/toolkits/discord/icon.d.ts +5 -0
- package/dist/toolkits/discord/icon.js +12 -0
- package/dist/toolkits/discord/manifest.d.ts +3 -0
- package/dist/toolkits/discord/manifest.js +52 -0
- package/dist/toolkits/discord/tools/applications.d.ts +79 -0
- package/dist/toolkits/discord/tools/applications.js +216 -0
- package/dist/toolkits/discord/tools/client.d.ts +22 -0
- package/dist/toolkits/discord/tools/client.js +69 -0
- package/dist/toolkits/discord/tools/guilds.d.ts +39 -0
- package/dist/toolkits/discord/tools/guilds.js +123 -0
- package/dist/toolkits/discord/tools/index.d.ts +222 -0
- package/dist/toolkits/discord/tools/index.js +170 -0
- package/dist/toolkits/discord/tools/misc.d.ts +7 -0
- package/dist/toolkits/discord/tools/misc.js +40 -0
- package/dist/toolkits/discord/tools/users.d.ts +28 -0
- package/dist/toolkits/discord/tools/users.js +128 -0
- package/dist/toolkits/figma/tools/index.d.ts +1 -1
- package/dist/toolkits/figma/tools/render-images-of-file-nodes.d.ts +1 -1
- package/dist/toolkits/gitlab/icon.d.ts +5 -0
- package/dist/toolkits/gitlab/icon.js +6 -0
- package/dist/toolkits/gitlab/manifest.d.ts +3 -0
- package/dist/toolkits/gitlab/manifest.js +36 -0
- package/dist/toolkits/gitlab/tools/client.d.ts +7 -0
- package/dist/toolkits/gitlab/tools/client.js +45 -0
- package/dist/toolkits/gitlab/tools/index.d.ts +306 -0
- package/dist/toolkits/gitlab/tools/index.js +36 -0
- package/dist/toolkits/gitlab/tools/issues.d.ts +45 -0
- package/dist/toolkits/gitlab/tools/issues.js +103 -0
- package/dist/toolkits/gitlab/tools/merge-requests.d.ts +35 -0
- package/dist/toolkits/gitlab/tools/merge-requests.js +91 -0
- package/dist/toolkits/gitlab/tools/pipelines.d.ts +30 -0
- package/dist/toolkits/gitlab/tools/pipelines.js +66 -0
- package/dist/toolkits/gitlab/tools/projects.d.ts +36 -0
- package/dist/toolkits/gitlab/tools/projects.js +94 -0
- package/dist/toolkits/gitlab/tools/repository.d.ts +21 -0
- package/dist/toolkits/gitlab/tools/repository.js +53 -0
- package/dist/toolkits/gitlab/tools/users-groups.d.ts +11 -0
- package/dist/toolkits/gitlab/tools/users-groups.js +30 -0
- package/dist/toolkits/google-ads/tools/get-rmf-report.d.ts +2 -2
- package/dist/toolkits/google-ads/tools/index.d.ts +2 -2
- package/dist/toolkits/google-analytics/icon.d.ts +5 -0
- package/dist/toolkits/google-analytics/icon.js +11 -0
- package/dist/toolkits/google-analytics/manifest.d.ts +3 -0
- package/dist/toolkits/google-analytics/manifest.js +48 -0
- package/dist/toolkits/google-analytics/tools/admin.d.ts +73 -0
- package/dist/toolkits/google-analytics/tools/admin.js +238 -0
- package/dist/toolkits/google-analytics/tools/audiences.d.ts +81 -0
- package/dist/toolkits/google-analytics/tools/audiences.js +190 -0
- package/dist/toolkits/google-analytics/tools/client.d.ts +47 -0
- package/dist/toolkits/google-analytics/tools/client.js +74 -0
- package/dist/toolkits/google-analytics/tools/custom-definitions.d.ts +62 -0
- package/dist/toolkits/google-analytics/tools/custom-definitions.js +106 -0
- package/dist/toolkits/google-analytics/tools/index.d.ts +16 -0
- package/dist/toolkits/google-analytics/tools/index.js +88 -0
- package/dist/toolkits/google-analytics/tools/links.d.ts +22 -0
- package/dist/toolkits/google-analytics/tools/links.js +56 -0
- package/dist/toolkits/google-analytics/tools/measurement.d.ts +3 -0
- package/dist/toolkits/google-analytics/tools/measurement.js +55 -0
- package/dist/toolkits/google-analytics/tools/reports.d.ts +136 -0
- package/dist/toolkits/google-analytics/tools/reports.js +200 -0
- package/dist/toolkits/google-contacts/icon.d.ts +5 -0
- package/dist/toolkits/google-contacts/icon.js +6 -0
- package/dist/toolkits/google-contacts/manifest.d.ts +3 -0
- package/dist/toolkits/google-contacts/manifest.js +48 -0
- package/dist/toolkits/google-contacts/tools/client.d.ts +19 -0
- package/dist/toolkits/google-contacts/tools/client.js +44 -0
- package/dist/toolkits/google-contacts/tools/contacts.d.ts +94 -0
- package/dist/toolkits/google-contacts/tools/contacts.js +273 -0
- package/dist/toolkits/google-contacts/tools/directory.d.ts +36 -0
- package/dist/toolkits/google-contacts/tools/directory.js +99 -0
- package/dist/toolkits/google-contacts/tools/groups.d.ts +68 -0
- package/dist/toolkits/google-contacts/tools/groups.js +169 -0
- package/dist/toolkits/google-contacts/tools/index.d.ts +347 -0
- package/dist/toolkits/google-contacts/tools/index.js +34 -0
- package/dist/toolkits/google-contacts/tools/photos.d.ts +26 -0
- package/dist/toolkits/google-contacts/tools/photos.js +52 -0
- package/dist/toolkits/google-maps/icon.d.ts +5 -0
- package/dist/toolkits/google-maps/icon.js +39 -0
- package/dist/toolkits/google-maps/manifest.d.ts +3 -0
- package/dist/toolkits/google-maps/manifest.js +55 -0
- package/dist/toolkits/google-maps/tools/client.d.ts +27 -0
- package/dist/toolkits/google-maps/tools/client.js +72 -0
- package/dist/toolkits/google-maps/tools/geocode.d.ts +49 -0
- package/dist/toolkits/google-maps/tools/geocode.js +168 -0
- package/dist/toolkits/google-maps/tools/index.d.ts +432 -0
- package/dist/toolkits/google-maps/tools/index.js +31 -0
- package/dist/toolkits/google-maps/tools/misc.d.ts +70 -0
- package/dist/toolkits/google-maps/tools/misc.js +158 -0
- package/dist/toolkits/google-maps/tools/places.d.ts +112 -0
- package/dist/toolkits/google-maps/tools/places.js +185 -0
- package/dist/toolkits/google-maps/tools/routes.d.ts +48 -0
- package/dist/toolkits/google-maps/tools/routes.js +97 -0
- package/dist/toolkits/google-maps/tools/tiles.d.ts +51 -0
- package/dist/toolkits/google-maps/tools/tiles.js +84 -0
- package/dist/toolkits/google-photos/icon.d.ts +5 -0
- package/dist/toolkits/google-photos/icon.js +6 -0
- package/dist/toolkits/google-photos/manifest.d.ts +3 -0
- package/dist/toolkits/google-photos/manifest.js +47 -0
- package/dist/toolkits/google-photos/tools/albums.d.ts +83 -0
- package/dist/toolkits/google-photos/tools/albums.js +180 -0
- package/dist/toolkits/google-photos/tools/client.d.ts +24 -0
- package/dist/toolkits/google-photos/tools/client.js +77 -0
- package/dist/toolkits/google-photos/tools/index.d.ts +261 -0
- package/dist/toolkits/google-photos/tools/index.js +22 -0
- package/dist/toolkits/google-photos/tools/media.d.ts +52 -0
- package/dist/toolkits/google-photos/tools/media.js +142 -0
- package/dist/toolkits/google-photos/tools/uploads.d.ts +58 -0
- package/dist/toolkits/google-photos/tools/uploads.js +107 -0
- package/dist/toolkits/google-tasks/tools/index.d.ts +1 -1
- package/dist/toolkits/google-tasks/tools/update-task-full.d.ts +1 -1
- package/dist/toolkits/groww/tools/index.d.ts +1 -1
- package/dist/toolkits/groww/tools/instruments.d.ts +1 -1
- package/dist/toolkits/hacker-news/icon.d.ts +5 -0
- package/dist/toolkits/hacker-news/icon.js +9 -0
- package/dist/toolkits/hacker-news/manifest.d.ts +3 -0
- package/dist/toolkits/hacker-news/manifest.js +25 -0
- package/dist/toolkits/hacker-news/tools/client.d.ts +8 -0
- package/dist/toolkits/hacker-news/tools/client.js +51 -0
- package/dist/toolkits/hacker-news/tools/index.d.ts +89 -0
- package/dist/toolkits/hacker-news/tools/index.js +22 -0
- package/dist/toolkits/hacker-news/tools/items.d.ts +42 -0
- package/dist/toolkits/hacker-news/tools/items.js +126 -0
- package/dist/toolkits/hacker-news/tools/search.d.ts +12 -0
- package/dist/toolkits/hacker-news/tools/search.js +40 -0
- package/dist/toolkits/hacker-news/tools/stories.d.ts +25 -0
- package/dist/toolkits/hacker-news/tools/stories.js +98 -0
- package/dist/toolkits/hostinger/icon.d.ts +5 -0
- package/dist/toolkits/hostinger/icon.js +6 -0
- package/dist/toolkits/hostinger/manifest.d.ts +3 -0
- package/dist/toolkits/hostinger/manifest.js +36 -0
- package/dist/toolkits/hostinger/tools/billing.d.ts +12 -0
- package/dist/toolkits/hostinger/tools/billing.js +35 -0
- package/dist/toolkits/hostinger/tools/client.d.ts +6 -0
- package/dist/toolkits/hostinger/tools/client.js +57 -0
- package/dist/toolkits/hostinger/tools/dns.d.ts +22 -0
- package/dist/toolkits/hostinger/tools/dns.js +47 -0
- package/dist/toolkits/hostinger/tools/domains.d.ts +21 -0
- package/dist/toolkits/hostinger/tools/domains.js +62 -0
- package/dist/toolkits/hostinger/tools/hosting.d.ts +17 -0
- package/dist/toolkits/hostinger/tools/hosting.js +38 -0
- package/dist/toolkits/hostinger/tools/index.d.ts +179 -0
- package/dist/toolkits/hostinger/tools/index.js +35 -0
- package/dist/toolkits/hostinger/tools/vps.d.ts +27 -0
- package/dist/toolkits/hostinger/tools/vps.js +77 -0
- package/dist/toolkits/hostinger/tools/whois.d.ts +33 -0
- package/dist/toolkits/hostinger/tools/whois.js +85 -0
- package/dist/toolkits/hugging-face/icon.d.ts +5 -0
- package/dist/toolkits/hugging-face/icon.js +6 -0
- package/dist/toolkits/hugging-face/manifest.d.ts +3 -0
- package/dist/toolkits/hugging-face/manifest.js +42 -0
- package/dist/toolkits/hugging-face/tools/client.d.ts +93 -0
- package/dist/toolkits/hugging-face/tools/client.js +192 -0
- package/dist/toolkits/hugging-face/tools/datasets-viewer.d.ts +65 -0
- package/dist/toolkits/hugging-face/tools/datasets-viewer.js +150 -0
- package/dist/toolkits/hugging-face/tools/datasets.d.ts +160 -0
- package/dist/toolkits/hugging-face/tools/datasets.js +383 -0
- package/dist/toolkits/hugging-face/tools/discussions.d.ts +68 -0
- package/dist/toolkits/hugging-face/tools/discussions.js +144 -0
- package/dist/toolkits/hugging-face/tools/index.d.ts +523 -0
- package/dist/toolkits/hugging-face/tools/index.js +163 -0
- package/dist/toolkits/hugging-face/tools/inference.d.ts +42 -0
- package/dist/toolkits/hugging-face/tools/inference.js +86 -0
- package/dist/toolkits/hugging-face/tools/models.d.ts +117 -0
- package/dist/toolkits/hugging-face/tools/models.js +273 -0
- package/dist/toolkits/hugging-face/tools/papers.d.ts +37 -0
- package/dist/toolkits/hugging-face/tools/papers.js +91 -0
- package/dist/toolkits/hugging-face/tools/repos.d.ts +96 -0
- package/dist/toolkits/hugging-face/tools/repos.js +201 -0
- package/dist/toolkits/hugging-face/tools/settings.d.ts +53 -0
- package/dist/toolkits/hugging-face/tools/settings.js +88 -0
- package/dist/toolkits/hugging-face/tools/spaces.d.ts +245 -0
- package/dist/toolkits/hugging-face/tools/spaces.js +468 -0
- package/dist/toolkits/hugging-face/tools/sql.d.ts +21 -0
- package/dist/toolkits/hugging-face/tools/sql.js +47 -0
- package/dist/toolkits/hugging-face/tools/users.d.ts +60 -0
- package/dist/toolkits/hugging-face/tools/users.js +132 -0
- package/dist/toolkits/hugging-face/tools/webhooks.d.ts +35 -0
- package/dist/toolkits/hugging-face/tools/webhooks.js +87 -0
- package/dist/toolkits/jira/icon.d.ts +5 -0
- package/dist/toolkits/jira/icon.js +6 -0
- package/dist/toolkits/jira/manifest.d.ts +3 -0
- package/dist/toolkits/jira/manifest.js +53 -0
- package/dist/toolkits/jira/tools/boards.d.ts +52 -0
- package/dist/toolkits/jira/tools/boards.js +104 -0
- package/dist/toolkits/jira/tools/client.d.ts +23 -0
- package/dist/toolkits/jira/tools/client.js +270 -0
- package/dist/toolkits/jira/tools/index.d.ts +1280 -0
- package/dist/toolkits/jira/tools/index.js +119 -0
- package/dist/toolkits/jira/tools/issue-fields.d.ts +10 -0
- package/dist/toolkits/jira/tools/issue-fields.js +111 -0
- package/dist/toolkits/jira/tools/issues.d.ts +304 -0
- package/dist/toolkits/jira/tools/issues.js +593 -0
- package/dist/toolkits/jira/tools/meta.d.ts +212 -0
- package/dist/toolkits/jira/tools/meta.js +369 -0
- package/dist/toolkits/jira/tools/projects.d.ts +130 -0
- package/dist/toolkits/jira/tools/projects.js +263 -0
- package/dist/toolkits/jira/tools/search.d.ts +90 -0
- package/dist/toolkits/jira/tools/search.js +181 -0
- package/dist/toolkits/jira/tools/users.d.ts +114 -0
- package/dist/toolkits/jira/tools/users.js +221 -0
- package/dist/toolkits/neo4j/icon.d.ts +5 -0
- package/dist/toolkits/neo4j/icon.js +6 -0
- package/dist/toolkits/neo4j/manifest.d.ts +3 -0
- package/dist/toolkits/neo4j/manifest.js +33 -0
- package/dist/toolkits/neo4j/tools/analytics.d.ts +21 -0
- package/dist/toolkits/neo4j/tools/analytics.js +91 -0
- package/dist/toolkits/neo4j/tools/client.d.ts +6 -0
- package/dist/toolkits/neo4j/tools/client.js +105 -0
- package/dist/toolkits/neo4j/tools/index.d.ts +198 -0
- package/dist/toolkits/neo4j/tools/index.js +30 -0
- package/dist/toolkits/neo4j/tools/instances.d.ts +47 -0
- package/dist/toolkits/neo4j/tools/instances.js +127 -0
- package/dist/toolkits/neo4j/tools/projects.d.ts +44 -0
- package/dist/toolkits/neo4j/tools/projects.js +110 -0
- package/dist/toolkits/neo4j/tools/snapshots.d.ts +20 -0
- package/dist/toolkits/neo4j/tools/snapshots.js +57 -0
- package/dist/toolkits/neon/icon.d.ts +5 -0
- package/dist/toolkits/neon/icon.js +8 -0
- package/dist/toolkits/neon/manifest.d.ts +3 -0
- package/dist/toolkits/neon/manifest.js +36 -0
- package/dist/toolkits/neon/tools/auth.d.ts +115 -0
- package/dist/toolkits/neon/tools/auth.js +286 -0
- package/dist/toolkits/neon/tools/branches.d.ts +189 -0
- package/dist/toolkits/neon/tools/branches.js +465 -0
- package/dist/toolkits/neon/tools/client.d.ts +10 -0
- package/dist/toolkits/neon/tools/client.js +69 -0
- package/dist/toolkits/neon/tools/dataapi.d.ts +42 -0
- package/dist/toolkits/neon/tools/dataapi.js +111 -0
- package/dist/toolkits/neon/tools/endpoints.d.ts +59 -0
- package/dist/toolkits/neon/tools/endpoints.js +163 -0
- package/dist/toolkits/neon/tools/index.d.ts +976 -0
- package/dist/toolkits/neon/tools/index.js +130 -0
- package/dist/toolkits/neon/tools/meta.d.ts +4 -0
- package/dist/toolkits/neon/tools/meta.js +16 -0
- package/dist/toolkits/neon/tools/orgs.d.ts +112 -0
- package/dist/toolkits/neon/tools/orgs.js +303 -0
- package/dist/toolkits/neon/tools/projects.d.ts +177 -0
- package/dist/toolkits/neon/tools/projects.js +468 -0
- package/dist/toolkits/neon/tools/snapshots.d.ts +24 -0
- package/dist/toolkits/neon/tools/snapshots.js +67 -0
- package/dist/toolkits/reddit/tools/index.d.ts +1 -1
- package/dist/toolkits/reddit/tools/search-across-subreddits.d.ts +1 -1
- package/dist/toolkits/slack/icon.d.ts +5 -0
- package/dist/toolkits/slack/icon.js +20 -0
- package/dist/toolkits/slack/manifest.d.ts +3 -0
- package/dist/toolkits/slack/manifest.js +93 -0
- package/dist/toolkits/slack/tools/admin-apps.d.ts +32 -0
- package/dist/toolkits/slack/tools/admin-apps.js +116 -0
- package/dist/toolkits/slack/tools/admin-conversations.d.ts +62 -0
- package/dist/toolkits/slack/tools/admin-conversations.js +246 -0
- package/dist/toolkits/slack/tools/admin-invites.d.ts +19 -0
- package/dist/toolkits/slack/tools/admin-invites.js +75 -0
- package/dist/toolkits/slack/tools/admin-users.d.ts +52 -0
- package/dist/toolkits/slack/tools/admin-users.js +182 -0
- package/dist/toolkits/slack/tools/audit.d.ts +20 -0
- package/dist/toolkits/slack/tools/audit.js +81 -0
- package/dist/toolkits/slack/tools/calls.d.ts +38 -0
- package/dist/toolkits/slack/tools/calls.js +141 -0
- package/dist/toolkits/slack/tools/canvas.d.ts +24 -0
- package/dist/toolkits/slack/tools/canvas.js +102 -0
- package/dist/toolkits/slack/tools/client.d.ts +22 -0
- package/dist/toolkits/slack/tools/client.js +73 -0
- package/dist/toolkits/slack/tools/conversations.d.ts +131 -0
- package/dist/toolkits/slack/tools/conversations.js +463 -0
- package/dist/toolkits/slack/tools/emoji.d.ts +29 -0
- package/dist/toolkits/slack/tools/emoji.js +118 -0
- package/dist/toolkits/slack/tools/files.d.ts +113 -0
- package/dist/toolkits/slack/tools/files.js +368 -0
- package/dist/toolkits/slack/tools/index.d.ts +28 -0
- package/dist/toolkits/slack/tools/index.js +187 -0
- package/dist/toolkits/slack/tools/messages.d.ts +106 -0
- package/dist/toolkits/slack/tools/messages.js +340 -0
- package/dist/toolkits/slack/tools/misc.d.ts +42 -0
- package/dist/toolkits/slack/tools/misc.js +127 -0
- package/dist/toolkits/slack/tools/reactions-stars-pins.d.ts +69 -0
- package/dist/toolkits/slack/tools/reactions-stars-pins.js +236 -0
- package/dist/toolkits/slack/tools/reminders.d.ts +22 -0
- package/dist/toolkits/slack/tools/reminders.js +83 -0
- package/dist/toolkits/slack/tools/search.d.ts +49 -0
- package/dist/toolkits/slack/tools/search.js +155 -0
- package/dist/toolkits/slack/tools/slack-lists.d.ts +65 -0
- package/dist/toolkits/slack/tools/slack-lists.js +282 -0
- package/dist/toolkits/slack/tools/teams.d.ts +75 -0
- package/dist/toolkits/slack/tools/teams.js +285 -0
- package/dist/toolkits/slack/tools/usergroups.d.ts +56 -0
- package/dist/toolkits/slack/tools/usergroups.js +194 -0
- package/dist/toolkits/slack/tools/users.d.ts +87 -0
- package/dist/toolkits/slack/tools/users.js +396 -0
- package/dist/toolkits/youtube/tools/add-video-to-playlist.d.ts +1 -1
- package/dist/toolkits/youtube/tools/delete-video.d.ts +1 -1
- package/dist/toolkits/youtube/tools/index.d.ts +10 -10
- package/dist/toolkits/youtube/tools/list-caption-track.d.ts +1 -1
- package/dist/toolkits/youtube/tools/list-playlist-items.d.ts +1 -1
- package/dist/toolkits/youtube/tools/list-video-categories.d.ts +1 -1
- package/dist/toolkits/youtube/tools/post-comment.d.ts +1 -1
- package/dist/toolkits/youtube/tools/report-video-abuse.d.ts +1 -1
- package/dist/toolkits/youtube/tools/search-youtube.d.ts +1 -1
- package/dist/toolkits/youtube/tools/update-thumbnail.d.ts +1 -1
- package/dist/toolkits/youtube/tools/update-video.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { neon, setNested } from './client.js';
|
|
5
|
+
const tokenField = z.string().optional().describe('Injected by system; do not provide');
|
|
6
|
+
export const neonAcceptProjectsTransferRequests = tool({
|
|
7
|
+
description: "Tool to accept a transfer request for a Neon project. Use when you need to accept an existing transfer request to transfer a project to your account or a specific organization.",
|
|
8
|
+
inputSchema: z.object({
|
|
9
|
+
neonApiKey: tokenField,
|
|
10
|
+
orgId: z.string().optional().describe("The Neon organization ID to transfer the project to (e.g., 'org-holy-recipe-01602027'). If not provided, the project will be transferred to the current user or organization account."),
|
|
11
|
+
projectId: z.string().describe("The Neon project ID (e.g., 'small-recipe-63664710'). Obtain via NEON_RETRIEVE_PROJECTS_LIST action."),
|
|
12
|
+
requestId: z.string().describe("The Neon project transfer request ID (e.g., 'a321073e-3947-4545-bf4a-c6d5835226e7'). Obtain via NEON_CREATE_PROJECTS_TRANSFER_REQUESTS action."),
|
|
13
|
+
}),
|
|
14
|
+
execute: async ({ neonApiKey, orgId, projectId, requestId }) => {
|
|
15
|
+
const queryParams = undefined;
|
|
16
|
+
const body = {};
|
|
17
|
+
if (orgId !== undefined)
|
|
18
|
+
setNested(body, 'org_id', orgId);
|
|
19
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/transfer_requests/${encodeURIComponent(requestId)}`, method: 'PUT', query: queryParams, body });
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
export const neonAccessProjectDetailsById = tool({
|
|
23
|
+
description: "Retrieves detailed information about a specific Neon serverless Postgres project. Returns comprehensive project data including configuration, database settings, compute resources, owner information, and consumption metrics. Use this action when you need to: - Get project configuration details (region, PostgreSQL version, settings) - Check project ownership and organization membership - Review compute and storage consumption metrics - Verify project settings before making updates The action is read-only and safe to call frequently. For listing multiple projects, use the retrieve_projects_list action instead.",
|
|
24
|
+
inputSchema: z.object({
|
|
25
|
+
neonApiKey: tokenField,
|
|
26
|
+
projectId: z.string().describe("The unique Neon project ID. This is a string identifier in the format 'adjective-noun-number' (e.g., 'dry-smoke-26258271'). You can obtain project IDs by listing projects using the retrieve_projects_list action."),
|
|
27
|
+
}),
|
|
28
|
+
execute: async ({ neonApiKey, projectId }) => {
|
|
29
|
+
const queryParams = undefined;
|
|
30
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}`, method: 'GET', query: queryParams });
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
export const neonAddNewJwksToProjectEndpoint = tool({
|
|
34
|
+
description: "Adds a new JSON Web Key Set (JWKS) URL to a Neon project for JWT-based authentication. The JWKS URL must point to a valid HTTPS endpoint that returns cryptographic keys used to verify JSON Web Tokens (JWTs). Use this action to configure authentication with identity providers like Google, Microsoft, Apple, Auth0, Clerk, or Stytch. The JWKS can be scoped to specific branches and mapped to database roles. Maximum of 10 role names can be associated with each JWKS configuration.",
|
|
35
|
+
inputSchema: z.object({
|
|
36
|
+
neonApiKey: tokenField,
|
|
37
|
+
jwksUrl: z.string().describe("A valid HTTPS URL that returns a JSON Web Key Set (JWKS) for JWT verification. Examples: https://www.googleapis.com/oauth2/v3/certs (Google), https://login.microsoftonline.com/common/discovery/v2.0/keys (Microsoft), https://appleid.apple.com/auth/keys (Apple)."),
|
|
38
|
+
branchId: z.string().optional().describe("The Neon branch ID to associate the JWKS with. If omitted, the JWKS applies to all branches in the project."),
|
|
39
|
+
projectId: z.string().describe("The Neon project ID"),
|
|
40
|
+
roleNames: z.array(z.string()).optional().describe("List of database role names that the JWKS should be mapped to. If omitted, defaults to authenticator, authenticated, and anonymous roles. Maximum of 10 role names allowed."),
|
|
41
|
+
jwtAudience: z.string().optional().describe("The required 'aud' (audience) claim value that must be present in JWTs for authentication. Used to ensure tokens are intended for your specific application."),
|
|
42
|
+
providerName: z.string().describe("The name of the authentication provider (e.g., Clerk, Stytch, Auth0)"),
|
|
43
|
+
}),
|
|
44
|
+
execute: async ({ neonApiKey, jwksUrl, branchId, projectId, roleNames, jwtAudience, providerName }) => {
|
|
45
|
+
const queryParams = undefined;
|
|
46
|
+
const body = {};
|
|
47
|
+
if (jwksUrl !== undefined)
|
|
48
|
+
setNested(body, 'jwks_url', jwksUrl);
|
|
49
|
+
if (branchId !== undefined)
|
|
50
|
+
setNested(body, 'branch_id', branchId);
|
|
51
|
+
if (roleNames !== undefined)
|
|
52
|
+
setNested(body, 'role_names', roleNames);
|
|
53
|
+
if (jwtAudience !== undefined)
|
|
54
|
+
setNested(body, 'jwt_audience', jwtAudience);
|
|
55
|
+
if (providerName !== undefined)
|
|
56
|
+
setNested(body, 'provider_name', providerName);
|
|
57
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/jwks`, method: 'POST', query: queryParams, body });
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
export const neonAddProjectEmailPermission = tool({
|
|
61
|
+
description: "Adds permissions for a specified email address to a particular project within the Neon B2B SaaS integration platform. This endpoint is used to grant access or specific rights to users for a given project, enabling collaboration and controlled resource sharing. It should be called when you need to add a new user to a project or modify existing user permissions. The endpoint associates the provided email with the specified project, likely setting up default or predefined permission levels. Note that this endpoint only adds permissions and does not provide information about existing permissions or remove them.",
|
|
62
|
+
inputSchema: z.object({
|
|
63
|
+
neonApiKey: tokenField,
|
|
64
|
+
email: z.string().describe("The email address of the user to grant project access to. The user will receive access to the project associated with this email address. Must be a valid email format (e.g., 'user@example.com')."),
|
|
65
|
+
projectId: z.string().describe("The unique identifier of the Neon project to grant access to. Project IDs follow the pattern of lowercase alphanumeric characters with hyphens (e.g., 'dry-smoke-26258271'). You can obtain this from the project list or project details."),
|
|
66
|
+
}),
|
|
67
|
+
execute: async ({ neonApiKey, email, projectId }) => {
|
|
68
|
+
const queryParams = undefined;
|
|
69
|
+
const body = {};
|
|
70
|
+
if (email !== undefined)
|
|
71
|
+
setNested(body, 'email', email);
|
|
72
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/permissions`, method: 'POST', query: queryParams, body });
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
export const neonCreateProjectsTransferRequests = tool({
|
|
76
|
+
description: "Tool to create a transfer request for a Neon project. Use when you need to transfer a project to another account or organization. The transfer request has an expiration time after which it can no longer be used.",
|
|
77
|
+
inputSchema: z.object({
|
|
78
|
+
neonApiKey: tokenField,
|
|
79
|
+
projectId: z.string().describe("The Neon project ID (e.g., 'small-recipe-63664710'). Obtain via NEON_RETRIEVE_PROJECTS_LIST action."),
|
|
80
|
+
ttlSeconds: z.number().int().optional().describe("Specifies the validity duration of the transfer request in seconds. If not provided, the request will expire after 24 hours (86,400 seconds)."),
|
|
81
|
+
}),
|
|
82
|
+
execute: async ({ neonApiKey, projectId, ttlSeconds }) => {
|
|
83
|
+
const queryParams = undefined;
|
|
84
|
+
const body = {};
|
|
85
|
+
if (ttlSeconds !== undefined)
|
|
86
|
+
setNested(body, 'ttl_seconds', ttlSeconds);
|
|
87
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/transfer_requests`, method: 'POST', query: queryParams, body });
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
export const neonCreateProjectWithQuotaAndSettings = tool({
|
|
91
|
+
description: "Creates a new Neon project with specified configuration settings. This endpoint allows you to set up a customized PostgreSQL environment with various options for resource management, networking, and performance optimization. It's ideal for initializing a new database project with tailored settings for quota management, IP access control, autoscaling, and more. Use this when you need to establish a new Neon project with specific requirements or when you want to take advantage of Neon's advanced features like logical replication or custom maintenance windows. Note that some settings, once configured, may not be easily changed later, so careful consideration of your project needs is recommended before creation.",
|
|
92
|
+
inputSchema: z.object({
|
|
93
|
+
neonApiKey: tokenField,
|
|
94
|
+
projectName: z.string().optional().describe("The project name"),
|
|
95
|
+
projectOrgId: z.string().optional().describe("Organization id in case the project created belongs to an organization. If not present, project is owned by a user and not by org. "),
|
|
96
|
+
projectRegionId: z.string().optional().describe("The region identifier. Refer to our [Regions](https://neon.tech/docs/introduction/regions) documentation for supported regions. Values are specified in this format: 'aws-us-east-1' "),
|
|
97
|
+
projectPgVersion: z.number().int().optional().describe("The major Postgres version number. Currently supported versions are '14', '15', '16', and '17'. "),
|
|
98
|
+
projectProvisioner: z.string().optional().describe("The Neon compute provisioner. Specify the 'k8s-neonvm' provisioner to create a compute endpoint that supports Autoscaling. Provisioner can be one of the following values: * k8s-pod * k8s-neonvm Clients must expect, that any string value that is not documented in the description above should be treated as a error. UNKNOWN value if safe to treat as an error too. "),
|
|
99
|
+
projectBranchName: z.string().optional().describe("The default branch name. If not specified, the default branch name, 'main', will be used. "),
|
|
100
|
+
projectStorePasswords: z.boolean().optional().describe("Whether or not passwords are stored for roles in the Neon project. Storing passwords facilitates access to Neon features that require authorization. "),
|
|
101
|
+
projectBranchRoleName: z.string().optional().describe("The role name. If not specified, the default role name, '{database_name}_owner', will be used. "),
|
|
102
|
+
projectBranchDatabaseName: z.string().optional().describe("The database name. If not specified, the default database name, 'neondb', will be used. "),
|
|
103
|
+
projectAutoscalingLimitMaxCu: z.number().int().optional().describe("Autoscaling Limit Max Cu"),
|
|
104
|
+
projectAutoscalingLimitMinCu: z.number().int().optional().describe("Autoscaling Limit Min Cu"),
|
|
105
|
+
projectHistoryRetentionSeconds: z.number().int().optional().describe("The number of seconds to retain the shared history for all branches in this project. The default is 1 day (86400 seconds). "),
|
|
106
|
+
projectSettingsAllowedIpsIps: z.array(z.string()).optional().describe("A list of IP addresses that are allowed to connect to the endpoint."),
|
|
107
|
+
projectSettingsBlockVpcConnections: z.boolean().optional().describe("When set, connections using VPC endpoints are disallowed. This parameter is under active development and its semantics may change in the future. "),
|
|
108
|
+
projectSettingsBlockPublicConnections: z.boolean().optional().describe("When set, connections from the public internet are disallowed. This supersedes the AllowedIPs list. This parameter is under active development and its semantics may change in the future. "),
|
|
109
|
+
projectSettingsQuotaLogicalSizeBytes: z.number().int().optional().describe("Limit on the logical size of every project\"s branch. "),
|
|
110
|
+
projectSettingsQuotaWrittenDataBytes: z.number().int().optional().describe("Total amount of data written to all of a project\"s branches. "),
|
|
111
|
+
projectSettingsEnableLogicalReplication: z.boolean().optional().describe("Sets wal_level=logical for all compute endpoints in this project. All active endpoints will be suspended. Once enabled, logical replication cannot be disabled. "),
|
|
112
|
+
projectSettingsQuotaActiveTimeSeconds: z.number().int().optional().describe("The total amount of wall-clock time allowed to be spent by the project\"s compute endpoints. "),
|
|
113
|
+
projectSettingsQuotaDataTransferBytes: z.number().int().optional().describe("Total amount of data transferred from all of a project\"s branches using the proxy. "),
|
|
114
|
+
projectSettingsMaintenanceWindowWeekdays: z.array(z.number().int()).optional().describe("A list of weekdays when the maintenance window is active. Encoded as ints, where 1 - Monday, and 7 - Sunday. "),
|
|
115
|
+
projectSettingsQuotaComputeTimeSeconds: z.number().int().optional().describe("The total amount of CPU seconds allowed to be spent by the project\"s compute endpoints. "),
|
|
116
|
+
projectSettingsMaintenanceWindowEndTime: z.string().optional().describe("End time of the maintenance window, in the format of \"HH:MM\". Uses UTC. "),
|
|
117
|
+
projectDefaultEndpointSettingsPgSettings: z.record(z.any()).optional().describe("A raw representation of Postgres settings"),
|
|
118
|
+
projectSettingsMaintenanceWindowStartTime: z.string().optional().describe("Start time of the maintenance window, in the format of \"HH:MM\". Uses UTC. "),
|
|
119
|
+
projectDefaultEndpointSettingsPgbouncerSettings: z.record(z.any()).optional().describe("A raw representation of PgBouncer settings"),
|
|
120
|
+
projectDefaultEpSettingsSuspendTimeoutSeconds: z.number().int().optional().describe("Duration of inactivity in seconds after which the compute endpoint is automatically suspended. The value '0' means use the global default. The value '-1' means never suspend. The default value is '300' seconds (5 minutes). The minimum value is '60' seconds (1 minute). The maximum value is '604800' seconds (1 week). For more information, see [Auto-suspend configuration](https://neon.tech/docs/manage/endpoints#auto-suspend-configuration). "),
|
|
121
|
+
projectSettingsAllowedIpsProtectedBranchesOnly: z.boolean().optional().describe("If true, the list will be applied only to protected branches."),
|
|
122
|
+
projectDefaultEpSettingsAutoscalingLimitMaxCu: z.number().int().optional().describe("Autoscaling Limit Max Cu"),
|
|
123
|
+
projectDefaultEpSettingsAutoscalingLimitMinCu: z.number().int().optional().describe("Autoscaling Limit Min Cu"),
|
|
124
|
+
}),
|
|
125
|
+
execute: async ({ neonApiKey, projectName, projectOrgId, projectRegionId, projectPgVersion, projectProvisioner, projectBranchName, projectStorePasswords, projectBranchRoleName, projectBranchDatabaseName, projectAutoscalingLimitMaxCu, projectAutoscalingLimitMinCu, projectHistoryRetentionSeconds, projectSettingsAllowedIpsIps, projectSettingsBlockVpcConnections, projectSettingsBlockPublicConnections, projectSettingsQuotaLogicalSizeBytes, projectSettingsQuotaWrittenDataBytes, projectSettingsEnableLogicalReplication, projectSettingsQuotaActiveTimeSeconds, projectSettingsQuotaDataTransferBytes, projectSettingsMaintenanceWindowWeekdays, projectSettingsQuotaComputeTimeSeconds, projectSettingsMaintenanceWindowEndTime, projectDefaultEndpointSettingsPgSettings, projectSettingsMaintenanceWindowStartTime, projectDefaultEndpointSettingsPgbouncerSettings, projectDefaultEpSettingsSuspendTimeoutSeconds, projectSettingsAllowedIpsProtectedBranchesOnly, projectDefaultEpSettingsAutoscalingLimitMaxCu, projectDefaultEpSettingsAutoscalingLimitMinCu }) => {
|
|
126
|
+
const queryParams = undefined;
|
|
127
|
+
const body = {};
|
|
128
|
+
if (projectName !== undefined)
|
|
129
|
+
setNested(body, 'project.name', projectName);
|
|
130
|
+
if (projectOrgId !== undefined)
|
|
131
|
+
setNested(body, 'project.org_id', projectOrgId);
|
|
132
|
+
if (projectRegionId !== undefined)
|
|
133
|
+
setNested(body, 'project.region_id', projectRegionId);
|
|
134
|
+
if (projectPgVersion !== undefined)
|
|
135
|
+
setNested(body, 'project.pg_version', projectPgVersion);
|
|
136
|
+
if (projectProvisioner !== undefined)
|
|
137
|
+
setNested(body, 'project.provisioner', projectProvisioner);
|
|
138
|
+
if (projectBranchName !== undefined)
|
|
139
|
+
setNested(body, 'project.branch.name', projectBranchName);
|
|
140
|
+
if (projectStorePasswords !== undefined)
|
|
141
|
+
setNested(body, 'project.store_passwords', projectStorePasswords);
|
|
142
|
+
if (projectBranchRoleName !== undefined)
|
|
143
|
+
setNested(body, 'project.branch.role_name', projectBranchRoleName);
|
|
144
|
+
if (projectBranchDatabaseName !== undefined)
|
|
145
|
+
setNested(body, 'project.branch.database_name', projectBranchDatabaseName);
|
|
146
|
+
if (projectAutoscalingLimitMaxCu !== undefined)
|
|
147
|
+
setNested(body, 'project.autoscaling_limit_max_cu', projectAutoscalingLimitMaxCu);
|
|
148
|
+
if (projectAutoscalingLimitMinCu !== undefined)
|
|
149
|
+
setNested(body, 'project.autoscaling_limit_min_cu', projectAutoscalingLimitMinCu);
|
|
150
|
+
if (projectHistoryRetentionSeconds !== undefined)
|
|
151
|
+
setNested(body, 'project.history_retention_seconds', projectHistoryRetentionSeconds);
|
|
152
|
+
if (projectSettingsAllowedIpsIps !== undefined)
|
|
153
|
+
setNested(body, 'project.settings.allowed_ips.ips', projectSettingsAllowedIpsIps);
|
|
154
|
+
if (projectSettingsBlockVpcConnections !== undefined)
|
|
155
|
+
setNested(body, 'project.settings.block_vpc_connections', projectSettingsBlockVpcConnections);
|
|
156
|
+
if (projectSettingsBlockPublicConnections !== undefined)
|
|
157
|
+
setNested(body, 'project.settings.block_public_connections', projectSettingsBlockPublicConnections);
|
|
158
|
+
if (projectSettingsQuotaLogicalSizeBytes !== undefined)
|
|
159
|
+
setNested(body, 'project.settings.quota.logical_size_bytes', projectSettingsQuotaLogicalSizeBytes);
|
|
160
|
+
if (projectSettingsQuotaWrittenDataBytes !== undefined)
|
|
161
|
+
setNested(body, 'project.settings.quota.written_data_bytes', projectSettingsQuotaWrittenDataBytes);
|
|
162
|
+
if (projectSettingsEnableLogicalReplication !== undefined)
|
|
163
|
+
setNested(body, 'project.settings.enable_logical_replication', projectSettingsEnableLogicalReplication);
|
|
164
|
+
if (projectSettingsQuotaActiveTimeSeconds !== undefined)
|
|
165
|
+
setNested(body, 'project.settings.quota.active_time_seconds', projectSettingsQuotaActiveTimeSeconds);
|
|
166
|
+
if (projectSettingsQuotaDataTransferBytes !== undefined)
|
|
167
|
+
setNested(body, 'project.settings.quota.data_transfer_bytes', projectSettingsQuotaDataTransferBytes);
|
|
168
|
+
if (projectSettingsMaintenanceWindowWeekdays !== undefined)
|
|
169
|
+
setNested(body, 'project.settings.maintenance_window.weekdays', projectSettingsMaintenanceWindowWeekdays);
|
|
170
|
+
if (projectSettingsQuotaComputeTimeSeconds !== undefined)
|
|
171
|
+
setNested(body, 'project.settings.quota.compute_time_seconds', projectSettingsQuotaComputeTimeSeconds);
|
|
172
|
+
if (projectSettingsMaintenanceWindowEndTime !== undefined)
|
|
173
|
+
setNested(body, 'project.settings.maintenance_window.end_time', projectSettingsMaintenanceWindowEndTime);
|
|
174
|
+
if (projectDefaultEndpointSettingsPgSettings !== undefined)
|
|
175
|
+
setNested(body, 'project.default_endpoint_settings.pg_settings', projectDefaultEndpointSettingsPgSettings);
|
|
176
|
+
if (projectSettingsMaintenanceWindowStartTime !== undefined)
|
|
177
|
+
setNested(body, 'project.settings.maintenance_window.start_time', projectSettingsMaintenanceWindowStartTime);
|
|
178
|
+
if (projectDefaultEndpointSettingsPgbouncerSettings !== undefined)
|
|
179
|
+
setNested(body, 'project.default_endpoint_settings.pgbouncer_settings', projectDefaultEndpointSettingsPgbouncerSettings);
|
|
180
|
+
if (projectDefaultEpSettingsSuspendTimeoutSeconds !== undefined)
|
|
181
|
+
setNested(body, 'project.default_endpoint_settings.suspend_timeout_seconds', projectDefaultEpSettingsSuspendTimeoutSeconds);
|
|
182
|
+
if (projectSettingsAllowedIpsProtectedBranchesOnly !== undefined)
|
|
183
|
+
setNested(body, 'project.settings.allowed_ips.protected_branches_only', projectSettingsAllowedIpsProtectedBranchesOnly);
|
|
184
|
+
if (projectDefaultEpSettingsAutoscalingLimitMaxCu !== undefined)
|
|
185
|
+
setNested(body, 'project.default_endpoint_settings.autoscaling_limit_max_cu', projectDefaultEpSettingsAutoscalingLimitMaxCu);
|
|
186
|
+
if (projectDefaultEpSettingsAutoscalingLimitMinCu !== undefined)
|
|
187
|
+
setNested(body, 'project.default_endpoint_settings.autoscaling_limit_min_cu', projectDefaultEpSettingsAutoscalingLimitMinCu);
|
|
188
|
+
return neon(neonApiKey, { path: `/projects`, method: 'POST', query: queryParams, body });
|
|
189
|
+
},
|
|
190
|
+
});
|
|
191
|
+
export const neonCreateVpcEndpointLabel = tool({
|
|
192
|
+
description: "Sets or updates a VPC endpoint restriction for a Neon project. When a VPC endpoint restriction is set, the project only accepts connections from the specified VPC endpoint, providing network-level security isolation. This is useful for Private Networking scenarios where you want to restrict database access to only connections coming through a specific AWS VPC endpoint. The VPC endpoint must first be assigned to the parent organization (using the organization-level VPC endpoint API) before it can be used as a project restriction. The operation is idempotent - repeated calls with the same parameters will not create additional changes. Note: This is a paid feature requiring a Neon Business or Enterprise plan.",
|
|
193
|
+
inputSchema: z.object({
|
|
194
|
+
neonApiKey: tokenField,
|
|
195
|
+
label: z.string().describe("A descriptive label for the VPC endpoint restriction. Used for identification and organization purposes. Example: 'Production VPC' or 'Dev Environment'."),
|
|
196
|
+
projectId: z.string().describe("The Neon project ID. Must match pattern ^[a-z0-9-]{1,60}$. Example: 'dry-smoke-26258271'."),
|
|
197
|
+
vpcEndpointId: z.string().describe("The AWS VPC endpoint ID to restrict connections to. Must start with 'vpce-' prefix followed by alphanumeric characters. Example: 'vpce-0f00567fa8EXAMPLE'. The VPC endpoint must first be assigned to the organization before it can be used as a project restriction."),
|
|
198
|
+
}),
|
|
199
|
+
execute: async ({ neonApiKey, label, projectId, vpcEndpointId }) => {
|
|
200
|
+
const queryParams = undefined;
|
|
201
|
+
const body = {};
|
|
202
|
+
if (label !== undefined)
|
|
203
|
+
setNested(body, 'label', label);
|
|
204
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/vpc_endpoints/${encodeURIComponent(vpcEndpointId)}`, method: 'POST', query: queryParams, body });
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
export const neonDeleteProjectById = tool({
|
|
208
|
+
description: "Permanently deletes a Neon PostgreSQL project and all its associated resources. WARNING: This is a destructive operation that cannot be undone. All data, branches, endpoints, databases, and configurations will be permanently removed. Use this action when: - A project is no longer needed - Cleaning up test/development resources - Removing unused projects to free up quota Returns the details of the deleted project upon successful deletion. Returns 404 if the project does not exist or is not accessible.",
|
|
209
|
+
inputSchema: z.object({
|
|
210
|
+
neonApiKey: tokenField,
|
|
211
|
+
projectId: z.string().describe("The unique Neon project ID to delete. This is a string identifier in the format 'adjective-noun-number' (e.g., 'cool-breeze-12345678'). Can be obtained from project creation or list projects API."),
|
|
212
|
+
}),
|
|
213
|
+
execute: async ({ neonApiKey, projectId }) => {
|
|
214
|
+
const queryParams = undefined;
|
|
215
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}`, method: 'DELETE', query: queryParams });
|
|
216
|
+
},
|
|
217
|
+
});
|
|
218
|
+
export const neonDeleteProjectJwksById = tool({
|
|
219
|
+
description: "Deletes a specific JSON Web Key Set (JWKS) associated with a given project in the Neon B2B SaaS integration platform. This endpoint is used to remove outdated or unnecessary cryptographic keys from a project's key management system. It should be used when rotating keys, decommissioning integrations, or as part of regular key hygiene practices. The operation is irreversible, so caution should be exercised to ensure the correct JWKS is being deleted. This endpoint does not provide information about the JWKS being deleted or return the deleted keys for security reasons.",
|
|
220
|
+
inputSchema: z.object({
|
|
221
|
+
neonApiKey: tokenField,
|
|
222
|
+
jwksId: z.string().describe("The JWKS ID"),
|
|
223
|
+
projectId: z.string().describe("The Neon project ID"),
|
|
224
|
+
}),
|
|
225
|
+
execute: async ({ neonApiKey, jwksId, projectId }) => {
|
|
226
|
+
const queryParams = undefined;
|
|
227
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/jwks/${encodeURIComponent(jwksId)}`, method: 'DELETE', query: queryParams });
|
|
228
|
+
},
|
|
229
|
+
});
|
|
230
|
+
export const neonDeleteProjectPermission = tool({
|
|
231
|
+
description: "Deletes a specific permission associated with a project in the Neon B2B SaaS integration platform. This endpoint is used to remove access rights or privileges from a project, which is crucial for maintaining proper access control and security. It should be used when you need to revoke or remove a particular permission that is no longer required or valid for the project. This operation is permanent and cannot be undone, so it should be used with caution. The endpoint requires both the project ID and the specific permission ID to ensure precise permission management within the project context.",
|
|
232
|
+
inputSchema: z.object({
|
|
233
|
+
neonApiKey: tokenField,
|
|
234
|
+
projectId: z.string().describe("The unique identifier of the Neon project. Format: lowercase-words-numbers (e.g., 'dry-smoke-26258271'). Can be obtained from the projects list endpoint."),
|
|
235
|
+
permissionId: z.string().describe("The unique identifier (UUID) of the permission to revoke. Format: UUID (e.g., '92a6ce17-b30d-40ce-aa30-bd0d1dc0de1c'). Can be obtained from the project permissions list endpoint."),
|
|
236
|
+
}),
|
|
237
|
+
execute: async ({ neonApiKey, projectId, permissionId }) => {
|
|
238
|
+
const queryParams = undefined;
|
|
239
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/permissions/${encodeURIComponent(permissionId)}`, method: 'DELETE', query: queryParams });
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
export const neonDeleteVpcEndpointByProjectId = tool({
|
|
243
|
+
description: "Deletes a specific VPC endpoint within a designated project in the Neon platform. This endpoint should be used when you need to remove a VPC endpoint that is no longer required or has become obsolete. The operation is irreversible, so it should be used with caution. Once a VPC endpoint is deleted, any connections or integrations relying on it will be disrupted. This endpoint is particularly useful for cleaning up resources and managing network configurations in your Neon projects.",
|
|
244
|
+
inputSchema: z.object({
|
|
245
|
+
neonApiKey: tokenField,
|
|
246
|
+
projectId: z.string().describe("The Neon project ID"),
|
|
247
|
+
vpcEndpointId: z.string().describe("The VPC endpoint ID"),
|
|
248
|
+
}),
|
|
249
|
+
execute: async ({ neonApiKey, projectId, vpcEndpointId }) => {
|
|
250
|
+
const queryParams = undefined;
|
|
251
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/vpc_endpoints/${encodeURIComponent(vpcEndpointId)}`, method: 'DELETE', query: queryParams });
|
|
252
|
+
},
|
|
253
|
+
});
|
|
254
|
+
export const neonGetAvailablePreloadLibraries = tool({
|
|
255
|
+
description: "Retrieves the list of available shared preload libraries for a Neon project. Shared preload libraries are PostgreSQL extensions that can be loaded at server startup using the shared_preload_libraries setting. Use this action when you need to: - Discover which PostgreSQL extensions are available for your project - Check versions of available extensions (TimescaleDB, pg_cron, etc.) - Identify experimental vs. stable extensions before configuration - Review default libraries included in your project configuration Returns details about each library including name, version, description, and whether it's experimental or included by default. Common extensions include timescaledb (time-series data), pg_cron (job scheduling), pg_partman_bgw (partition management), and vector search extensions.",
|
|
256
|
+
inputSchema: z.object({
|
|
257
|
+
neonApiKey: tokenField,
|
|
258
|
+
projectId: z.string().describe("The unique Neon project ID (e.g., 'proud-meadow-87189985'). Can be found in the Neon console URL or via the list projects API."),
|
|
259
|
+
}),
|
|
260
|
+
execute: async ({ neonApiKey, projectId }) => {
|
|
261
|
+
const queryParams = undefined;
|
|
262
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/available_preload_libraries`, method: 'GET', query: queryParams });
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
export const neonGetConsumptionHistoryProjects = tool({
|
|
266
|
+
description: "Retrieves consumption history for projects within a Neon organization. IMPORTANT: This endpoint is only available for Scale, Business, and Enterprise plan accounts. Free and Launch plans do not have access to this endpoint. Returns metrics including: - active_time_seconds: Time computes were active - compute_time_seconds: Total CPU seconds used (2 CPUs for 1 second = 2) - written_data_bytes: Data written to branches - synthetic_storage_size_bytes: Total storage occupied The org_id parameter is required to identify which organization's projects to query. Results are ordered chronologically (oldest to newest). Rate limit: ~30 requests/minute shared with account consumption endpoint. Note: This API call does NOT wake sleeping compute endpoints.",
|
|
267
|
+
inputSchema: z.object({
|
|
268
|
+
neonApiKey: tokenField,
|
|
269
|
+
to: z.string().describe("Specify the end 'date-time' for the consumption period. The 'date-time' value is rounded according to the specified granularity. For example, '2024-03-15T15:30:00Z' for 'daily' granularity will be rounded to '2024-03-15T00:00:00Z'. The specified 'date-time' value must respect the specified 'granularity': - For 'hourly', consumption metrics are limited to the last 168 hours. - For 'daily', consumption metrics are limited to the last 60 days. - For 'monthly', consumption metrics are limited to the last year. "),
|
|
270
|
+
from: z.string().describe("Specify the start 'date-time' for the consumption period. The 'date-time' value is rounded according to the specified 'granularity'. For example, '2024-03-15T15:30:00Z' for 'daily' granularity will be rounded to '2024-03-15T00:00:00Z'. The specified 'date-time' value must respect the specified 'granularity': - For 'hourly', consumption metrics are limited to the last 168 hours. - For 'daily', consumption metrics are limited to the last 60 days. - For 'monthly', consumption metrics are limited to the last year. The consumption history is available starting from 'March 1, 2024, at 00:00:00 UTC'. "),
|
|
271
|
+
limit: z.number().int().optional().describe("Specify a value from 1 to 100 to limit number of projects in the response. "),
|
|
272
|
+
cursor: z.string().optional().describe("Specify the cursor value from the previous response to get the next batch of projects. "),
|
|
273
|
+
orgId: z.string().optional().describe("The organization ID to retrieve project consumption metrics for. IMPORTANT: This parameter is effectively required - API returns an error without it. Get your org_id from NEON_GET_USER_ORGANIZATIONS. Format: 'org-xxxx-xxxx-xxxxxxxx'."),
|
|
274
|
+
granularity: z.enum(["hourly", "daily", "monthly"]).describe("Specify the granularity of consumption metrics. Hourly, daily, and monthly metrics are available for the last 168 hours, 60 days, and 1 year, respectively. "),
|
|
275
|
+
projectIds: z.array(z.string()).optional().describe("Specify a list of project IDs to filter the response. If omitted, the response will contain all projects. A list of project IDs can be specified as an array of parameter values or as a comma-separated list in a single parameter value. - As an array of parameter values: 'project_ids=cold-poetry-09157238%20&project_ids=quiet-snow-71788278' - As a comma-separated list in a single parameter value: 'project_ids=cold-poetry-09157238,quiet-snow-71788278' "),
|
|
276
|
+
includeV1Metrics: z.boolean().optional().describe("Include metrics utilized in previous pricing models. - **data_storage_bytes_hour**: The sum of the maximum observed storage values for each hour, which never decreases. "),
|
|
277
|
+
}),
|
|
278
|
+
execute: async ({ neonApiKey, to, from, limit, cursor, orgId, granularity, projectIds, includeV1Metrics }) => {
|
|
279
|
+
const queryParams = { to: to, from: from, limit: limit, cursor: cursor, org_id: orgId, granularity: granularity, project_ids: projectIds, include_v1_metrics: includeV1Metrics };
|
|
280
|
+
return neon(neonApiKey, { path: `/consumption_history/projects`, method: 'GET', query: queryParams });
|
|
281
|
+
},
|
|
282
|
+
});
|
|
283
|
+
export const neonGetProjectConnectionUri = tool({
|
|
284
|
+
description: "Retrieves the connection URI for a specified project within the Neon B2B SaaS integration platform. This endpoint is crucial for establishing connectivity to a project's resources, enabling access to its data and functionalities. Use this when you need to programmatically obtain the connection details for a specific project, which is essential for integrating with the project's data sources or services. The connection URI serves as a unique identifier and access point for the project, facilitating seamless data exchange and workflow automation between different systems and applications within the Neon ecosystem.",
|
|
285
|
+
inputSchema: z.object({
|
|
286
|
+
neonApiKey: tokenField,
|
|
287
|
+
pooled: z.boolean().optional().describe("Adds the '-pooler' option to the connection URI when set to 'true', creating a pooled connection URI. "),
|
|
288
|
+
branchId: z.string().optional().describe("The branch ID. Defaults to the project's default branch_id if not specified. The branch must have an associated compute endpoint."),
|
|
289
|
+
roleName: z.string().describe("The PostgreSQL role name to use for authentication (e.g., 'neondb_owner')."),
|
|
290
|
+
projectId: z.string().describe("The Neon project ID"),
|
|
291
|
+
endpointId: z.string().optional().describe("The compute endpoint ID (starts with 'ep-'). Defaults to the read-write endpoint associated with the branch_id if not specified. Required if the branch has multiple endpoints or no default read-write endpoint."),
|
|
292
|
+
databaseName: z.string().describe("The name of the database to connect to within the branch (e.g., 'neondb')."),
|
|
293
|
+
}),
|
|
294
|
+
execute: async ({ neonApiKey, pooled, branchId, roleName, projectId, endpointId, databaseName }) => {
|
|
295
|
+
const queryParams = { pooled: pooled, branch_id: branchId, role_name: roleName, endpoint_id: endpointId, database_name: databaseName };
|
|
296
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/connection_uri`, method: 'GET', query: queryParams });
|
|
297
|
+
},
|
|
298
|
+
});
|
|
299
|
+
export const neonGetProjectEndpointInformation = tool({
|
|
300
|
+
description: "Retrieves a list of all compute endpoints associated with a specific Neon project. Compute endpoints are the connection points for your Neon PostgreSQL databases. Use this action to get information about endpoint hosts, states, autoscaling settings, and connection pooling configuration. Each endpoint is associated with a branch and includes details like the hostname for database connections, current state (active/idle/suspended), compute unit limits, and region. This is useful for monitoring endpoint health, getting connection strings, or managing compute resources.",
|
|
301
|
+
inputSchema: z.object({
|
|
302
|
+
neonApiKey: tokenField,
|
|
303
|
+
projectId: z.string().describe("The unique identifier for a Neon project (e.g., 'calm-breeze-57229290'). Can be obtained from the projects list endpoint."),
|
|
304
|
+
}),
|
|
305
|
+
execute: async ({ neonApiKey, projectId }) => {
|
|
306
|
+
const queryParams = undefined;
|
|
307
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/endpoints`, method: 'GET', query: queryParams });
|
|
308
|
+
},
|
|
309
|
+
});
|
|
310
|
+
export const neonGetProjectOperationById = tool({
|
|
311
|
+
description: "Retrieves detailed information about a specific operation within a Neon serverless PostgreSQL project. Use this endpoint to check the status and details of operations such as compute start/suspend, branch creation/deletion, configuration changes, or timeline operations. This is useful for monitoring long-running tasks, verifying operation completion, or debugging failures. Requires both a project ID and operation ID. Returns operation details including status ('scheduling', 'running', 'finished', 'failed'), duration, and associated branch/endpoint IDs. This is a read-only endpoint.",
|
|
312
|
+
inputSchema: z.object({
|
|
313
|
+
neonApiKey: tokenField,
|
|
314
|
+
projectId: z.string().describe("The Neon project ID (e.g., 'dry-smoke-26258271'). Can be obtained from the list projects endpoint."),
|
|
315
|
+
operationId: z.string().describe("The unique identifier (UUID) of the operation to retrieve (e.g., 'f3bcadce-07ac-4c2f-8dae-182d02da1518'). Can be obtained from the list project operations endpoint."),
|
|
316
|
+
}),
|
|
317
|
+
execute: async ({ neonApiKey, projectId, operationId }) => {
|
|
318
|
+
const queryParams = undefined;
|
|
319
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/operations/${encodeURIComponent(operationId)}`, method: 'GET', query: queryParams });
|
|
320
|
+
},
|
|
321
|
+
});
|
|
322
|
+
export const neonListSharedProjects = tool({
|
|
323
|
+
description: "Retrieves a list of Neon Postgres projects shared with your account. Returns projects that other users have granted you access to, along with pagination info. Use this to view and manage collaborative database projects. Supports filtering by project name/ID and pagination for large result sets.",
|
|
324
|
+
inputSchema: z.object({
|
|
325
|
+
neonApiKey: tokenField,
|
|
326
|
+
limit: z.number().int().optional().describe("Maximum number of projects to return per page (1-400). Defaults to 10."),
|
|
327
|
+
cursor: z.string().optional().describe("Pagination cursor from a previous response to retrieve the next page of results. Omit for the first request."),
|
|
328
|
+
search: z.string().optional().describe("Filter projects by name or project ID. Case-insensitive partial match."),
|
|
329
|
+
}),
|
|
330
|
+
execute: async ({ neonApiKey, limit, cursor, search }) => {
|
|
331
|
+
const queryParams = { limit: limit, cursor: cursor, search: search };
|
|
332
|
+
return neon(neonApiKey, { path: `/projects/shared`, method: 'GET', query: queryParams });
|
|
333
|
+
},
|
|
334
|
+
});
|
|
335
|
+
export const neonRetrieveJwksForProject = tool({
|
|
336
|
+
description: "Retrieves the JSON Web Key Set (JWKS) for a specified project. This endpoint should be used when a client needs to obtain the public keys necessary for verifying JSON Web Tokens (JWTs) issued by the project. The JWKS contains the cryptographic keys used in the project's authentication process. It's essential for implementing secure, token-based authentication in applications integrated with the Neon platform. This endpoint is typically called during the initial setup of a client application or when rotating security keys. Note that the JWKS should be cached by clients to reduce unnecessary API calls, but periodic refreshes are recommended to ensure up-to-date keys.",
|
|
337
|
+
inputSchema: z.object({
|
|
338
|
+
neonApiKey: tokenField,
|
|
339
|
+
projectId: z.string().describe("The Neon project ID"),
|
|
340
|
+
}),
|
|
341
|
+
execute: async ({ neonApiKey, projectId }) => {
|
|
342
|
+
const queryParams = undefined;
|
|
343
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/jwks`, method: 'GET', query: queryParams });
|
|
344
|
+
},
|
|
345
|
+
});
|
|
346
|
+
export const neonRetrieveProjectOperations = tool({
|
|
347
|
+
description: "Retrieves a list of operations associated with a specific project in the Neon B2B SaaS integration platform. This endpoint should be used when you need to fetch all operations related to a particular project, such as for monitoring ongoing tasks, auditing completed actions, or planning future integrations. It provides a comprehensive view of the project's operational landscape, which is crucial for managing complex integration workflows. Note that this endpoint only returns the operations list and may not include detailed information about each operation's current status or results; separate API calls might be necessary for such details.",
|
|
348
|
+
inputSchema: z.object({
|
|
349
|
+
neonApiKey: tokenField,
|
|
350
|
+
limit: z.number().int().optional().describe("Specify a value from 1 to 1000 to limit number of operations in the response "),
|
|
351
|
+
cursor: z.string().optional().describe("Specify the cursor value from the previous response to get the next batch of operations "),
|
|
352
|
+
projectId: z.string().describe("The Neon project ID"),
|
|
353
|
+
}),
|
|
354
|
+
execute: async ({ neonApiKey, limit, cursor, projectId }) => {
|
|
355
|
+
const queryParams = { limit: limit, cursor: cursor };
|
|
356
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/operations`, method: 'GET', query: queryParams });
|
|
357
|
+
},
|
|
358
|
+
});
|
|
359
|
+
export const neonRetrieveProjectPermissions = tool({
|
|
360
|
+
description: "Retrieves the current permissions settings for a specific project within the Neon B2B SaaS integration platform. This endpoint allows users to view the access rights and roles assigned to various users or entities for the specified project. It should be used when you need to audit or review the current permission structure of a project, such as before making changes or for compliance checks. The endpoint returns a comprehensive list of permissions but does not modify any settings. It's important to note that this endpoint only provides a snapshot of permissions at the time of the call and does not reflect any pending changes or provide historical permission data.",
|
|
361
|
+
inputSchema: z.object({
|
|
362
|
+
neonApiKey: tokenField,
|
|
363
|
+
projectId: z.string().describe("Project Id"),
|
|
364
|
+
}),
|
|
365
|
+
execute: async ({ neonApiKey, projectId }) => {
|
|
366
|
+
const queryParams = undefined;
|
|
367
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/permissions`, method: 'GET', query: queryParams });
|
|
368
|
+
},
|
|
369
|
+
});
|
|
370
|
+
export const neonRetrieveProjectsList = tool({
|
|
371
|
+
description: "Retrieves a list of all Neon projects associated with the authenticated user's account. This endpoint provides a comprehensive overview of the user's projects, enabling efficient project management and integration workflows. It should be used when you need to obtain information about multiple projects at once, such as for dashboard displays, project selection interfaces, or batch processing tasks. The endpoint returns project details in JSON format, which can be easily parsed and utilized in various applications or data analysis processes. Note that while this endpoint gives a broad view of projects, it may not include detailed data sets or specific project contents, which might require additional API calls. IMPORTANT: When using a Personal API key with an organization account, the org_id parameter is REQUIRED. If you don't know the org_id, first call NEON_GET_USER_ORGANIZATIONS to discover it. Organization API keys don't need org_id as they're already scoped to an organization.",
|
|
372
|
+
inputSchema: z.object({
|
|
373
|
+
neonApiKey: tokenField,
|
|
374
|
+
limit: z.number().int().optional().describe("Specify a value from 1 to 400 to limit number of projects in the response. "),
|
|
375
|
+
cursor: z.string().optional().describe("Specify the cursor value from the previous response to retrieve the next batch of projects. "),
|
|
376
|
+
orgId: z.string().optional().describe("Organization ID to retrieve projects for. REQUIRED when using a Personal API key with an organization account (returns 400 error if omitted). NOT needed when using an Organization API key (key is already scoped). If you don't have the org_id, call NEON_GET_USER_ORGANIZATIONS to discover it."),
|
|
377
|
+
search: z.string().optional().describe("Search by project 'name' or 'id'. You can specify partial 'name' or 'id' values to filter results. "),
|
|
378
|
+
timeout: z.number().int().optional().describe("Specify an explicit timeout in milliseconds to limit response delay. After timing out, the incomplete list of project data fetched so far will be returned. Projects still being fetched when the timeout occurred are listed in the \"unavailable\" attribute of the response. If not specified, an implicit implementation defined timeout is chosen with the same behaviour as above "),
|
|
379
|
+
}),
|
|
380
|
+
execute: async ({ neonApiKey, limit, cursor, orgId, search, timeout }) => {
|
|
381
|
+
const queryParams = { limit: limit, cursor: cursor, org_id: orgId, search: search, timeout: timeout };
|
|
382
|
+
return neon(neonApiKey, { path: `/projects`, method: 'GET', query: queryParams });
|
|
383
|
+
},
|
|
384
|
+
});
|
|
385
|
+
export const neonRetrieveVpcEndpointsForProject = tool({
|
|
386
|
+
description: "Retrieves a list of VPC (Virtual Private Cloud) endpoints associated with a specific project in the Neon B2B SaaS integration platform. This endpoint allows developers to fetch information about private network connections that enable secure communication between the project's resources and various AWS services without traversing the public internet. Use this endpoint when you need to audit, manage, or view the current VPC endpoint configurations for a given project. It's particularly useful for ensuring proper network isolation and security in complex integration scenarios. The endpoint does not create or modify VPC endpoints; it only provides read access to existing configurations.",
|
|
387
|
+
inputSchema: z.object({
|
|
388
|
+
neonApiKey: tokenField,
|
|
389
|
+
projectId: z.string().describe("The Neon project ID"),
|
|
390
|
+
}),
|
|
391
|
+
execute: async ({ neonApiKey, projectId }) => {
|
|
392
|
+
const queryParams = undefined;
|
|
393
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/vpc_endpoints`, method: 'GET', query: queryParams });
|
|
394
|
+
},
|
|
395
|
+
});
|
|
396
|
+
export const neonUpdateProjectSettingsById = tool({
|
|
397
|
+
description: "Updates the configuration and settings of a specific Neon project. This endpoint allows fine-grained control over various aspects of a project, including resource quotas, security settings, maintenance windows, and default endpoint configurations. It's particularly useful for adjusting project parameters to optimize performance, enhance security, or comply with specific operational requirements. The endpoint should be used when changes to project-wide settings are necessary, such as modifying resource limits, adjusting IP access controls, or reconfiguring maintenance schedules. Note that some changes, like enabling logical replication, may have significant impacts on project operations and cannot be reversed. Care should be taken when modifying critical settings to avoid unintended consequences on project functionality or availability.",
|
|
398
|
+
inputSchema: z.object({
|
|
399
|
+
neonApiKey: tokenField,
|
|
400
|
+
projectId: z.string().describe("The Neon project ID"),
|
|
401
|
+
projectName: z.string().optional().describe("The project name"),
|
|
402
|
+
projectHistoryRetentionSeconds: z.number().int().optional().describe("The number of seconds to retain the shared history for all branches in this project. The default is 1 day (604800 seconds). "),
|
|
403
|
+
projectSettingsAllowedIpsIps: z.array(z.string()).optional().describe("A list of IP addresses that are allowed to connect to the endpoint."),
|
|
404
|
+
projectSettingsBlockVpcConnections: z.boolean().optional().describe("When set, connections using VPC endpoints are disallowed. This parameter is under active development and its semantics may change in the future. "),
|
|
405
|
+
projectSettingsBlockPublicConnections: z.boolean().optional().describe("When set, connections from the public internet are disallowed. This supersedes the AllowedIPs list. This parameter is under active development and its semantics may change in the future. "),
|
|
406
|
+
projectSettingsQuotaLogicalSizeBytes: z.number().int().optional().describe("Limit on the logical size of every project\"s branch. "),
|
|
407
|
+
projectSettingsQuotaWrittenDataBytes: z.number().int().optional().describe("Total amount of data written to all of a project\"s branches. "),
|
|
408
|
+
projectSettingsEnableLogicalReplication: z.boolean().optional().describe("Sets wal_level=logical for all compute endpoints in this project. All active endpoints will be suspended. Once enabled, logical replication cannot be disabled. "),
|
|
409
|
+
projectSettingsQuotaActiveTimeSeconds: z.number().int().optional().describe("The total amount of wall-clock time allowed to be spent by the project\"s compute endpoints. "),
|
|
410
|
+
projectSettingsQuotaDataTransferBytes: z.number().int().optional().describe("Total amount of data transferred from all of a project\"s branches using the proxy. "),
|
|
411
|
+
projectSettingsMaintenanceWindowWeekdays: z.array(z.number().int()).optional().describe("A list of weekdays when the maintenance window is active. Encoded as ints, where 1 - Monday, and 7 - Sunday. "),
|
|
412
|
+
projectSettingsQuotaComputeTimeSeconds: z.number().int().optional().describe("The total amount of CPU seconds allowed to be spent by the project\"s compute endpoints. "),
|
|
413
|
+
projectSettingsMaintenanceWindowEndTime: z.string().optional().describe("End time of the maintenance window, in the format of \"HH:MM\". Uses UTC. "),
|
|
414
|
+
projectDefaultEndpointSettingsPgSettings: z.record(z.any()).optional().describe("A raw representation of Postgres settings"),
|
|
415
|
+
projectSettingsMaintenanceWindowStartTime: z.string().optional().describe("Start time of the maintenance window, in the format of \"HH:MM\". Uses UTC. "),
|
|
416
|
+
projectDefaultEndpointSettingsPgbouncerSettings: z.record(z.any()).optional().describe("A raw representation of PgBouncer settings"),
|
|
417
|
+
projectDefaultEpSettingsSuspendTimeoutSeconds: z.number().int().optional().describe("Duration of inactivity in seconds after which the compute endpoint is automatically suspended. The value '0' means use the global default. The value '-1' means never suspend. The default value is '300' seconds (5 minutes). The minimum value is '60' seconds (1 minute). The maximum value is '604800' seconds (1 week). For more information, see [Auto-suspend configuration](https://neon.tech/docs/manage/endpoints#auto-suspend-configuration). "),
|
|
418
|
+
projectSettingsAllowedIpsProtectedBranchesOnly: z.boolean().optional().describe("If true, the list will be applied only to protected branches."),
|
|
419
|
+
projectDefaultEpSettingsAutoscalingLimitMaxCu: z.number().int().optional().describe("Autoscaling Limit Max Cu"),
|
|
420
|
+
projectDefaultEpSettingsAutoscalingLimitMinCu: z.number().int().optional().describe("Autoscaling Limit Min Cu"),
|
|
421
|
+
}),
|
|
422
|
+
execute: async ({ neonApiKey, projectId, projectName, projectHistoryRetentionSeconds, projectSettingsAllowedIpsIps, projectSettingsBlockVpcConnections, projectSettingsBlockPublicConnections, projectSettingsQuotaLogicalSizeBytes, projectSettingsQuotaWrittenDataBytes, projectSettingsEnableLogicalReplication, projectSettingsQuotaActiveTimeSeconds, projectSettingsQuotaDataTransferBytes, projectSettingsMaintenanceWindowWeekdays, projectSettingsQuotaComputeTimeSeconds, projectSettingsMaintenanceWindowEndTime, projectDefaultEndpointSettingsPgSettings, projectSettingsMaintenanceWindowStartTime, projectDefaultEndpointSettingsPgbouncerSettings, projectDefaultEpSettingsSuspendTimeoutSeconds, projectSettingsAllowedIpsProtectedBranchesOnly, projectDefaultEpSettingsAutoscalingLimitMaxCu, projectDefaultEpSettingsAutoscalingLimitMinCu }) => {
|
|
423
|
+
const queryParams = undefined;
|
|
424
|
+
const body = {};
|
|
425
|
+
if (projectName !== undefined)
|
|
426
|
+
setNested(body, 'project.name', projectName);
|
|
427
|
+
if (projectHistoryRetentionSeconds !== undefined)
|
|
428
|
+
setNested(body, 'project.history_retention_seconds', projectHistoryRetentionSeconds);
|
|
429
|
+
if (projectSettingsAllowedIpsIps !== undefined)
|
|
430
|
+
setNested(body, 'project.settings.allowed_ips.ips', projectSettingsAllowedIpsIps);
|
|
431
|
+
if (projectSettingsBlockVpcConnections !== undefined)
|
|
432
|
+
setNested(body, 'project.settings.block_vpc_connections', projectSettingsBlockVpcConnections);
|
|
433
|
+
if (projectSettingsBlockPublicConnections !== undefined)
|
|
434
|
+
setNested(body, 'project.settings.block_public_connections', projectSettingsBlockPublicConnections);
|
|
435
|
+
if (projectSettingsQuotaLogicalSizeBytes !== undefined)
|
|
436
|
+
setNested(body, 'project.settings.quota.logical_size_bytes', projectSettingsQuotaLogicalSizeBytes);
|
|
437
|
+
if (projectSettingsQuotaWrittenDataBytes !== undefined)
|
|
438
|
+
setNested(body, 'project.settings.quota.written_data_bytes', projectSettingsQuotaWrittenDataBytes);
|
|
439
|
+
if (projectSettingsEnableLogicalReplication !== undefined)
|
|
440
|
+
setNested(body, 'project.settings.enable_logical_replication', projectSettingsEnableLogicalReplication);
|
|
441
|
+
if (projectSettingsQuotaActiveTimeSeconds !== undefined)
|
|
442
|
+
setNested(body, 'project.settings.quota.active_time_seconds', projectSettingsQuotaActiveTimeSeconds);
|
|
443
|
+
if (projectSettingsQuotaDataTransferBytes !== undefined)
|
|
444
|
+
setNested(body, 'project.settings.quota.data_transfer_bytes', projectSettingsQuotaDataTransferBytes);
|
|
445
|
+
if (projectSettingsMaintenanceWindowWeekdays !== undefined)
|
|
446
|
+
setNested(body, 'project.settings.maintenance_window.weekdays', projectSettingsMaintenanceWindowWeekdays);
|
|
447
|
+
if (projectSettingsQuotaComputeTimeSeconds !== undefined)
|
|
448
|
+
setNested(body, 'project.settings.quota.compute_time_seconds', projectSettingsQuotaComputeTimeSeconds);
|
|
449
|
+
if (projectSettingsMaintenanceWindowEndTime !== undefined)
|
|
450
|
+
setNested(body, 'project.settings.maintenance_window.end_time', projectSettingsMaintenanceWindowEndTime);
|
|
451
|
+
if (projectDefaultEndpointSettingsPgSettings !== undefined)
|
|
452
|
+
setNested(body, 'project.default_endpoint_settings.pg_settings', projectDefaultEndpointSettingsPgSettings);
|
|
453
|
+
if (projectSettingsMaintenanceWindowStartTime !== undefined)
|
|
454
|
+
setNested(body, 'project.settings.maintenance_window.start_time', projectSettingsMaintenanceWindowStartTime);
|
|
455
|
+
if (projectDefaultEndpointSettingsPgbouncerSettings !== undefined)
|
|
456
|
+
setNested(body, 'project.default_endpoint_settings.pgbouncer_settings', projectDefaultEndpointSettingsPgbouncerSettings);
|
|
457
|
+
if (projectDefaultEpSettingsSuspendTimeoutSeconds !== undefined)
|
|
458
|
+
setNested(body, 'project.default_endpoint_settings.suspend_timeout_seconds', projectDefaultEpSettingsSuspendTimeoutSeconds);
|
|
459
|
+
if (projectSettingsAllowedIpsProtectedBranchesOnly !== undefined)
|
|
460
|
+
setNested(body, 'project.settings.allowed_ips.protected_branches_only', projectSettingsAllowedIpsProtectedBranchesOnly);
|
|
461
|
+
if (projectDefaultEpSettingsAutoscalingLimitMaxCu !== undefined)
|
|
462
|
+
setNested(body, 'project.default_endpoint_settings.autoscaling_limit_max_cu', projectDefaultEpSettingsAutoscalingLimitMaxCu);
|
|
463
|
+
if (projectDefaultEpSettingsAutoscalingLimitMinCu !== undefined)
|
|
464
|
+
setNested(body, 'project.default_endpoint_settings.autoscaling_limit_min_cu', projectDefaultEpSettingsAutoscalingLimitMinCu);
|
|
465
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}`, method: 'PATCH', query: queryParams, body });
|
|
466
|
+
},
|
|
467
|
+
});
|
|
468
|
+
//# sourceMappingURL=projects.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const neonDeleteProjectSnapshot: import("ai").Tool<{
|
|
2
|
+
projectId: string;
|
|
3
|
+
snapshotId: string;
|
|
4
|
+
neonApiKey?: string | undefined;
|
|
5
|
+
}, any>;
|
|
6
|
+
export declare const neonListProjectsSnapshots: import("ai").Tool<{
|
|
7
|
+
projectId: string;
|
|
8
|
+
neonApiKey?: string | undefined;
|
|
9
|
+
}, any>;
|
|
10
|
+
export declare const neonRestoreSnapshot: import("ai").Tool<{
|
|
11
|
+
projectId: string;
|
|
12
|
+
snapshotId: string;
|
|
13
|
+
name?: string | undefined;
|
|
14
|
+
neonApiKey?: string | undefined;
|
|
15
|
+
finalizeRestore?: boolean | undefined;
|
|
16
|
+
targetBranchId?: string | undefined;
|
|
17
|
+
}, any>;
|
|
18
|
+
export declare const neonUpdateProjectsSnapshots: import("ai").Tool<{
|
|
19
|
+
projectId: string;
|
|
20
|
+
name: string;
|
|
21
|
+
snapshotId: string;
|
|
22
|
+
neonApiKey?: string | undefined;
|
|
23
|
+
}, any>;
|
|
24
|
+
//# sourceMappingURL=snapshots.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { tool } from 'ai';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
import { neon, setNested } from './client.js';
|
|
5
|
+
const tokenField = z.string().optional().describe('Injected by system; do not provide');
|
|
6
|
+
export const neonDeleteProjectSnapshot = tool({
|
|
7
|
+
description: "Deletes a specific snapshot for a project in Neon. Use when you need to remove an old or unnecessary snapshot to free up storage or clean up resources. **Note**: This endpoint is currently in Beta.",
|
|
8
|
+
inputSchema: z.object({
|
|
9
|
+
neonApiKey: tokenField,
|
|
10
|
+
projectId: z.string().describe("The Neon project ID. Format: alphanumeric with hyphens (e.g., 'proud-meadow-87189985'). Can be obtained from the list projects API."),
|
|
11
|
+
snapshotId: z.string().describe("The snapshot ID. Format: 'snap-' prefix followed by alphanumeric characters (e.g., 'snap-wispy-union-ahw80v1u'). Can be obtained from the list snapshots API."),
|
|
12
|
+
}),
|
|
13
|
+
execute: async ({ neonApiKey, projectId, snapshotId }) => {
|
|
14
|
+
const queryParams = undefined;
|
|
15
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/snapshots/${encodeURIComponent(snapshotId)}`, method: 'DELETE', query: queryParams });
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
export const neonListProjectsSnapshots = tool({
|
|
19
|
+
description: "Tool to list all snapshots for a specified Neon project. Use when you need to view available snapshots for backup, restore, or data recovery purposes. **Note**: This endpoint is currently in Beta.",
|
|
20
|
+
inputSchema: z.object({
|
|
21
|
+
neonApiKey: tokenField,
|
|
22
|
+
projectId: z.string().describe("The Neon project ID (e.g., 'proud-meadow-87189985'). You can obtain the project_id by listing projects for your Neon account."),
|
|
23
|
+
}),
|
|
24
|
+
execute: async ({ neonApiKey, projectId }) => {
|
|
25
|
+
const queryParams = undefined;
|
|
26
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/snapshots`, method: 'GET', query: queryParams });
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
export const neonRestoreSnapshot = tool({
|
|
30
|
+
description: "Tool to restore a Neon snapshot to a new branch. Use when you need to recover data from a snapshot or create a branch from a previous point in time. This endpoint is currently in Beta.",
|
|
31
|
+
inputSchema: z.object({
|
|
32
|
+
neonApiKey: tokenField,
|
|
33
|
+
name: z.string().optional().describe("A name for the newly restored branch. If omitted, a default name will be generated."),
|
|
34
|
+
projectId: z.string().describe("The Neon project ID (e.g., 'proud-meadow-87189985'). You can obtain the project_id by listing projects for your Neon account."),
|
|
35
|
+
snapshotId: z.string().describe("The snapshot ID to restore (e.g., 'snap-wispy-union-ahw80v1u'). You can obtain snapshot IDs by listing snapshots for a project."),
|
|
36
|
+
finalizeRestore: z.boolean().optional().describe("Set to true to finalize the restore operation immediately. This will complete the restore and move any associated computes to the new branch. Defaults to false to allow previewing the restored snapshot data first."),
|
|
37
|
+
targetBranchId: z.string().optional().describe("The ID of the branch to restore the snapshot into. If not specified, the branch from which the snapshot was originally created will be used."),
|
|
38
|
+
}),
|
|
39
|
+
execute: async ({ neonApiKey, name, projectId, snapshotId, finalizeRestore, targetBranchId }) => {
|
|
40
|
+
const queryParams = undefined;
|
|
41
|
+
const body = {};
|
|
42
|
+
if (name !== undefined)
|
|
43
|
+
setNested(body, 'name', name);
|
|
44
|
+
if (finalizeRestore !== undefined)
|
|
45
|
+
setNested(body, 'finalize_restore', finalizeRestore);
|
|
46
|
+
if (targetBranchId !== undefined)
|
|
47
|
+
setNested(body, 'target_branch_id', targetBranchId);
|
|
48
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/snapshots/${encodeURIComponent(snapshotId)}/restore`, method: 'POST', query: queryParams, body });
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
export const neonUpdateProjectsSnapshots = tool({
|
|
52
|
+
description: "Tool to update the name of a specific snapshot in a Neon project. Use when you need to rename a snapshot to better reflect its purpose or content. This endpoint is currently in Beta.",
|
|
53
|
+
inputSchema: z.object({
|
|
54
|
+
neonApiKey: tokenField,
|
|
55
|
+
name: z.string().describe("The new name for the snapshot. Use a descriptive name to identify the snapshot's purpose or content."),
|
|
56
|
+
projectId: z.string().describe("The Neon project ID (e.g., 'proud-meadow-87189985'). Obtain via NEON_RETRIEVE_PROJECTS_LIST action."),
|
|
57
|
+
snapshotId: z.string().describe("The snapshot ID to update (e.g., 'snap-wispy-union-ahw80v1u'). Must match pattern ^[a-z0-9-]{1,60}$."),
|
|
58
|
+
}),
|
|
59
|
+
execute: async ({ neonApiKey, name, projectId, snapshotId }) => {
|
|
60
|
+
const queryParams = undefined;
|
|
61
|
+
const body = {};
|
|
62
|
+
if (name !== undefined)
|
|
63
|
+
setNested(body, 'name', name);
|
|
64
|
+
return neon(neonApiKey, { path: `/projects/${encodeURIComponent(projectId)}/snapshots/${encodeURIComponent(snapshotId)}`, method: 'PATCH', query: queryParams, body });
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=snapshots.js.map
|
|
@@ -307,9 +307,9 @@ export declare const redditTools: ({
|
|
|
307
307
|
restrictSr: boolean;
|
|
308
308
|
before?: string | undefined;
|
|
309
309
|
after?: string | undefined;
|
|
310
|
+
resultType?: ("user" | "link" | "sr")[] | undefined;
|
|
310
311
|
redditToken?: string | undefined;
|
|
311
312
|
timeFilter?: "all" | "year" | "month" | "day" | "hour" | "week" | undefined;
|
|
312
|
-
resultType?: ("user" | "link" | "sr")[] | undefined;
|
|
313
313
|
}, any>;
|
|
314
314
|
requiredAuth: "redditToken";
|
|
315
315
|
scope: "read";
|
|
@@ -5,8 +5,8 @@ export declare const redditSearchAcrossSubreddits: import("ai").Tool<{
|
|
|
5
5
|
restrictSr: boolean;
|
|
6
6
|
before?: string | undefined;
|
|
7
7
|
after?: string | undefined;
|
|
8
|
+
resultType?: ("user" | "link" | "sr")[] | undefined;
|
|
8
9
|
redditToken?: string | undefined;
|
|
9
10
|
timeFilter?: "all" | "year" | "month" | "day" | "hour" | "week" | undefined;
|
|
10
|
-
resultType?: ("user" | "link" | "sr")[] | undefined;
|
|
11
11
|
}, any>;
|
|
12
12
|
//# sourceMappingURL=search-across-subreddits.d.ts.map
|