@neon/tools 2.14.4 → 2.16.0

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.
Files changed (96) hide show
  1. package/README.md +195 -5
  2. package/dist/descriptions.gen.js +2 -2
  3. package/dist/effect.d.ts +22 -0
  4. package/dist/effect.d.ts.map +1 -0
  5. package/dist/effect.js +3 -0
  6. package/dist/generated/output.gen.d.ts +3418 -0
  7. package/dist/generated/output.gen.d.ts.map +1 -0
  8. package/dist/generated/output.gen.js +1498 -0
  9. package/dist/generated/zod.gen.d.ts +3 -3
  10. package/dist/index.d.ts +17 -5
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +30 -9
  13. package/dist/lib/custom/auth-config.d.ts +63 -2
  14. package/dist/lib/custom/auth-config.d.ts.map +1 -1
  15. package/dist/lib/custom/auth-config.js +34 -7
  16. package/dist/lib/custom/docs.d.ts +32 -2
  17. package/dist/lib/custom/docs.d.ts.map +1 -1
  18. package/dist/lib/custom/docs.js +18 -1
  19. package/dist/lib/custom/feedback.d.ts +7 -2
  20. package/dist/lib/custom/feedback.d.ts.map +1 -1
  21. package/dist/lib/custom/feedback.js +3 -0
  22. package/dist/lib/custom/fetch.d.ts +15 -1
  23. package/dist/lib/custom/fetch.d.ts.map +1 -1
  24. package/dist/lib/custom/fetch.js +10 -1
  25. package/dist/lib/custom/organizations.d.ts +23 -1
  26. package/dist/lib/custom/organizations.d.ts.map +1 -1
  27. package/dist/lib/custom/organizations.js +3 -0
  28. package/dist/lib/custom/resources.d.ts +15 -1
  29. package/dist/lib/custom/resources.d.ts.map +1 -1
  30. package/dist/lib/custom/resources.js +8 -1
  31. package/dist/lib/custom/sql/connection.d.ts +6 -7
  32. package/dist/lib/custom/sql/connection.d.ts.map +1 -1
  33. package/dist/lib/custom/sql/connection.js +10 -12
  34. package/dist/lib/custom/sql/describe-branch.d.ts +99 -1
  35. package/dist/lib/custom/sql/describe-branch.d.ts.map +1 -1
  36. package/dist/lib/custom/sql/describe-branch.js +11 -2
  37. package/dist/lib/custom/sql/inspect/inspect.d.ts +27 -1
  38. package/dist/lib/custom/sql/inspect/inspect.d.ts.map +1 -1
  39. package/dist/lib/custom/sql/inspect/inspect.js +17 -3
  40. package/dist/lib/custom/sql/migrations.d.ts +46 -2
  41. package/dist/lib/custom/sql/migrations.d.ts.map +1 -1
  42. package/dist/lib/custom/sql/migrations.js +29 -7
  43. package/dist/lib/custom/sql/query-tuning.d.ts +90 -2
  44. package/dist/lib/custom/sql/query-tuning.d.ts.map +1 -1
  45. package/dist/lib/custom/sql/query-tuning.js +31 -8
  46. package/dist/lib/custom/sql/run.d.ts +30 -3
  47. package/dist/lib/custom/sql/run.d.ts.map +1 -1
  48. package/dist/lib/custom/sql/run.js +15 -6
  49. package/dist/lib/custom/sql/schema.d.ts +76 -2
  50. package/dist/lib/custom/sql/schema.d.ts.map +1 -1
  51. package/dist/lib/custom/sql/schema.js +34 -5
  52. package/dist/lib/custom/sql/slow-queries.d.ts +15 -1
  53. package/dist/lib/custom/sql/slow-queries.d.ts.map +1 -1
  54. package/dist/lib/custom/sql/slow-queries.js +11 -3
  55. package/dist/lib/customize.d.ts +1 -1
  56. package/dist/lib/customize.d.ts.map +1 -1
  57. package/dist/lib/customize.js +8 -4
  58. package/dist/lib/effect/errors.d.ts +51 -0
  59. package/dist/lib/effect/errors.d.ts.map +1 -0
  60. package/dist/lib/effect/errors.js +37 -0
  61. package/dist/lib/effect/tools.d.ts +56 -0
  62. package/dist/lib/effect/tools.d.ts.map +1 -0
  63. package/dist/lib/effect/tools.js +67 -0
  64. package/dist/lib/ergonomic/bind.d.ts +25 -7
  65. package/dist/lib/ergonomic/bind.d.ts.map +1 -1
  66. package/dist/lib/ergonomic/bind.js +13 -3
  67. package/dist/lib/ergonomic/catalog.d.ts +5335 -180
  68. package/dist/lib/ergonomic/catalog.d.ts.map +1 -1
  69. package/dist/lib/ergonomic/catalog.js +286 -23
  70. package/dist/lib/ergonomic/composed.d.ts +866 -12
  71. package/dist/lib/ergonomic/composed.d.ts.map +1 -1
  72. package/dist/lib/ergonomic/composed.js +63 -0
  73. package/dist/lib/mcp-json-schema.d.ts +20 -0
  74. package/dist/lib/mcp-json-schema.d.ts.map +1 -1
  75. package/dist/lib/mcp-json-schema.js +89 -1
  76. package/dist/lib/mcp-register.d.ts +1 -1
  77. package/dist/lib/mcp-register.d.ts.map +1 -1
  78. package/dist/lib/mcp-register.js +2 -1
  79. package/dist/lib/operation.d.ts +56 -5
  80. package/dist/lib/operation.d.ts.map +1 -1
  81. package/dist/lib/operation.js +6 -1
  82. package/dist/lib/policy.d.ts +24 -0
  83. package/dist/lib/policy.d.ts.map +1 -0
  84. package/dist/lib/policy.js +49 -0
  85. package/dist/lib/redact.d.ts +8 -0
  86. package/dist/lib/redact.d.ts.map +1 -0
  87. package/dist/lib/redact.js +40 -0
  88. package/dist/mastra.d.ts +2 -1
  89. package/dist/mastra.d.ts.map +1 -1
  90. package/dist/mcp-v1.d.ts.map +1 -1
  91. package/dist/mcp-v1.js +3 -1
  92. package/dist/mcp.d.ts +3 -3
  93. package/dist/mcp.d.ts.map +1 -1
  94. package/dist/mcp.js +3 -3
  95. package/dist/operations.gen.d.ts +194 -194
  96. package/package.json +21 -2
@@ -1,8 +1,10 @@
1
1
  import { decodeBase64 } from "../binary.js";
2
2
  import { toToolResult } from "../result.js";
3
+ import { toolMetadata } from "../operation.js";
3
4
  import { bindTool, collectObjectList, collectPages, fromGenerated, publishedId } from "./bind.js";
4
5
  import { describeTableTool, listTablesTool } from "../custom/sql/schema.js";
5
6
  import { inspectDatabaseTool } from "../custom/sql/inspect/inspect.js";
7
+ import { ApiKeyCreateResponse, ApiKeyRevokeResponse, ApiKeysListResponseItem, BackupSchedule, Branch, BranchAiGateway, BranchStorage, Bucket, BucketObjectsDeletePrefixResponse, BucketsListResponse, ConsumptionHistoryPerBranchV2, ConsumptionHistoryPerProject, ConsumptionHistoryPerProjectV2, CreateCredentialResponse, CurrentUserInfoResponse, CustomDomain, DataAPICreateResponse, DataAPIReponse, Database, DatabasesResponse, Endpoint, EndpointsResponse, ListCredentialsResponse, ListNeonAuthOAuthClientsResponse, ListNeonAuthOauthProvidersResponse, Member, MemberWithUser, NeonAuthAllowLocalhostResponse, NeonAuthConfigResponse, NeonAuthCreateIntegrationResponse, NeonAuthCreateNewUserResponse, NeonAuthEmailAndPasswordConfig, NeonAuthEmailServerConfigResponse, NeonAuthIntegration, NeonAuthLogsExportConfig, NeonAuthMagicLinkConfig, NeonAuthOAuthClient, NeonAuthOAuthClientCreated, NeonAuthOAuthClientSecret, NeonAuthOAuthProviderConfig, NeonAuthOauthProvider, NeonAuthOrganizationConfig, NeonAuthPhoneNumberConfig, NeonAuthPluginConfigs, NeonAuthRedirectURIWhitelistDomain, NeonAuthWebhookConfig, NeonFunction, NeonFunctionDeployment, Operation, OrgApiKeyCreateResponse, OrgApiKeyRevokeResponse, OrgApiKeysListResponseItem, Organization, OrganizationInvitationsResponse, PresignResponse, Project, ProjectBranchLogFieldValuesResponse, ProjectBranchLogFieldsResponse, ProjectBranchLogRecord, ProjectListItem, ProjectMember, ProjectMemberRoleResponse, ProjectPermission, ProjectPermissions, ProjectsCountResponse, Realtime, RealtimeSecret, RegionResponse, Role, RolesResponse, RotateCredentialResponse, SendNeonAuthTestEmailResponse, Snapshot, SpendingLimitResponse, Trigger, TriggersListResponse, UpdateNeonAuthUserRoleResponse } from "../../generated/output.gen.js";
6
8
  import { getAuthConfigTool } from "../custom/auth-config.js";
7
9
  import { getDocTool, searchDocsTool } from "../custom/docs.js";
8
10
  import { sendFeedbackTool } from "../custom/feedback.js";
@@ -15,8 +17,8 @@ import { completeMigrationTool, prepareMigrationTool } from "../custom/sql/migra
15
17
  import { completeQueryTuningTool, prepareQueryTuningTool } from "../custom/sql/query-tuning.js";
16
18
  import { listSlowQueriesTool } from "../custom/sql/slow-queries.js";
17
19
  import { compareSchemaTool, connectionStringTool, createBranchAndConnectTool, createBranchTool, createProjectAndConnectTool, createProjectTool, createRoleTool, getDefaultTool, lokiQueryRangeTool, resetFromParentTool, restoreSnapshotTool, setScheduleTool } from "./composed.js";
18
- import { NEON_STATUS_API_URL, listNeonIncidents } from "@neon/sdk";
19
20
  import * as z from "zod";
21
+ import { NEON_STATUS_API_URL, listNeonIncidents } from "@neon/sdk";
20
22
  // src/lib/ergonomic/catalog.ts
21
23
  const logReadAnnotations = {
22
24
  readOnlyHint: true,
@@ -24,25 +26,47 @@ const logReadAnnotations = {
24
26
  idempotentHint: true,
25
27
  openWorldHint: false
26
28
  };
27
- const withoutSmtpPassword = (config) => config.type === "standard" ? {
28
- ...config,
29
- password: ""
30
- } : config;
31
- const withoutPluginSecrets = (plugins) => ({
32
- ...plugins,
33
- ...plugins.email_provider && { email_provider: withoutSmtpPassword(plugins.email_provider) },
34
- ...plugins.oauth_providers && { oauth_providers: plugins.oauth_providers.map((provider) => provider.client_secret === void 0 ? provider : {
35
- ...provider,
36
- client_secret: ""
37
- }) }
38
- });
39
29
  const listIncidentsInputSchema = z.strictObject({});
30
+ const listIncidentsOutputSchema = z.looseObject({
31
+ status: z.string().describe("Overall status: operational, degraded, or outage."),
32
+ updated_at: z.string(),
33
+ status_page_url: z.string(),
34
+ incidents: z.array(z.looseObject({
35
+ id: z.string(),
36
+ name: z.string(),
37
+ state: z.string(),
38
+ status: z.string(),
39
+ started_at: z.string(),
40
+ updated_at: z.string(),
41
+ latest_update: z.string(),
42
+ components: z.array(z.string()),
43
+ regions: z.array(z.string()),
44
+ url: z.string()
45
+ })).describe("Open incidents."),
46
+ maintenance: z.array(z.looseObject({
47
+ id: z.string(),
48
+ name: z.string(),
49
+ state: z.string(),
50
+ planned_start: z.string(),
51
+ planned_end: z.string(),
52
+ latest_update: z.string(),
53
+ components: z.array(z.string()),
54
+ regions: z.array(z.string()),
55
+ url: z.string()
56
+ })).describe("Active maintenance first, then upcoming."),
57
+ affected_components: z.array(z.looseObject({
58
+ name: z.string(),
59
+ status: z.string(),
60
+ regions: z.array(z.string())
61
+ })).describe("Components that are not operational.")
62
+ });
40
63
  const listIncidentsTool = (options) => ({
41
64
  operationId: "incidents.list",
42
65
  id: publishedId("incidents.list"),
43
66
  title: "List Neon incidents",
44
67
  description: "Lists open Neon incidents and maintenance from neonstatus.com and the affected components and regions. Needs no credentials. Call it when Neon requests fail unexpectedly or the user asks whether Neon is down.",
45
68
  inputSchema: listIncidentsInputSchema,
69
+ outputSchema: listIncidentsOutputSchema,
46
70
  annotations: {
47
71
  readOnlyHint: true,
48
72
  destructiveHint: false,
@@ -50,13 +74,14 @@ const listIncidentsTool = (options) => ({
50
74
  openWorldHint: true
51
75
  },
52
76
  requiresApproval: false,
53
- metadata: {
77
+ metadata: toolMetadata({
54
78
  method: "GET",
79
+ readOnlySafe: true,
55
80
  path: NEON_STATUS_API_URL,
56
81
  stability: "stable",
57
82
  deprecated: false,
58
83
  tags: ["Status"]
59
- },
84
+ }),
60
85
  async execute(input, context) {
61
86
  await listIncidentsInputSchema.parseAsync(input);
62
87
  return toToolResult(await listNeonIncidents({
@@ -69,6 +94,7 @@ const toolFactories = {
69
94
  "projects.list": (options) => fromGenerated(options, {
70
95
  id: "projects.list",
71
96
  generated: "listProjects",
97
+ output: z.array(ProjectListItem),
72
98
  omit: ["cursor"],
73
99
  list: true,
74
100
  run: (neon, input, signal) => collectPages(neon.projects.list({
@@ -82,11 +108,13 @@ const toolFactories = {
82
108
  "projects.count": (options) => fromGenerated(options, {
83
109
  id: "projects.count",
84
110
  generated: "countProjects",
111
+ output: ProjectsCountResponse.shape.count,
85
112
  run: (neon, input, signal) => neon.projects.count({ org_id: input.org_id }, { signal })
86
113
  }),
87
114
  "projects.get": (options) => fromGenerated(options, {
88
115
  id: "projects.get",
89
116
  generated: "getProject",
117
+ output: Project,
90
118
  run: (neon, input, signal) => neon.projects.get({ projectId: input.project_id }, { signal })
91
119
  }),
92
120
  "projects.create": createProjectTool,
@@ -94,6 +122,7 @@ const toolFactories = {
94
122
  "projects.update": (options) => fromGenerated(options, {
95
123
  id: "projects.update",
96
124
  generated: "updateProject",
125
+ output: Project,
97
126
  run: (neon, input, signal) => neon.projects.update({
98
127
  projectId: input.project_id,
99
128
  settings: input.settings,
@@ -105,16 +134,19 @@ const toolFactories = {
105
134
  "projects.delete": (options) => fromGenerated(options, {
106
135
  id: "projects.delete",
107
136
  generated: "deleteProject",
137
+ output: Project,
108
138
  run: (neon, input, signal) => neon.projects.delete({ projectId: input.project_id }, { signal })
109
139
  }),
110
140
  "projects.recover": (options) => fromGenerated(options, {
111
141
  id: "projects.recover",
112
142
  generated: "recoverProject",
143
+ output: Project,
113
144
  run: (neon, input, signal) => neon.projects.recover({ projectId: input.project_id }, { signal })
114
145
  }),
115
146
  "projects.transfer": (options) => fromGenerated(options, {
116
147
  id: "projects.transfer",
117
148
  generated: "transferProjectsFromOrgToOrg",
149
+ output: z.null(),
118
150
  run: (neon, input, signal) => neon.projects.transfer({
119
151
  fromOrgId: input.source_org_id,
120
152
  toOrgId: input.destination_org_id,
@@ -124,6 +156,7 @@ const toolFactories = {
124
156
  "projects.transferFromUser": (options) => fromGenerated(options, {
125
157
  id: "projects.transferFromUser",
126
158
  generated: "transferProjectsFromUserToOrg",
159
+ output: z.null(),
127
160
  run: (neon, input, signal) => neon.projects.transferFromUser({
128
161
  toOrgId: input.destination_org_id,
129
162
  projectIds: input.project_ids
@@ -132,11 +165,13 @@ const toolFactories = {
132
165
  "projects.permissions.list": (options) => fromGenerated(options, {
133
166
  id: "projects.permissions.list",
134
167
  generated: "listProjectPermissions",
168
+ output: ProjectPermissions.shape.project_permissions,
135
169
  run: (neon, input, signal) => neon.projects.permissions.list({ projectId: input.project_id }, { signal })
136
170
  }),
137
171
  "projects.permissions.grant": (options) => fromGenerated(options, {
138
172
  id: "projects.permissions.grant",
139
173
  generated: "grantPermissionToProject",
174
+ output: ProjectPermission,
140
175
  run: (neon, input, signal) => neon.projects.permissions.grant({
141
176
  projectId: input.project_id,
142
177
  email: input.email
@@ -145,6 +180,7 @@ const toolFactories = {
145
180
  "projects.permissions.revoke": (options) => fromGenerated(options, {
146
181
  id: "projects.permissions.revoke",
147
182
  generated: "revokePermissionFromProject",
183
+ output: ProjectPermission,
148
184
  run: (neon, input, signal) => neon.projects.permissions.revoke({
149
185
  projectId: input.project_id,
150
186
  permissionId: input.permission_id
@@ -153,6 +189,7 @@ const toolFactories = {
153
189
  "projects.members.list": (options) => fromGenerated(options, {
154
190
  id: "projects.members.list",
155
191
  generated: "listProjectMembers",
192
+ output: z.array(ProjectMember),
156
193
  omit: ["cursor"],
157
194
  list: true,
158
195
  run: (neon, input, signal) => collectPages(neon.projects.members.list({
@@ -163,6 +200,7 @@ const toolFactories = {
163
200
  "projects.members.setRole": (options) => fromGenerated(options, {
164
201
  id: "projects.members.setRole",
165
202
  generated: "setProjectMemberRole",
203
+ output: ProjectMemberRoleResponse,
166
204
  run: (neon, input, signal) => neon.projects.members.setRole({
167
205
  projectId: input.project_id,
168
206
  memberId: input.member_id,
@@ -173,6 +211,7 @@ const toolFactories = {
173
211
  "projects.members.removeRole": (options) => fromGenerated(options, {
174
212
  id: "projects.members.removeRole",
175
213
  generated: "removeProjectMemberRole",
214
+ output: ProjectMemberRoleResponse,
176
215
  run: (neon, input, signal) => neon.projects.members.removeRole({
177
216
  projectId: input.project_id,
178
217
  memberId: input.member_id,
@@ -182,6 +221,7 @@ const toolFactories = {
182
221
  "branches.list": (options) => fromGenerated(options, {
183
222
  id: "branches.list",
184
223
  generated: "listProjectBranches",
224
+ output: z.array(Branch),
185
225
  omit: ["cursor"],
186
226
  list: true,
187
227
  run: (neon, input, signal) => collectPages(neon.branches.list({
@@ -196,6 +236,7 @@ const toolFactories = {
196
236
  "branches.get": (options) => fromGenerated(options, {
197
237
  id: "branches.get",
198
238
  generated: "getProjectBranch",
239
+ output: Branch,
199
240
  run: (neon, input, signal) => neon.branches.get({
200
241
  projectId: input.project_id,
201
242
  branchId: input.branch_id
@@ -206,6 +247,7 @@ const toolFactories = {
206
247
  "branches.update": (options) => fromGenerated(options, {
207
248
  id: "branches.update",
208
249
  generated: "updateProjectBranch",
250
+ output: Branch,
209
251
  run: (neon, input, signal) => neon.branches.update({
210
252
  projectId: input.project_id,
211
253
  branchId: input.branch_id,
@@ -217,6 +259,7 @@ const toolFactories = {
217
259
  "branches.delete": (options) => fromGenerated(options, {
218
260
  id: "branches.delete",
219
261
  generated: "deleteProjectBranch",
262
+ output: z.null(),
220
263
  run: (neon, input, signal) => neon.branches.delete({
221
264
  projectId: input.project_id,
222
265
  branchId: input.branch_id
@@ -226,6 +269,7 @@ const toolFactories = {
226
269
  "branches.setDefault": (options) => fromGenerated(options, {
227
270
  id: "branches.setDefault",
228
271
  generated: "setDefaultProjectBranch",
272
+ output: Branch,
229
273
  run: (neon, input, signal) => neon.branches.setDefault({
230
274
  projectId: input.project_id,
231
275
  branchId: input.branch_id
@@ -236,6 +280,7 @@ const toolFactories = {
236
280
  "branches.finalizeRestore": (options) => fromGenerated(options, {
237
281
  id: "branches.finalizeRestore",
238
282
  generated: "finalizeRestoreBranch",
283
+ output: z.null(),
239
284
  run: (neon, input, signal) => neon.branches.finalizeRestore({
240
285
  projectId: input.project_id,
241
286
  branchId: input.branch_id,
@@ -246,11 +291,13 @@ const toolFactories = {
246
291
  "postgres.endpoints.list": (options) => fromGenerated(options, {
247
292
  id: "postgres.endpoints.list",
248
293
  generated: "listProjectEndpoints",
294
+ output: EndpointsResponse.shape.endpoints,
249
295
  run: (neon, input, signal) => neon.postgres.endpoints.list({ projectId: input.project_id }, { signal })
250
296
  }),
251
297
  "postgres.endpoints.listByBranch": (options) => fromGenerated(options, {
252
298
  id: "postgres.endpoints.listByBranch",
253
299
  generated: "listProjectBranchEndpoints",
300
+ output: EndpointsResponse.shape.endpoints,
254
301
  run: (neon, input, signal) => neon.postgres.endpoints.listByBranch({
255
302
  projectId: input.project_id,
256
303
  branchId: input.branch_id
@@ -259,6 +306,7 @@ const toolFactories = {
259
306
  "postgres.endpoints.get": (options) => fromGenerated(options, {
260
307
  id: "postgres.endpoints.get",
261
308
  generated: "getProjectEndpoint",
309
+ output: Endpoint,
262
310
  run: (neon, input, signal) => neon.postgres.endpoints.get({
263
311
  projectId: input.project_id,
264
312
  endpointId: input.endpoint_id
@@ -267,6 +315,7 @@ const toolFactories = {
267
315
  "postgres.endpoints.create": (options) => fromGenerated(options, {
268
316
  id: "postgres.endpoints.create",
269
317
  generated: "createProjectEndpoint",
318
+ output: Endpoint,
270
319
  run: (neon, input, signal) => neon.postgres.endpoints.create({
271
320
  projectId: input.project_id,
272
321
  branch_id: input.branch_id,
@@ -287,6 +336,7 @@ const toolFactories = {
287
336
  "postgres.endpoints.update": (options) => fromGenerated(options, {
288
337
  id: "postgres.endpoints.update",
289
338
  generated: "updateProjectEndpoint",
339
+ output: Endpoint,
290
340
  run: (neon, input, signal) => neon.postgres.endpoints.update({
291
341
  projectId: input.project_id,
292
342
  endpointId: input.endpoint_id,
@@ -306,6 +356,7 @@ const toolFactories = {
306
356
  "postgres.endpoints.delete": (options) => fromGenerated(options, {
307
357
  id: "postgres.endpoints.delete",
308
358
  generated: "deleteProjectEndpoint",
359
+ output: z.null(),
309
360
  run: (neon, input, signal) => neon.postgres.endpoints.delete({
310
361
  projectId: input.project_id,
311
362
  endpointId: input.endpoint_id
@@ -314,6 +365,7 @@ const toolFactories = {
314
365
  "postgres.endpoints.start": (options) => fromGenerated(options, {
315
366
  id: "postgres.endpoints.start",
316
367
  generated: "startProjectEndpoint",
368
+ output: Endpoint,
317
369
  run: (neon, input, signal) => neon.postgres.endpoints.start({
318
370
  projectId: input.project_id,
319
371
  endpointId: input.endpoint_id
@@ -322,6 +374,7 @@ const toolFactories = {
322
374
  "postgres.endpoints.suspend": (options) => fromGenerated(options, {
323
375
  id: "postgres.endpoints.suspend",
324
376
  generated: "suspendProjectEndpoint",
377
+ output: Endpoint,
325
378
  run: (neon, input, signal) => neon.postgres.endpoints.suspend({
326
379
  projectId: input.project_id,
327
380
  endpointId: input.endpoint_id
@@ -330,6 +383,7 @@ const toolFactories = {
330
383
  "postgres.endpoints.restart": (options) => fromGenerated(options, {
331
384
  id: "postgres.endpoints.restart",
332
385
  generated: "restartProjectEndpoint",
386
+ output: Endpoint,
333
387
  run: (neon, input, signal) => neon.postgres.endpoints.restart({
334
388
  projectId: input.project_id,
335
389
  endpointId: input.endpoint_id
@@ -338,6 +392,11 @@ const toolFactories = {
338
392
  "postgres.roles.list": (options) => fromGenerated(options, {
339
393
  id: "postgres.roles.list",
340
394
  generated: "listProjectBranchRoles",
395
+ output: RolesResponse.shape.roles,
396
+ secretOutputFields: [{
397
+ path: "$[*].password",
398
+ kind: "setup"
399
+ }],
341
400
  run: (neon, input, signal) => neon.postgres.roles.list({
342
401
  projectId: input.project_id,
343
402
  branchId: input.branch_id
@@ -346,6 +405,11 @@ const toolFactories = {
346
405
  "postgres.roles.get": (options) => fromGenerated(options, {
347
406
  id: "postgres.roles.get",
348
407
  generated: "getProjectBranchRole",
408
+ output: Role,
409
+ secretOutputFields: [{
410
+ path: "$.password",
411
+ kind: "setup"
412
+ }],
349
413
  run: (neon, input, signal) => neon.postgres.roles.get({
350
414
  projectId: input.project_id,
351
415
  branchId: input.branch_id,
@@ -356,6 +420,7 @@ const toolFactories = {
356
420
  "postgres.roles.delete": (options) => fromGenerated(options, {
357
421
  id: "postgres.roles.delete",
358
422
  generated: "deleteProjectBranchRole",
423
+ output: z.null(),
359
424
  run: (neon, input, signal) => neon.postgres.roles.delete({
360
425
  projectId: input.project_id,
361
426
  branchId: input.branch_id,
@@ -365,6 +430,12 @@ const toolFactories = {
365
430
  "postgres.roles.resetPassword": (options) => fromGenerated(options, {
366
431
  id: "postgres.roles.resetPassword",
367
432
  generated: "resetProjectBranchRolePassword",
433
+ output: Role,
434
+ secretOutputFields: [{
435
+ path: "$.password",
436
+ kind: "setup"
437
+ }],
438
+ returnsOnlySecrets: true,
368
439
  run: (neon, input, signal) => neon.postgres.roles.resetPassword({
369
440
  projectId: input.project_id,
370
441
  branchId: input.branch_id,
@@ -374,6 +445,7 @@ const toolFactories = {
374
445
  "postgres.databases.list": (options) => fromGenerated(options, {
375
446
  id: "postgres.databases.list",
376
447
  generated: "listProjectBranchDatabases",
448
+ output: DatabasesResponse.shape.databases,
377
449
  run: (neon, input, signal) => neon.postgres.databases.list({
378
450
  projectId: input.project_id,
379
451
  branchId: input.branch_id
@@ -382,6 +454,7 @@ const toolFactories = {
382
454
  "postgres.databases.get": (options) => fromGenerated(options, {
383
455
  id: "postgres.databases.get",
384
456
  generated: "getProjectBranchDatabase",
457
+ output: Database,
385
458
  run: (neon, input, signal) => neon.postgres.databases.get({
386
459
  projectId: input.project_id,
387
460
  branchId: input.branch_id,
@@ -391,6 +464,7 @@ const toolFactories = {
391
464
  "postgres.databases.create": (options) => fromGenerated(options, {
392
465
  id: "postgres.databases.create",
393
466
  generated: "createProjectBranchDatabase",
467
+ output: Database,
394
468
  run: (neon, input, signal) => neon.postgres.databases.create({
395
469
  projectId: input.project_id,
396
470
  branchId: input.branch_id,
@@ -401,6 +475,7 @@ const toolFactories = {
401
475
  "postgres.databases.update": (options) => fromGenerated(options, {
402
476
  id: "postgres.databases.update",
403
477
  generated: "updateProjectBranchDatabase",
478
+ output: Database,
404
479
  run: (neon, input, signal) => neon.postgres.databases.update({
405
480
  projectId: input.project_id,
406
481
  branchId: input.branch_id,
@@ -412,6 +487,7 @@ const toolFactories = {
412
487
  "postgres.databases.delete": (options) => fromGenerated(options, {
413
488
  id: "postgres.databases.delete",
414
489
  generated: "deleteProjectBranchDatabase",
490
+ output: z.null(),
415
491
  run: (neon, input, signal) => neon.postgres.databases.delete({
416
492
  projectId: input.project_id,
417
493
  branchId: input.branch_id,
@@ -421,6 +497,7 @@ const toolFactories = {
421
497
  "postgres.dataApi.get": (options) => fromGenerated(options, {
422
498
  id: "postgres.dataApi.get",
423
499
  generated: "getProjectBranchDataAPI",
500
+ output: DataAPIReponse,
424
501
  run: (neon, input, signal) => neon.postgres.dataApi.get({
425
502
  projectId: input.project_id,
426
503
  branchId: input.branch_id,
@@ -430,6 +507,7 @@ const toolFactories = {
430
507
  "postgres.dataApi.create": (options) => fromGenerated(options, {
431
508
  id: "postgres.dataApi.create",
432
509
  generated: "createProjectBranchDataAPI",
510
+ output: DataAPICreateResponse,
433
511
  run: (neon, input, signal) => neon.postgres.dataApi.create({
434
512
  projectId: input.project_id,
435
513
  branchId: input.branch_id,
@@ -446,6 +524,7 @@ const toolFactories = {
446
524
  "postgres.dataApi.update": (options) => fromGenerated(options, {
447
525
  id: "postgres.dataApi.update",
448
526
  generated: "updateProjectBranchDataAPI",
527
+ output: z.null(),
449
528
  run: (neon, input, signal) => neon.postgres.dataApi.update({
450
529
  projectId: input.project_id,
451
530
  branchId: input.branch_id,
@@ -467,6 +546,7 @@ const toolFactories = {
467
546
  "postgres.dataApi.delete": (options) => fromGenerated(options, {
468
547
  id: "postgres.dataApi.delete",
469
548
  generated: "deleteProjectBranchDataAPI",
549
+ output: z.null(),
470
550
  run: (neon, input, signal) => neon.postgres.dataApi.delete({
471
551
  projectId: input.project_id,
472
552
  branchId: input.branch_id,
@@ -476,6 +556,7 @@ const toolFactories = {
476
556
  "storage.get": (options) => fromGenerated(options, {
477
557
  id: "storage.get",
478
558
  generated: "getProjectBranchStorage",
559
+ output: BranchStorage,
479
560
  run: (neon, input, signal) => neon.storage.get({
480
561
  projectId: input.project_id,
481
562
  branchId: input.branch_id
@@ -484,6 +565,7 @@ const toolFactories = {
484
565
  "storage.buckets.list": (options) => fromGenerated(options, {
485
566
  id: "storage.buckets.list",
486
567
  generated: "listProjectBranchBuckets",
568
+ output: BucketsListResponse.shape.buckets,
487
569
  run: (neon, input, signal) => neon.storage.buckets.list({
488
570
  projectId: input.project_id,
489
571
  branchId: input.branch_id
@@ -492,6 +574,7 @@ const toolFactories = {
492
574
  "storage.buckets.create": (options) => fromGenerated(options, {
493
575
  id: "storage.buckets.create",
494
576
  generated: "createProjectBranchBucket",
577
+ output: Bucket,
495
578
  run: (neon, input, signal) => neon.storage.buckets.create({
496
579
  projectId: input.project_id,
497
580
  branchId: input.branch_id,
@@ -502,6 +585,7 @@ const toolFactories = {
502
585
  "storage.buckets.delete": (options) => fromGenerated(options, {
503
586
  id: "storage.buckets.delete",
504
587
  generated: "deleteProjectBranchBucket",
588
+ output: z.null(),
505
589
  run: (neon, input, signal) => neon.storage.buckets.delete({
506
590
  projectId: input.project_id,
507
591
  branchId: input.branch_id,
@@ -511,6 +595,16 @@ const toolFactories = {
511
595
  "storage.objects.list": (options) => fromGenerated(options, {
512
596
  id: "storage.objects.list",
513
597
  generated: "listProjectBranchBucketObjects",
598
+ output: z.looseObject({
599
+ folders: z.array(z.string()),
600
+ objects: z.array(z.looseObject({
601
+ key: z.string(),
602
+ size: z.number(),
603
+ last_modified: z.string(),
604
+ etag: z.string()
605
+ })),
606
+ prefix: z.string()
607
+ }),
514
608
  omit: ["cursor"],
515
609
  list: true,
516
610
  run: (neon, input, signal) => collectObjectList(neon, {
@@ -525,6 +619,7 @@ const toolFactories = {
525
619
  "storage.objects.delete": (options) => fromGenerated(options, {
526
620
  id: "storage.objects.delete",
527
621
  generated: "deleteProjectBranchBucketObject",
622
+ output: z.null(),
528
623
  run: (neon, input, signal) => neon.storage.objects.delete({
529
624
  projectId: input.project_id,
530
625
  branchId: input.branch_id,
@@ -535,6 +630,7 @@ const toolFactories = {
535
630
  "storage.objects.deleteByPrefix": (options) => fromGenerated(options, {
536
631
  id: "storage.objects.deleteByPrefix",
537
632
  generated: "deleteProjectBranchBucketObjectsByPrefix",
633
+ output: BucketObjectsDeletePrefixResponse,
538
634
  run: (neon, input, signal) => neon.storage.objects.deleteByPrefix({
539
635
  projectId: input.project_id,
540
636
  branchId: input.branch_id,
@@ -545,6 +641,12 @@ const toolFactories = {
545
641
  "storage.objects.presign": (options) => fromGenerated(options, {
546
642
  id: "storage.objects.presign",
547
643
  generated: "presignProjectBranchBucketObject",
644
+ output: PresignResponse,
645
+ secretOutputFields: [{
646
+ path: "$.url",
647
+ kind: "setup"
648
+ }],
649
+ returnsOnlySecrets: true,
548
650
  run: (neon, input, signal) => neon.storage.objects.presign({
549
651
  projectId: input.project_id,
550
652
  branchId: input.branch_id,
@@ -558,6 +660,7 @@ const toolFactories = {
558
660
  "functions.list": (options) => fromGenerated(options, {
559
661
  id: "functions.list",
560
662
  generated: "listProjectBranchFunctions",
663
+ output: z.array(NeonFunction),
561
664
  omit: ["cursor"],
562
665
  list: true,
563
666
  run: (neon, input, signal) => collectPages(neon.functions.list({
@@ -569,6 +672,7 @@ const toolFactories = {
569
672
  "functions.get": (options) => fromGenerated(options, {
570
673
  id: "functions.get",
571
674
  generated: "getProjectBranchFunction",
675
+ output: NeonFunction,
572
676
  run: (neon, input, signal) => neon.functions.get({
573
677
  projectId: input.project_id,
574
678
  branchId: input.branch_id,
@@ -578,6 +682,7 @@ const toolFactories = {
578
682
  "functions.update": (options) => fromGenerated(options, {
579
683
  id: "functions.update",
580
684
  generated: "updateProjectBranchFunction",
685
+ output: NeonFunction,
581
686
  run: (neon, input, signal) => neon.functions.update({
582
687
  projectId: input.project_id,
583
688
  branchId: input.branch_id,
@@ -588,6 +693,7 @@ const toolFactories = {
588
693
  "functions.delete": (options) => fromGenerated(options, {
589
694
  id: "functions.delete",
590
695
  generated: "deleteProjectBranchFunction",
696
+ output: z.null(),
591
697
  run: (neon, input, signal) => neon.functions.delete({
592
698
  projectId: input.project_id,
593
699
  branchId: input.branch_id,
@@ -597,6 +703,7 @@ const toolFactories = {
597
703
  "functions.deploy": (options) => fromGenerated(options, {
598
704
  id: "functions.deploy",
599
705
  generated: "createProjectBranchFunctionDeployment",
706
+ output: NeonFunctionDeployment,
600
707
  run: (neon, input, signal) => neon.functions.deploy({
601
708
  projectId: input.project_id,
602
709
  branchId: input.branch_id,
@@ -609,6 +716,7 @@ const toolFactories = {
609
716
  "functions.customDomains.list": (options) => fromGenerated(options, {
610
717
  id: "functions.customDomains.list",
611
718
  generated: "listProjectBranchCustomDomains",
719
+ output: z.array(CustomDomain),
612
720
  omit: ["cursor"],
613
721
  list: true,
614
722
  run: (neon, input, signal) => collectPages(neon.functions.customDomains.list({
@@ -620,6 +728,7 @@ const toolFactories = {
620
728
  "functions.customDomains.register": (options) => fromGenerated(options, {
621
729
  id: "functions.customDomains.register",
622
730
  generated: "registerProjectBranchCustomDomain",
731
+ output: CustomDomain,
623
732
  run: (neon, input, signal) => neon.functions.customDomains.register({
624
733
  projectId: input.project_id,
625
734
  branchId: input.branch_id,
@@ -631,6 +740,7 @@ const toolFactories = {
631
740
  "functions.customDomains.delete": (options) => fromGenerated(options, {
632
741
  id: "functions.customDomains.delete",
633
742
  generated: "deleteProjectBranchCustomDomain",
743
+ output: z.null(),
634
744
  run: (neon, input, signal) => neon.functions.customDomains.delete({
635
745
  projectId: input.project_id,
636
746
  branchId: input.branch_id,
@@ -640,6 +750,7 @@ const toolFactories = {
640
750
  "triggers.list": (options) => fromGenerated(options, {
641
751
  id: "triggers.list",
642
752
  generated: "listProjectBranchTriggers",
753
+ output: TriggersListResponse.shape.triggers,
643
754
  run: (neon, input, signal) => neon.triggers.list({
644
755
  projectId: input.project_id,
645
756
  branchId: input.branch_id
@@ -648,6 +759,7 @@ const toolFactories = {
648
759
  "triggers.get": (options) => fromGenerated(options, {
649
760
  id: "triggers.get",
650
761
  generated: "getProjectBranchTrigger",
762
+ output: Trigger,
651
763
  run: (neon, input, signal) => neon.triggers.get({
652
764
  projectId: input.project_id,
653
765
  branchId: input.branch_id,
@@ -657,6 +769,7 @@ const toolFactories = {
657
769
  "triggers.create": (options) => fromGenerated(options, {
658
770
  id: "triggers.create",
659
771
  generated: "createProjectBranchTrigger",
772
+ output: Trigger,
660
773
  run: (neon, input, signal) => neon.triggers.create({
661
774
  projectId: input.project_id,
662
775
  branchId: input.branch_id,
@@ -666,6 +779,7 @@ const toolFactories = {
666
779
  "triggers.update": (options) => fromGenerated(options, {
667
780
  id: "triggers.update",
668
781
  generated: "updateProjectBranchTrigger",
782
+ output: Trigger,
669
783
  run: (neon, input, signal) => neon.triggers.update({
670
784
  projectId: input.project_id,
671
785
  branchId: input.branch_id,
@@ -676,6 +790,7 @@ const toolFactories = {
676
790
  "triggers.delete": (options) => fromGenerated(options, {
677
791
  id: "triggers.delete",
678
792
  generated: "deleteProjectBranchTrigger",
793
+ output: z.null(),
679
794
  run: (neon, input, signal) => neon.triggers.delete({
680
795
  projectId: input.project_id,
681
796
  branchId: input.branch_id,
@@ -685,6 +800,7 @@ const toolFactories = {
685
800
  "credentials.list": (options) => fromGenerated(options, {
686
801
  id: "credentials.list",
687
802
  generated: "listCredentials",
803
+ output: ListCredentialsResponse.shape.credentials,
688
804
  run: (neon, input, signal) => neon.credentials.list({
689
805
  projectId: input.project_id,
690
806
  branchId: input.branch_id
@@ -693,6 +809,14 @@ const toolFactories = {
693
809
  "credentials.create": (options) => fromGenerated(options, {
694
810
  id: "credentials.create",
695
811
  generated: "createCredential",
812
+ output: CreateCredentialResponse,
813
+ secretOutputFields: [{
814
+ path: "$.api_token",
815
+ kind: "setup"
816
+ }, {
817
+ path: "$.s3_secret_access_key",
818
+ kind: "setup"
819
+ }],
696
820
  run: (neon, input, signal) => neon.credentials.create({
697
821
  projectId: input.project_id,
698
822
  branchId: input.branch_id,
@@ -704,6 +828,7 @@ const toolFactories = {
704
828
  "credentials.revoke": (options) => fromGenerated(options, {
705
829
  id: "credentials.revoke",
706
830
  generated: "revokeCredential",
831
+ output: z.null(),
707
832
  run: (neon, input, signal) => neon.credentials.revoke({
708
833
  projectId: input.project_id,
709
834
  branchId: input.branch_id,
@@ -713,6 +838,15 @@ const toolFactories = {
713
838
  "credentials.rotate": (options) => fromGenerated(options, {
714
839
  id: "credentials.rotate",
715
840
  generated: "rotateCredential",
841
+ output: RotateCredentialResponse,
842
+ secretOutputFields: [{
843
+ path: "$.api_token",
844
+ kind: "setup"
845
+ }, {
846
+ path: "$.s3_secret_access_key",
847
+ kind: "setup"
848
+ }],
849
+ returnsOnlySecrets: true,
716
850
  annotations: {
717
851
  readOnlyHint: false,
718
852
  destructiveHint: true,
@@ -728,6 +862,7 @@ const toolFactories = {
728
862
  "aiGateway.get": (options) => fromGenerated(options, {
729
863
  id: "aiGateway.get",
730
864
  generated: "getProjectBranchAiGateway",
865
+ output: BranchAiGateway,
731
866
  run: (neon, input, signal) => neon.aiGateway.get({
732
867
  projectId: input.project_id,
733
868
  branchId: input.branch_id
@@ -736,6 +871,7 @@ const toolFactories = {
736
871
  "realtime.get": (options) => fromGenerated(options, {
737
872
  id: "realtime.get",
738
873
  generated: "getProjectBranchRealtime",
874
+ output: Realtime,
739
875
  run: (neon, input, signal) => neon.realtime.get({
740
876
  projectId: input.project_id,
741
877
  branchId: input.branch_id
@@ -744,6 +880,7 @@ const toolFactories = {
744
880
  "realtime.enable": (options) => fromGenerated(options, {
745
881
  id: "realtime.enable",
746
882
  generated: "enableProjectBranchRealtime",
883
+ output: z.null(),
747
884
  run: (neon, input, signal) => neon.realtime.enable({
748
885
  projectId: input.project_id,
749
886
  branchId: input.branch_id,
@@ -753,6 +890,7 @@ const toolFactories = {
753
890
  "realtime.disable": (options) => fromGenerated(options, {
754
891
  id: "realtime.disable",
755
892
  generated: "disableProjectBranchRealtime",
893
+ output: z.null(),
756
894
  run: (neon, input, signal) => neon.realtime.disable({
757
895
  projectId: input.project_id,
758
896
  branchId: input.branch_id
@@ -761,6 +899,12 @@ const toolFactories = {
761
899
  "realtime.secret": (options) => fromGenerated(options, {
762
900
  id: "realtime.secret",
763
901
  generated: "getProjectBranchRealtimeSecret",
902
+ output: RealtimeSecret,
903
+ secretOutputFields: [{
904
+ path: "$.secret",
905
+ kind: "setup"
906
+ }],
907
+ returnsOnlySecrets: true,
764
908
  requiresApproval: true,
765
909
  run: (neon, input, signal) => neon.realtime.secret({
766
910
  projectId: input.project_id,
@@ -770,6 +914,7 @@ const toolFactories = {
770
914
  "realtime.rotateSecret": (options) => fromGenerated(options, {
771
915
  id: "realtime.rotateSecret",
772
916
  generated: "rotateProjectBranchRealtimeSecret",
917
+ output: z.null(),
773
918
  annotations: {
774
919
  readOnlyHint: false,
775
920
  destructiveHint: true,
@@ -784,10 +929,12 @@ const toolFactories = {
784
929
  "logs.query": (options) => fromGenerated(options, {
785
930
  id: "logs.query",
786
931
  generated: "queryProjectBranchLogs",
932
+ output: z.array(ProjectBranchLogRecord),
787
933
  omit: ["cursor"],
788
934
  list: true,
789
935
  annotations: logReadAnnotations,
790
936
  requiresApproval: false,
937
+ readOnlySafe: true,
791
938
  run: (neon, input, signal) => collectPages(neon.logs.query({
792
939
  projectId: input.project_id,
793
940
  branchId: input.branch_id,
@@ -809,6 +956,7 @@ const toolFactories = {
809
956
  "logs.fields": (options) => fromGenerated(options, {
810
957
  id: "logs.fields",
811
958
  generated: "listProjectBranchLogFields",
959
+ output: ProjectBranchLogFieldsResponse.shape.fields,
812
960
  run: (neon, input, signal) => neon.logs.fields({
813
961
  projectId: input.project_id,
814
962
  branchId: input.branch_id
@@ -817,6 +965,7 @@ const toolFactories = {
817
965
  "logs.fieldValues": (options) => fromGenerated(options, {
818
966
  id: "logs.fieldValues",
819
967
  generated: "listProjectBranchLogFieldValues",
968
+ output: ProjectBranchLogFieldValuesResponse,
820
969
  run: (neon, input, signal) => neon.logs.fieldValues({
821
970
  projectId: input.project_id,
822
971
  branchId: input.branch_id,
@@ -832,11 +981,13 @@ const toolFactories = {
832
981
  "snapshots.list": (options) => fromGenerated(options, {
833
982
  id: "snapshots.list",
834
983
  generated: "listSnapshots",
984
+ output: z.array(Snapshot),
835
985
  run: (neon, input, signal) => neon.snapshots.list({ projectId: input.project_id }, { signal })
836
986
  }),
837
987
  "snapshots.create": (options) => fromGenerated(options, {
838
988
  id: "snapshots.create",
839
989
  generated: "createSnapshot",
990
+ output: Snapshot,
840
991
  run: (neon, input, signal) => neon.snapshots.create({
841
992
  projectId: input.project_id,
842
993
  branchId: input.branch_id,
@@ -849,6 +1000,7 @@ const toolFactories = {
849
1000
  "snapshots.update": (options) => fromGenerated(options, {
850
1001
  id: "snapshots.update",
851
1002
  generated: "updateSnapshot",
1003
+ output: Snapshot,
852
1004
  run: (neon, input, signal) => neon.snapshots.update({
853
1005
  projectId: input.project_id,
854
1006
  snapshotId: input.snapshot_id,
@@ -859,6 +1011,7 @@ const toolFactories = {
859
1011
  "snapshots.delete": (options) => fromGenerated(options, {
860
1012
  id: "snapshots.delete",
861
1013
  generated: "deleteSnapshot",
1014
+ output: z.null(),
862
1015
  run: (neon, input, signal) => neon.snapshots.delete({
863
1016
  projectId: input.project_id,
864
1017
  snapshotId: input.snapshot_id
@@ -868,6 +1021,7 @@ const toolFactories = {
868
1021
  "snapshots.getSchedule": (options) => fromGenerated(options, {
869
1022
  id: "snapshots.getSchedule",
870
1023
  generated: "getSnapshotSchedule",
1024
+ output: BackupSchedule,
871
1025
  run: (neon, input, signal) => neon.snapshots.getSchedule({
872
1026
  projectId: input.project_id,
873
1027
  branchId: input.branch_id
@@ -877,6 +1031,7 @@ const toolFactories = {
877
1031
  "operations.list": (options) => fromGenerated(options, {
878
1032
  id: "operations.list",
879
1033
  generated: "listProjectOperations",
1034
+ output: z.array(Operation),
880
1035
  omit: ["cursor"],
881
1036
  list: true,
882
1037
  run: (neon, input, signal) => collectPages(neon.operations.list({ projectId: input.project_id }, { signal }), input.limit)
@@ -884,6 +1039,7 @@ const toolFactories = {
884
1039
  "operations.get": (options) => fromGenerated(options, {
885
1040
  id: "operations.get",
886
1041
  generated: "getProjectOperation",
1042
+ output: Operation,
887
1043
  run: (neon, input, signal) => neon.operations.get({
888
1044
  projectId: input.project_id,
889
1045
  operationId: input.operation_id
@@ -892,6 +1048,7 @@ const toolFactories = {
892
1048
  "auth.get": (options) => fromGenerated(options, {
893
1049
  id: "auth.get",
894
1050
  generated: "getNeonAuth",
1051
+ output: NeonAuthIntegration,
895
1052
  run: (neon, input, signal) => neon.auth.get({
896
1053
  projectId: input.project_id,
897
1054
  branchId: input.branch_id
@@ -900,6 +1057,11 @@ const toolFactories = {
900
1057
  "auth.create": (options) => fromGenerated(options, {
901
1058
  id: "auth.create",
902
1059
  generated: "createNeonAuth",
1060
+ output: NeonAuthCreateIntegrationResponse,
1061
+ secretOutputFields: [{
1062
+ path: "$.secret_server_key",
1063
+ kind: "setup"
1064
+ }],
903
1065
  run: (neon, input, signal) => neon.auth.create({
904
1066
  projectId: input.project_id,
905
1067
  branchId: input.branch_id,
@@ -910,6 +1072,7 @@ const toolFactories = {
910
1072
  "auth.disable": (options) => fromGenerated(options, {
911
1073
  id: "auth.disable",
912
1074
  generated: "disableNeonAuth",
1075
+ output: z.null(),
913
1076
  run: (neon, input, signal) => neon.auth.disable({
914
1077
  projectId: input.project_id,
915
1078
  branchId: input.branch_id,
@@ -919,6 +1082,7 @@ const toolFactories = {
919
1082
  "auth.updateConfig": (options) => fromGenerated(options, {
920
1083
  id: "auth.updateConfig",
921
1084
  generated: "updateNeonAuthConfig",
1085
+ output: NeonAuthConfigResponse,
922
1086
  run: (neon, input, signal) => neon.auth.updateConfig({
923
1087
  projectId: input.project_id,
924
1088
  branchId: input.branch_id,
@@ -928,6 +1092,11 @@ const toolFactories = {
928
1092
  "auth.oauthProviders.list": (options) => fromGenerated(options, {
929
1093
  id: "auth.oauthProviders.list",
930
1094
  generated: "listBranchNeonAuthOauthProviders",
1095
+ output: ListNeonAuthOauthProvidersResponse.shape.providers,
1096
+ secretOutputFields: [{
1097
+ path: "$[*].client_secret",
1098
+ kind: "stored"
1099
+ }],
931
1100
  run: (neon, input, signal) => neon.auth.oauthProviders.list({
932
1101
  projectId: input.project_id,
933
1102
  branchId: input.branch_id
@@ -936,6 +1105,11 @@ const toolFactories = {
936
1105
  "auth.oauthProviders.add": (options) => fromGenerated(options, {
937
1106
  id: "auth.oauthProviders.add",
938
1107
  generated: "addBranchNeonAuthOauthProvider",
1108
+ output: NeonAuthOauthProvider,
1109
+ secretOutputFields: [{
1110
+ path: "$.client_secret",
1111
+ kind: "stored"
1112
+ }],
939
1113
  run: (neon, input, signal) => neon.auth.oauthProviders.add({
940
1114
  projectId: input.project_id,
941
1115
  branchId: input.branch_id,
@@ -950,6 +1124,11 @@ const toolFactories = {
950
1124
  "auth.oauthProviders.update": (options) => fromGenerated(options, {
951
1125
  id: "auth.oauthProviders.update",
952
1126
  generated: "updateBranchNeonAuthOauthProvider",
1127
+ output: NeonAuthOauthProvider,
1128
+ secretOutputFields: [{
1129
+ path: "$.client_secret",
1130
+ kind: "stored"
1131
+ }],
953
1132
  run: (neon, input, signal) => neon.auth.oauthProviders.update({
954
1133
  projectId: input.project_id,
955
1134
  branchId: input.branch_id,
@@ -964,6 +1143,7 @@ const toolFactories = {
964
1143
  "auth.oauthProviders.delete": (options) => fromGenerated(options, {
965
1144
  id: "auth.oauthProviders.delete",
966
1145
  generated: "deleteBranchNeonAuthOauthProvider",
1146
+ output: z.null(),
967
1147
  run: (neon, input, signal) => neon.auth.oauthProviders.delete({
968
1148
  projectId: input.project_id,
969
1149
  branchId: input.branch_id,
@@ -973,6 +1153,7 @@ const toolFactories = {
973
1153
  "auth.oauthServer.get": (options) => fromGenerated(options, {
974
1154
  id: "auth.oauthServer.get",
975
1155
  generated: "getNeonAuthOAuthProviderPlugin",
1156
+ output: NeonAuthOAuthProviderConfig,
976
1157
  run: (neon, input, signal) => neon.auth.oauthServer.get({
977
1158
  projectId: input.project_id,
978
1159
  branchId: input.branch_id
@@ -981,6 +1162,7 @@ const toolFactories = {
981
1162
  "auth.oauthServer.update": (options) => fromGenerated(options, {
982
1163
  id: "auth.oauthServer.update",
983
1164
  generated: "updateNeonAuthOAuthProviderPlugin",
1165
+ output: NeonAuthOAuthProviderConfig,
984
1166
  run: (neon, input, signal) => neon.auth.oauthServer.update({
985
1167
  projectId: input.project_id,
986
1168
  branchId: input.branch_id,
@@ -994,6 +1176,7 @@ const toolFactories = {
994
1176
  "auth.oauthClients.list": (options) => fromGenerated(options, {
995
1177
  id: "auth.oauthClients.list",
996
1178
  generated: "listNeonAuthOAuthClients",
1179
+ output: ListNeonAuthOAuthClientsResponse.shape.clients,
997
1180
  run: (neon, input, signal) => neon.auth.oauthClients.list({
998
1181
  projectId: input.project_id,
999
1182
  branchId: input.branch_id
@@ -1002,6 +1185,7 @@ const toolFactories = {
1002
1185
  "auth.oauthClients.get": (options) => fromGenerated(options, {
1003
1186
  id: "auth.oauthClients.get",
1004
1187
  generated: "getNeonAuthOAuthClient",
1188
+ output: NeonAuthOAuthClient,
1005
1189
  run: (neon, input, signal) => neon.auth.oauthClients.get({
1006
1190
  projectId: input.project_id,
1007
1191
  branchId: input.branch_id,
@@ -1011,6 +1195,11 @@ const toolFactories = {
1011
1195
  "auth.oauthClients.create": (options) => fromGenerated(options, {
1012
1196
  id: "auth.oauthClients.create",
1013
1197
  generated: "createNeonAuthOAuthClient",
1198
+ output: NeonAuthOAuthClientCreated,
1199
+ secretOutputFields: [{
1200
+ path: "$.client_secret",
1201
+ kind: "setup"
1202
+ }],
1014
1203
  run: (neon, input, signal) => neon.auth.oauthClients.create({
1015
1204
  projectId: input.project_id,
1016
1205
  branchId: input.branch_id,
@@ -1024,6 +1213,7 @@ const toolFactories = {
1024
1213
  "auth.oauthClients.update": (options) => fromGenerated(options, {
1025
1214
  id: "auth.oauthClients.update",
1026
1215
  generated: "updateNeonAuthOAuthClient",
1216
+ output: NeonAuthOAuthClient,
1027
1217
  run: (neon, input, signal) => neon.auth.oauthClients.update({
1028
1218
  projectId: input.project_id,
1029
1219
  branchId: input.branch_id,
@@ -1038,6 +1228,7 @@ const toolFactories = {
1038
1228
  "auth.oauthClients.delete": (options) => fromGenerated(options, {
1039
1229
  id: "auth.oauthClients.delete",
1040
1230
  generated: "deleteNeonAuthOAuthClient",
1231
+ output: z.null(),
1041
1232
  run: (neon, input, signal) => neon.auth.oauthClients.delete({
1042
1233
  projectId: input.project_id,
1043
1234
  branchId: input.branch_id,
@@ -1047,6 +1238,12 @@ const toolFactories = {
1047
1238
  "auth.oauthClients.rotateSecret": (options) => fromGenerated(options, {
1048
1239
  id: "auth.oauthClients.rotateSecret",
1049
1240
  generated: "rotateNeonAuthOAuthClientSecret",
1241
+ output: NeonAuthOAuthClientSecret,
1242
+ secretOutputFields: [{
1243
+ path: "$.client_secret",
1244
+ kind: "setup"
1245
+ }],
1246
+ returnsOnlySecrets: true,
1050
1247
  run: (neon, input, signal) => neon.auth.oauthClients.rotateSecret({
1051
1248
  projectId: input.project_id,
1052
1249
  branchId: input.branch_id,
@@ -1056,6 +1253,7 @@ const toolFactories = {
1056
1253
  "auth.trustedDomains.list": (options) => fromGenerated(options, {
1057
1254
  id: "auth.trustedDomains.list",
1058
1255
  generated: "listBranchNeonAuthTrustedDomains",
1256
+ output: z.array(NeonAuthRedirectURIWhitelistDomain),
1059
1257
  run: (neon, input, signal) => neon.auth.trustedDomains.list({
1060
1258
  projectId: input.project_id,
1061
1259
  branchId: input.branch_id
@@ -1064,6 +1262,7 @@ const toolFactories = {
1064
1262
  "auth.trustedDomains.add": (options) => fromGenerated(options, {
1065
1263
  id: "auth.trustedDomains.add",
1066
1264
  generated: "addBranchNeonAuthTrustedDomain",
1265
+ output: z.null(),
1067
1266
  run: (neon, input, signal) => neon.auth.trustedDomains.add({
1068
1267
  projectId: input.project_id,
1069
1268
  branchId: input.branch_id,
@@ -1074,6 +1273,7 @@ const toolFactories = {
1074
1273
  "auth.trustedDomains.delete": (options) => fromGenerated(options, {
1075
1274
  id: "auth.trustedDomains.delete",
1076
1275
  generated: "deleteBranchNeonAuthTrustedDomain",
1276
+ output: z.null(),
1077
1277
  run: (neon, input, signal) => neon.auth.trustedDomains.delete({
1078
1278
  projectId: input.project_id,
1079
1279
  branchId: input.branch_id,
@@ -1084,6 +1284,7 @@ const toolFactories = {
1084
1284
  "auth.users.create": (options) => fromGenerated(options, {
1085
1285
  id: "auth.users.create",
1086
1286
  generated: "createBranchNeonAuthNewUser",
1287
+ output: NeonAuthCreateNewUserResponse,
1087
1288
  run: (neon, input, signal) => neon.auth.users.create({
1088
1289
  projectId: input.project_id,
1089
1290
  branchId: input.branch_id,
@@ -1094,6 +1295,7 @@ const toolFactories = {
1094
1295
  "auth.users.delete": (options) => fromGenerated(options, {
1095
1296
  id: "auth.users.delete",
1096
1297
  generated: "deleteBranchNeonAuthUser",
1298
+ output: z.null(),
1097
1299
  run: (neon, input, signal) => neon.auth.users.delete({
1098
1300
  projectId: input.project_id,
1099
1301
  branchId: input.branch_id,
@@ -1103,6 +1305,7 @@ const toolFactories = {
1103
1305
  "auth.users.updateRole": (options) => fromGenerated(options, {
1104
1306
  id: "auth.users.updateRole",
1105
1307
  generated: "updateNeonAuthUserRole",
1308
+ output: UpdateNeonAuthUserRoleResponse,
1106
1309
  run: (neon, input, signal) => neon.auth.users.updateRole({
1107
1310
  projectId: input.project_id,
1108
1311
  branchId: input.branch_id,
@@ -1113,6 +1316,7 @@ const toolFactories = {
1113
1316
  "auth.allowLocalhost.get": (options) => fromGenerated(options, {
1114
1317
  id: "auth.allowLocalhost.get",
1115
1318
  generated: "getNeonAuthAllowLocalhost",
1319
+ output: NeonAuthAllowLocalhostResponse,
1116
1320
  run: (neon, input, signal) => neon.auth.allowLocalhost.get({
1117
1321
  projectId: input.project_id,
1118
1322
  branchId: input.branch_id
@@ -1121,6 +1325,7 @@ const toolFactories = {
1121
1325
  "auth.allowLocalhost.update": (options) => fromGenerated(options, {
1122
1326
  id: "auth.allowLocalhost.update",
1123
1327
  generated: "updateNeonAuthAllowLocalhost",
1328
+ output: NeonAuthAllowLocalhostResponse,
1124
1329
  run: (neon, input, signal) => neon.auth.allowLocalhost.update({
1125
1330
  projectId: input.project_id,
1126
1331
  branchId: input.branch_id,
@@ -1130,6 +1335,7 @@ const toolFactories = {
1130
1335
  "auth.emailAndPassword.get": (options) => fromGenerated(options, {
1131
1336
  id: "auth.emailAndPassword.get",
1132
1337
  generated: "getNeonAuthEmailAndPasswordConfig",
1338
+ output: NeonAuthEmailAndPasswordConfig,
1133
1339
  run: (neon, input, signal) => neon.auth.emailAndPassword.get({
1134
1340
  projectId: input.project_id,
1135
1341
  branchId: input.branch_id
@@ -1138,6 +1344,7 @@ const toolFactories = {
1138
1344
  "auth.emailAndPassword.update": (options) => fromGenerated(options, {
1139
1345
  id: "auth.emailAndPassword.update",
1140
1346
  generated: "updateNeonAuthEmailAndPasswordConfig",
1347
+ output: NeonAuthEmailAndPasswordConfig,
1141
1348
  run: (neon, input, signal) => neon.auth.emailAndPassword.update({
1142
1349
  projectId: input.project_id,
1143
1350
  branchId: input.branch_id,
@@ -1154,24 +1361,35 @@ const toolFactories = {
1154
1361
  "auth.emailProvider.get": (options) => fromGenerated(options, {
1155
1362
  id: "auth.emailProvider.get",
1156
1363
  generated: "getNeonAuthEmailProvider",
1157
- requiresApproval: false,
1158
- run: async (neon, input, signal) => withoutSmtpPassword(await neon.auth.emailProvider.get({
1364
+ output: NeonAuthEmailServerConfigResponse,
1365
+ secretOutputFields: [{
1366
+ path: "$.password",
1367
+ kind: "stored"
1368
+ }],
1369
+ readOnlySafe: true,
1370
+ run: (neon, input, signal) => neon.auth.emailProvider.get({
1159
1371
  projectId: input.project_id,
1160
1372
  branchId: input.branch_id
1161
- }, { signal }))
1373
+ }, { signal })
1162
1374
  }),
1163
1375
  "auth.emailProvider.update": (options) => fromGenerated(options, {
1164
1376
  id: "auth.emailProvider.update",
1165
1377
  generated: "updateNeonAuthEmailProvider",
1166
- run: async (neon, input, signal) => withoutSmtpPassword(await neon.auth.emailProvider.update({
1378
+ output: NeonAuthEmailServerConfigResponse,
1379
+ secretOutputFields: [{
1380
+ path: "$.password",
1381
+ kind: "stored"
1382
+ }],
1383
+ run: (neon, input, signal) => neon.auth.emailProvider.update({
1167
1384
  projectId: input.project_id,
1168
1385
  branchId: input.branch_id,
1169
1386
  ...input.body
1170
- }, { signal }))
1387
+ }, { signal })
1171
1388
  }),
1172
1389
  "auth.emailProvider.sendTest": (options) => fromGenerated(options, {
1173
1390
  id: "auth.emailProvider.sendTest",
1174
1391
  generated: "sendNeonAuthEmailProviderTest",
1392
+ output: SendNeonAuthTestEmailResponse,
1175
1393
  run: (neon, input, signal) => neon.auth.emailProvider.sendTest({
1176
1394
  projectId: input.project_id,
1177
1395
  branchId: input.branch_id,
@@ -1181,15 +1399,24 @@ const toolFactories = {
1181
1399
  "auth.plugins.get": (options) => fromGenerated(options, {
1182
1400
  id: "auth.plugins.get",
1183
1401
  generated: "getNeonAuthPluginConfigs",
1184
- requiresApproval: false,
1185
- run: async (neon, input, signal) => withoutPluginSecrets(await neon.auth.plugins.get({
1402
+ output: NeonAuthPluginConfigs,
1403
+ secretOutputFields: [{
1404
+ path: "$.email_provider.password",
1405
+ kind: "stored"
1406
+ }, {
1407
+ path: "$.oauth_providers[*].client_secret",
1408
+ kind: "stored"
1409
+ }],
1410
+ readOnlySafe: true,
1411
+ run: (neon, input, signal) => neon.auth.plugins.get({
1186
1412
  projectId: input.project_id,
1187
1413
  branchId: input.branch_id
1188
- }, { signal }))
1414
+ }, { signal })
1189
1415
  }),
1190
1416
  "auth.plugins.magicLink.update": (options) => fromGenerated(options, {
1191
1417
  id: "auth.plugins.magicLink.update",
1192
1418
  generated: "updateNeonAuthMagicLinkPlugin",
1419
+ output: NeonAuthMagicLinkConfig,
1193
1420
  run: (neon, input, signal) => neon.auth.plugins.magicLink.update({
1194
1421
  projectId: input.project_id,
1195
1422
  branchId: input.branch_id,
@@ -1201,6 +1428,7 @@ const toolFactories = {
1201
1428
  "auth.plugins.organization.update": (options) => fromGenerated(options, {
1202
1429
  id: "auth.plugins.organization.update",
1203
1430
  generated: "updateNeonAuthOrganizationPlugin",
1431
+ output: NeonAuthOrganizationConfig,
1204
1432
  run: (neon, input, signal) => neon.auth.plugins.organization.update({
1205
1433
  projectId: input.project_id,
1206
1434
  branchId: input.branch_id,
@@ -1214,6 +1442,7 @@ const toolFactories = {
1214
1442
  "auth.plugins.phoneNumber.get": (options) => fromGenerated(options, {
1215
1443
  id: "auth.plugins.phoneNumber.get",
1216
1444
  generated: "getNeonAuthPhoneNumberPlugin",
1445
+ output: NeonAuthPhoneNumberConfig,
1217
1446
  run: (neon, input, signal) => neon.auth.plugins.phoneNumber.get({
1218
1447
  projectId: input.project_id,
1219
1448
  branchId: input.branch_id
@@ -1222,6 +1451,7 @@ const toolFactories = {
1222
1451
  "auth.plugins.phoneNumber.update": (options) => fromGenerated(options, {
1223
1452
  id: "auth.plugins.phoneNumber.update",
1224
1453
  generated: "updateNeonAuthPhoneNumberPlugin",
1454
+ output: NeonAuthPhoneNumberConfig,
1225
1455
  run: (neon, input, signal) => neon.auth.plugins.phoneNumber.update({
1226
1456
  projectId: input.project_id,
1227
1457
  branchId: input.branch_id,
@@ -1232,6 +1462,7 @@ const toolFactories = {
1232
1462
  "auth.webhooks.get": (options) => fromGenerated(options, {
1233
1463
  id: "auth.webhooks.get",
1234
1464
  generated: "getNeonAuthWebhookConfig",
1465
+ output: NeonAuthWebhookConfig,
1235
1466
  run: (neon, input, signal) => neon.auth.webhooks.get({
1236
1467
  projectId: input.project_id,
1237
1468
  branchId: input.branch_id
@@ -1240,6 +1471,7 @@ const toolFactories = {
1240
1471
  "auth.webhooks.update": (options) => fromGenerated(options, {
1241
1472
  id: "auth.webhooks.update",
1242
1473
  generated: "updateNeonAuthWebhookConfig",
1474
+ output: NeonAuthWebhookConfig,
1243
1475
  run: (neon, input, signal) => neon.auth.webhooks.update({
1244
1476
  projectId: input.project_id,
1245
1477
  branchId: input.branch_id,
@@ -1252,6 +1484,7 @@ const toolFactories = {
1252
1484
  "auth.logsExport.update": (options) => fromGenerated(options, {
1253
1485
  id: "auth.logsExport.update",
1254
1486
  generated: "updateNeonAuthLogsExport",
1487
+ output: NeonAuthLogsExportConfig,
1255
1488
  run: (neon, input, signal) => neon.auth.logsExport.update({
1256
1489
  projectId: input.project_id,
1257
1490
  branchId: input.branch_id,
@@ -1261,6 +1494,7 @@ const toolFactories = {
1261
1494
  "consumption.perProject": (options) => fromGenerated(options, {
1262
1495
  id: "consumption.perProject",
1263
1496
  generated: "getConsumptionHistoryPerProject",
1497
+ output: z.array(ConsumptionHistoryPerProject),
1264
1498
  omit: ["cursor"],
1265
1499
  list: true,
1266
1500
  run: (neon, input, signal) => collectPages(neon.consumption.perProject({
@@ -1277,6 +1511,7 @@ const toolFactories = {
1277
1511
  "consumption.perProjectV2": (options) => fromGenerated(options, {
1278
1512
  id: "consumption.perProjectV2",
1279
1513
  generated: "getConsumptionHistoryPerProjectV2",
1514
+ output: z.array(ConsumptionHistoryPerProjectV2),
1280
1515
  omit: ["cursor"],
1281
1516
  list: true,
1282
1517
  run: (neon, input, signal) => collectPages(neon.consumption.perProjectV2({
@@ -1292,6 +1527,7 @@ const toolFactories = {
1292
1527
  "consumption.perBranchV2": (options) => fromGenerated(options, {
1293
1528
  id: "consumption.perBranchV2",
1294
1529
  generated: "getConsumptionHistoryPerBranchV2",
1530
+ output: z.array(ConsumptionHistoryPerBranchV2),
1295
1531
  omit: ["cursor"],
1296
1532
  list: true,
1297
1533
  run: (neon, input, signal) => collectPages(neon.consumption.perBranchV2({
@@ -1308,26 +1544,35 @@ const toolFactories = {
1308
1544
  "apiKeys.list": (options) => fromGenerated(options, {
1309
1545
  id: "apiKeys.list",
1310
1546
  generated: "listApiKeys",
1547
+ output: z.array(ApiKeysListResponseItem),
1311
1548
  run: (neon, _input, signal) => neon.apiKeys.list({ signal })
1312
1549
  }),
1313
1550
  "apiKeys.create": (options) => fromGenerated(options, {
1314
1551
  id: "apiKeys.create",
1315
1552
  generated: "createApiKey",
1553
+ output: ApiKeyCreateResponse,
1554
+ secretOutputFields: [{
1555
+ path: "$.key",
1556
+ kind: "setup"
1557
+ }],
1316
1558
  run: (neon, input, signal) => neon.apiKeys.create({ keyName: input.key_name }, { signal })
1317
1559
  }),
1318
1560
  "apiKeys.revoke": (options) => fromGenerated(options, {
1319
1561
  id: "apiKeys.revoke",
1320
1562
  generated: "revokeApiKey",
1563
+ output: ApiKeyRevokeResponse,
1321
1564
  run: (neon, input, signal) => neon.apiKeys.revoke({ keyId: input.key_id }, { signal })
1322
1565
  }),
1323
1566
  "organizations.get": (options) => fromGenerated(options, {
1324
1567
  id: "organizations.get",
1325
1568
  generated: "getOrganization",
1569
+ output: Organization,
1326
1570
  run: (neon, input, signal) => neon.organizations.get({ orgId: input.org_id }, { signal })
1327
1571
  }),
1328
1572
  "organizations.members.list": (options) => fromGenerated(options, {
1329
1573
  id: "organizations.members.list",
1330
1574
  generated: "getOrganizationMembers",
1575
+ output: z.array(MemberWithUser),
1331
1576
  omit: ["cursor"],
1332
1577
  list: true,
1333
1578
  run: (neon, input, signal) => collectPages(neon.organizations.members.list({
@@ -1340,6 +1585,7 @@ const toolFactories = {
1340
1585
  "organizations.members.get": (options) => fromGenerated(options, {
1341
1586
  id: "organizations.members.get",
1342
1587
  generated: "getOrganizationMember",
1588
+ output: Member,
1343
1589
  run: (neon, input, signal) => neon.organizations.members.get({
1344
1590
  orgId: input.org_id,
1345
1591
  memberId: input.member_id
@@ -1348,6 +1594,7 @@ const toolFactories = {
1348
1594
  "organizations.members.update": (options) => fromGenerated(options, {
1349
1595
  id: "organizations.members.update",
1350
1596
  generated: "updateOrganizationMember",
1597
+ output: Member,
1351
1598
  run: (neon, input, signal) => neon.organizations.members.update({
1352
1599
  orgId: input.org_id,
1353
1600
  memberId: input.member_id,
@@ -1357,6 +1604,7 @@ const toolFactories = {
1357
1604
  "organizations.members.remove": (options) => fromGenerated(options, {
1358
1605
  id: "organizations.members.remove",
1359
1606
  generated: "removeOrganizationMember",
1607
+ output: z.null(),
1360
1608
  run: (neon, input, signal) => neon.organizations.members.remove({
1361
1609
  orgId: input.org_id,
1362
1610
  memberId: input.member_id
@@ -1365,11 +1613,13 @@ const toolFactories = {
1365
1613
  "organizations.invitations.list": (options) => fromGenerated(options, {
1366
1614
  id: "organizations.invitations.list",
1367
1615
  generated: "getOrganizationInvitations",
1616
+ output: OrganizationInvitationsResponse.shape.invitations,
1368
1617
  run: (neon, input, signal) => neon.organizations.invitations.list({ orgId: input.org_id }, { signal })
1369
1618
  }),
1370
1619
  "organizations.invitations.create": (options) => fromGenerated(options, {
1371
1620
  id: "organizations.invitations.create",
1372
1621
  generated: "createOrganizationInvitations",
1622
+ output: OrganizationInvitationsResponse.shape.invitations,
1373
1623
  run: (neon, input, signal) => neon.organizations.invitations.create({
1374
1624
  orgId: input.org_id,
1375
1625
  invitations: input.invitations
@@ -1378,11 +1628,13 @@ const toolFactories = {
1378
1628
  "organizations.spendingLimit.get": (options) => fromGenerated(options, {
1379
1629
  id: "organizations.spendingLimit.get",
1380
1630
  generated: "getOrganizationSpendingLimit",
1631
+ output: SpendingLimitResponse,
1381
1632
  run: (neon, input, signal) => neon.organizations.spendingLimit.get({ orgId: input.org_id }, { signal })
1382
1633
  }),
1383
1634
  "organizations.spendingLimit.set": (options) => fromGenerated(options, {
1384
1635
  id: "organizations.spendingLimit.set",
1385
1636
  generated: "setOrganizationSpendingLimit",
1637
+ output: SpendingLimitResponse,
1386
1638
  run: (neon, input, signal) => neon.organizations.spendingLimit.set({
1387
1639
  orgId: input.org_id,
1388
1640
  spendingLimitCents: input.spending_limit_cents
@@ -1391,16 +1643,23 @@ const toolFactories = {
1391
1643
  "organizations.spendingLimit.delete": (options) => fromGenerated(options, {
1392
1644
  id: "organizations.spendingLimit.delete",
1393
1645
  generated: "deleteOrganizationSpendingLimit",
1646
+ output: z.null(),
1394
1647
  run: (neon, input, signal) => neon.organizations.spendingLimit.delete({ orgId: input.org_id }, { signal })
1395
1648
  }),
1396
1649
  "organizations.apiKeys.list": (options) => fromGenerated(options, {
1397
1650
  id: "organizations.apiKeys.list",
1398
1651
  generated: "listOrgApiKeys",
1652
+ output: z.array(OrgApiKeysListResponseItem),
1399
1653
  run: (neon, input, signal) => neon.organizations.apiKeys.list({ orgId: input.org_id }, { signal })
1400
1654
  }),
1401
1655
  "organizations.apiKeys.create": (options) => fromGenerated(options, {
1402
1656
  id: "organizations.apiKeys.create",
1403
1657
  generated: "createOrgApiKey",
1658
+ output: OrgApiKeyCreateResponse,
1659
+ secretOutputFields: [{
1660
+ path: "$.key",
1661
+ kind: "setup"
1662
+ }],
1404
1663
  run: (neon, input, signal) => neon.organizations.apiKeys.create({
1405
1664
  orgId: input.org_id,
1406
1665
  keyName: input.key_name,
@@ -1410,6 +1669,7 @@ const toolFactories = {
1410
1669
  "organizations.apiKeys.revoke": (options) => fromGenerated(options, {
1411
1670
  id: "organizations.apiKeys.revoke",
1412
1671
  generated: "revokeOrgApiKey",
1672
+ output: OrgApiKeyRevokeResponse,
1413
1673
  run: (neon, input, signal) => neon.organizations.apiKeys.revoke({
1414
1674
  orgId: input.org_id,
1415
1675
  keyId: input.key_id
@@ -1421,6 +1681,7 @@ const toolFactories = {
1421
1681
  title: "List regions",
1422
1682
  description: "Lists the regions you can create projects in. An organization API key gets 404.",
1423
1683
  inputSchema: z.strictObject({}),
1684
+ outputSchema: z.array(RegionResponse),
1424
1685
  annotations: {
1425
1686
  readOnlyHint: true,
1426
1687
  openWorldHint: false
@@ -1428,6 +1689,7 @@ const toolFactories = {
1428
1689
  requiresApproval: false,
1429
1690
  metadata: {
1430
1691
  method: "GET",
1692
+ readOnlySafe: true,
1431
1693
  path: "/regions",
1432
1694
  stability: "stable",
1433
1695
  deprecated: false,
@@ -1437,6 +1699,7 @@ const toolFactories = {
1437
1699
  "user.me": (options) => fromGenerated(options, {
1438
1700
  id: "user.me",
1439
1701
  generated: "getCurrentUserInfo",
1702
+ output: CurrentUserInfoResponse,
1440
1703
  run: (neon, _input, signal) => neon.user.me({ signal })
1441
1704
  }),
1442
1705
  "incidents.list": listIncidentsTool,