@postman/postman-mcp-server 2.6.1 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +236 -80
  2. package/dist/package.json +11 -10
  3. package/dist/src/enabledResources.js +9 -3
  4. package/dist/src/index.js +11 -0
  5. package/dist/src/tools/createCollection.js +1 -1
  6. package/dist/src/tools/createCollectionComment.js +1 -1
  7. package/dist/src/tools/createCollectionFolder.js +1 -1
  8. package/dist/src/tools/createCollectionRequest.js +257 -93
  9. package/dist/src/tools/createCollectionResponse.js +415 -4
  10. package/dist/src/tools/createEnvironment.js +1 -1
  11. package/dist/src/tools/createFolderComment.js +1 -1
  12. package/dist/src/tools/createMock.js +1 -1
  13. package/dist/src/tools/createMonitor.js +1 -1
  14. package/dist/src/tools/createRequestComment.js +1 -1
  15. package/dist/src/tools/createResponseComment.js +1 -1
  16. package/dist/src/tools/createSpec.js +17 -5
  17. package/dist/src/tools/createSpecFile.js +1 -1
  18. package/dist/src/tools/createWorkspace.js +6 -2
  19. package/dist/src/tools/deleteApiCollectionComment.js +1 -1
  20. package/dist/src/tools/deleteCollectionComment.js +1 -1
  21. package/dist/src/tools/deleteFolderComment.js +1 -1
  22. package/dist/src/tools/deleteMock.js +1 -1
  23. package/dist/src/tools/deletePanElementOrFolder.js +1 -1
  24. package/dist/src/tools/deleteRequestComment.js +1 -1
  25. package/dist/src/tools/deleteResponseComment.js +1 -1
  26. package/dist/src/tools/deleteWorkspace.js +1 -1
  27. package/dist/src/tools/duplicateCollection.js +1 -1
  28. package/dist/src/tools/generateCollection.js +3 -3
  29. package/dist/src/tools/getAllElementsAndFolders.js +1 -1
  30. package/dist/src/tools/getAuthenticatedUser.js +1 -1
  31. package/dist/src/tools/getCodeGenerationInstructions.js +17 -11
  32. package/dist/src/tools/getCollection/getCollectionMap.js +2 -2
  33. package/dist/src/tools/getMock.js +1 -1
  34. package/dist/src/tools/getMocks.js +1 -1
  35. package/dist/src/tools/getSourceCollectionStatus.js +1 -1
  36. package/dist/src/tools/getTaggedEntities.js +1 -1
  37. package/dist/src/tools/getWorkspace.js +1 -1
  38. package/dist/src/tools/getWorkspaces.js +1 -1
  39. package/dist/src/tools/mergeCollectionFork.js +1 -1
  40. package/dist/src/tools/patchCollection.js +1 -1
  41. package/dist/src/tools/patchEnvironment.js +1 -1
  42. package/dist/src/tools/postPanElementOrFolder.js +1 -1
  43. package/dist/src/tools/publishDocumentation.js +1 -1
  44. package/dist/src/tools/pullCollectionChanges.js +4 -2
  45. package/dist/src/tools/putCollection.js +11 -1
  46. package/dist/src/tools/putEnvironment.js +1 -1
  47. package/dist/src/tools/resolveCommentThread.js +1 -1
  48. package/dist/src/tools/runMonitor.js +1 -1
  49. package/dist/src/tools/searchPostmanElementsInPrivateNetwork.js +127 -0
  50. package/dist/src/tools/searchPostmanElementsInPublicNetwork.js +101 -0
  51. package/dist/src/tools/syncCollectionWithSpec.js +1 -1
  52. package/dist/src/tools/syncSpecWithCollection.js +1 -1
  53. package/dist/src/tools/updateApiCollectionComment.js +1 -1
  54. package/dist/src/tools/updateCollectionComment.js +1 -1
  55. package/dist/src/tools/updateCollectionFolder.js +1 -1
  56. package/dist/src/tools/updateCollectionRequest.js +259 -96
  57. package/dist/src/tools/updateCollectionResponse.js +1 -1
  58. package/dist/src/tools/updateFolderComment.js +1 -1
  59. package/dist/src/tools/updateMock.js +1 -1
  60. package/dist/src/tools/updatePanElementOrFolder.js +1 -1
  61. package/dist/src/tools/updateRequestComment.js +1 -1
  62. package/dist/src/tools/updateResponseComment.js +1 -1
  63. package/dist/src/tools/updateSpecFile.js +1 -1
  64. package/dist/src/tools/updateWorkspace.js +1 -1
  65. package/dist/src/tools/utils/templateRenderer.js +23 -0
  66. package/dist/src/views/getCollections.njk +12 -0
  67. package/dist/src/views/getWorkspaces.njk +6 -0
  68. package/package.json +11 -10
  69. package/dist/src/tools/searchPostmanElements.js +0 -69
@@ -5,14 +5,409 @@ export const method = 'createCollectionResponse';
5
5
  export const description = 'Creates a request response in a collection. For a complete list of request body properties, refer to the **Response** entry in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n\n**Note:**\n\nIt is recommended that you pass the \\`name\\` property in the request body. If you do not, the system uses a null value. As a result, this creates a response with a blank name.\n';
6
6
  export const parameters = z.object({
7
7
  collectionId: z.string().describe("The collection's ID."),
8
- requestId: z.string().describe("The parent request's ID."),
8
+ request: z.string().describe("The parent request's ID."),
9
9
  name: z
10
10
  .string()
11
11
  .describe("The response's name. It is recommended that you pass the `name` property in the request body. If you do not, the system uses a null value. As a result, this creates a response with a blank name.")
12
12
  .optional(),
13
+ originalRequest: z
14
+ .object({
15
+ url: z
16
+ .union([
17
+ z.string().nullable().describe("The request's raw URL."),
18
+ z.object({
19
+ raw: z.string().describe("The request's raw URL.").optional(),
20
+ protocol: z.string().describe('The request protocol.').optional(),
21
+ host: z.array(z.string().nullable()).describe("The host's URL.").optional(),
22
+ path: z.array(z.string()).describe("A list of the URL's path components.").optional(),
23
+ port: z
24
+ .string()
25
+ .describe("The URL's port number. An empty value indicates port `80` (http) or `443` (https).")
26
+ .optional(),
27
+ query: z
28
+ .array(z.object({
29
+ key: z.string().nullable().describe("The query parameter's key.").optional(),
30
+ value: z.string().nullable().describe("The key's value.").optional(),
31
+ disabled: z
32
+ .boolean()
33
+ .describe("If true, the query parameter isn't sent with the request.")
34
+ .default(false),
35
+ description: z
36
+ .string()
37
+ .nullable()
38
+ .describe("The query parameter's description.")
39
+ .optional(),
40
+ }))
41
+ .describe('A list of query parameters. These are the query string parts of the URL, parsed as separate variables.')
42
+ .optional(),
43
+ }),
44
+ ])
45
+ .describe('Information about the URL.')
46
+ .optional(),
47
+ auth: z
48
+ .object({
49
+ type: z
50
+ .enum([
51
+ 'basic',
52
+ 'bearer',
53
+ 'apikey',
54
+ 'digest',
55
+ 'oauth1',
56
+ 'oauth2',
57
+ 'hawk',
58
+ 'awsv4',
59
+ 'ntlm',
60
+ 'edgegrid',
61
+ 'jwt',
62
+ 'asap',
63
+ ])
64
+ .describe('The authorization type.'),
65
+ apikey: z
66
+ .array(z
67
+ .object({
68
+ key: z.string().describe("The auth method's key value."),
69
+ value: z
70
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
71
+ .describe("The key's value.")
72
+ .optional(),
73
+ type: z
74
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
75
+ .describe("The value's type.")
76
+ .optional(),
77
+ })
78
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
79
+ .describe("The API key's authentication information.")
80
+ .optional(),
81
+ awsv4: z
82
+ .array(z
83
+ .object({
84
+ key: z.string().describe("The auth method's key value."),
85
+ value: z
86
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
87
+ .describe("The key's value.")
88
+ .optional(),
89
+ type: z
90
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
91
+ .describe("The value's type.")
92
+ .optional(),
93
+ })
94
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
95
+ .describe('The attributes for [AWS Signature](https://learning.postman.com/docs/sending-requests/authorization/aws-signature/) authentication.')
96
+ .optional(),
97
+ basic: z
98
+ .array(z
99
+ .object({
100
+ key: z.string().describe("The auth method's key value."),
101
+ value: z
102
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
103
+ .describe("The key's value.")
104
+ .optional(),
105
+ type: z
106
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
107
+ .describe("The value's type.")
108
+ .optional(),
109
+ })
110
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
111
+ .describe('The attributes for [Basic Auth](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/#basic-auth).')
112
+ .optional(),
113
+ bearer: z
114
+ .array(z
115
+ .object({
116
+ key: z.string().describe("The auth method's key value."),
117
+ value: z
118
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
119
+ .describe("The key's value.")
120
+ .optional(),
121
+ type: z
122
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
123
+ .describe("The value's type.")
124
+ .optional(),
125
+ })
126
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
127
+ .describe('The attributes for [Bearer Token](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/#bearer-token) authentication.')
128
+ .optional(),
129
+ digest: z
130
+ .array(z
131
+ .object({
132
+ key: z.string().describe("The auth method's key value."),
133
+ value: z
134
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
135
+ .describe("The key's value.")
136
+ .optional(),
137
+ type: z
138
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
139
+ .describe("The value's type.")
140
+ .optional(),
141
+ })
142
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
143
+ .describe('The attributes for [Digest](https://learning.postman.com/docs/sending-requests/authorization/digest-auth/) access authentication.')
144
+ .optional(),
145
+ edgegrid: z
146
+ .array(z
147
+ .object({
148
+ key: z.string().describe("The auth method's key value."),
149
+ value: z
150
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
151
+ .describe("The key's value.")
152
+ .optional(),
153
+ type: z
154
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
155
+ .describe("The value's type.")
156
+ .optional(),
157
+ })
158
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
159
+ .describe('The attributes for [Akamai Edgegrid](https://learning.postman.com/docs/sending-requests/authorization/akamai-edgegrid/) authentication.')
160
+ .optional(),
161
+ hawk: z
162
+ .array(z
163
+ .object({
164
+ key: z.string().describe("The auth method's key value."),
165
+ value: z
166
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
167
+ .describe("The key's value.")
168
+ .optional(),
169
+ type: z
170
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
171
+ .describe("The value's type.")
172
+ .optional(),
173
+ })
174
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
175
+ .describe('The attributes for [Hawk](https://learning.postman.com/docs/sending-requests/authorization/hawk-authentication/) authentication.')
176
+ .optional(),
177
+ ntlm: z
178
+ .array(z
179
+ .object({
180
+ key: z.string().describe("The auth method's key value."),
181
+ value: z
182
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
183
+ .describe("The key's value.")
184
+ .optional(),
185
+ type: z
186
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
187
+ .describe("The value's type.")
188
+ .optional(),
189
+ })
190
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
191
+ .describe('The attributes for [NTLM](https://learning.postman.com/docs/sending-requests/authorization/ntlm-authentication/) authentication.')
192
+ .optional(),
193
+ oauth1: z
194
+ .array(z
195
+ .object({
196
+ key: z.string().describe("The auth method's key value."),
197
+ value: z
198
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
199
+ .describe("The key's value.")
200
+ .optional(),
201
+ type: z
202
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
203
+ .describe("The value's type.")
204
+ .optional(),
205
+ })
206
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
207
+ .describe('The attributes for [OAuth1](https://learning.postman.com/docs/sending-requests/authorization/oauth-10/) authentication.')
208
+ .optional(),
209
+ oauth2: z
210
+ .array(z
211
+ .object({
212
+ key: z.string().describe("The auth method's key value."),
213
+ value: z
214
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
215
+ .describe("The key's value.")
216
+ .optional(),
217
+ type: z
218
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
219
+ .describe("The value's type.")
220
+ .optional(),
221
+ })
222
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
223
+ .describe('The attributes for [OAuth2](https://learning.postman.com/docs/sending-requests/authorization/oauth-20/) authentication.')
224
+ .optional(),
225
+ jwt: z
226
+ .array(z
227
+ .object({
228
+ key: z.string().describe("The auth method's key value."),
229
+ value: z
230
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
231
+ .describe("The key's value.")
232
+ .optional(),
233
+ type: z
234
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
235
+ .describe("The value's type.")
236
+ .optional(),
237
+ })
238
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
239
+ .describe('The attributes for JWT (JSON Web Token). Includes the `payload`, `secret`, `algorithm`, `addTokenTo`, and `headerPrefix` properties.')
240
+ .optional(),
241
+ asap: z
242
+ .array(z
243
+ .object({
244
+ key: z.string().describe("The auth method's key value."),
245
+ value: z
246
+ .union([z.string(), z.array(z.record(z.string(), z.unknown()))])
247
+ .describe("The key's value.")
248
+ .optional(),
249
+ type: z
250
+ .enum(['string', 'boolean', 'number', 'array', 'object', 'any'])
251
+ .describe("The value's type.")
252
+ .optional(),
253
+ })
254
+ .describe('Information about the supported Postman [authorization type](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).'))
255
+ .describe('The attributes for ASAP (Atlassian S2S Authentication Protocol). Includes the `kid`, `aud`, `iss`, `alg`, `privateKey`, and `claims` properties.')
256
+ .optional(),
257
+ })
258
+ .describe('The [authorization type supported by Postman](https://learning.postman.com/docs/sending-requests/authorization/authorization-types/).')
259
+ .optional(),
260
+ method: z.string().describe("The request's standard HTTP method.").optional(),
261
+ description: z.string().nullable().describe("The request's description.").optional(),
262
+ header: z
263
+ .array(z
264
+ .object({
265
+ key: z
266
+ .string()
267
+ .describe("The header's key, such as `Content-Type` or `X-Custom-Header`."),
268
+ value: z.string().describe("The header key's value."),
269
+ description: z.string().nullable().describe("The header's description.").optional(),
270
+ })
271
+ .describe('Information about the header.'))
272
+ .describe('A list of headers.')
273
+ .optional(),
274
+ body: z
275
+ .object({
276
+ mode: z
277
+ .enum(['raw', 'urlencoded', 'formdata', 'file', 'graphql'])
278
+ .describe('The data associated with the request.')
279
+ .optional(),
280
+ raw: z
281
+ .string()
282
+ .describe('If the `mode` value is `raw`, the raw content of the request body.')
283
+ .optional(),
284
+ urlencoded: z
285
+ .array(z.object({
286
+ key: z.string().describe('The key value.'),
287
+ value: z.string().describe("The key's value.").optional(),
288
+ description: z.string().nullable().describe("The key's description.").optional(),
289
+ }))
290
+ .describe('A list of x-www-form-encoded key/value pairs.')
291
+ .optional(),
292
+ formdata: z
293
+ .array(z.record(z.string(), z.unknown()).and(z.union([
294
+ z.object({
295
+ key: z.string().describe('The key value.').optional(),
296
+ value: z.string().describe("The key's value.").optional(),
297
+ type: z.literal('text').describe('The `text` value.').optional(),
298
+ contentType: z
299
+ .string()
300
+ .describe('The form-data Content-Type header.')
301
+ .optional(),
302
+ description: z
303
+ .string()
304
+ .nullable()
305
+ .describe("The key's description.")
306
+ .optional(),
307
+ }),
308
+ z.object({
309
+ key: z.string().describe('The key value.').optional(),
310
+ src: z
311
+ .unknown()
312
+ .superRefine((x, ctx) => {
313
+ const schemas = [z.string().nullable(), z.array(z.string())];
314
+ const errors = schemas.reduce((errors, schema) => ((result) => (result.error ? [...errors, result.error] : errors))(schema.safeParse(x)), []);
315
+ if (schemas.length - errors.length !== 1) {
316
+ ctx.addIssue({
317
+ path: ctx.path,
318
+ code: 'invalid_union',
319
+ unionErrors: errors,
320
+ message: 'Invalid input: Should pass single schema',
321
+ });
322
+ }
323
+ })
324
+ .optional(),
325
+ type: z.literal('file').describe('The `file` value.').optional(),
326
+ contentType: z
327
+ .string()
328
+ .describe('The form-data Content-Type header.')
329
+ .optional(),
330
+ description: z
331
+ .string()
332
+ .nullable()
333
+ .describe("The key's description.")
334
+ .optional(),
335
+ }),
336
+ ])))
337
+ .describe('If the `mode` value is `formdata`, then a list of form-data key/pair values.')
338
+ .optional(),
339
+ file: z
340
+ .object({
341
+ src: z
342
+ .string()
343
+ .nullable()
344
+ .describe('The name of the file to upload (not its path). A null value indicates that no file is selected as a part of the request body.')
345
+ .optional(),
346
+ })
347
+ .describe('If the `mode` value is `file`, an object containing the file request information.')
348
+ .optional(),
349
+ graphql: z
350
+ .object({
351
+ query: z.string().describe('The GraphQL query.').optional(),
352
+ variables: z
353
+ .string()
354
+ .nullable()
355
+ .describe('The GraphQL query variables, in JSON format.')
356
+ .optional(),
357
+ })
358
+ .describe('If the `mode` value is `graphql`, an object containing the GraphQL request information.')
359
+ .optional(),
360
+ options: z
361
+ .record(z.string(), z.unknown())
362
+ .describe('Additional configurations and options set for various modes.')
363
+ .optional(),
364
+ })
365
+ .describe("Information about the collection's request body.")
366
+ .optional(),
367
+ })
368
+ .describe('Information about the collection request.')
369
+ .optional(),
370
+ responseTime: z
371
+ .number()
372
+ .nullable()
373
+ .describe('The time taken by the request to complete. The unit is milliseconds.')
374
+ .optional(),
375
+ timings: z
376
+ .record(z.string(), z.unknown())
377
+ .nullable()
378
+ .describe('Data related to the request and response timing, in milliseconds.')
379
+ .optional(),
380
+ header: z
381
+ .union([
382
+ z.string().nullable(),
383
+ z
384
+ .array(z
385
+ .object({
386
+ key: z
387
+ .string()
388
+ .describe("The header's key, such as `Content-Type` or `X-Custom-Header`."),
389
+ value: z.string().describe("The header key's value."),
390
+ description: z.string().nullable().describe("The header's description.").optional(),
391
+ })
392
+ .describe('Information about the header.'))
393
+ .describe("A list of the response's headers."),
394
+ ])
395
+ .optional(),
396
+ cookie: z
397
+ .array(z
398
+ .object({
399
+ name: z.string().describe("The cookie's name.").optional(),
400
+ value: z.string().describe("The cookie's value.").optional(),
401
+ })
402
+ .catchall(z.unknown()))
403
+ .describe('A list of cookies included in the response.')
404
+ .optional(),
405
+ body: z.string().nullable().describe('The raw text of the response body.').optional(),
406
+ status: z.string().describe("The response's HTTP status.").optional(),
407
+ code: z.number().int().describe("The response's HTTP status code.").optional(),
13
408
  });
14
409
  export const annotations = {
15
- title: 'Creates a request response in a collection. For a complete list of request body properties, refer to the **Response** entry in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n\n**Note:**\n\nIt is recommended that you pass the \\`name\\` property in the request body. If you do not, the system uses a null value. As a result, this creates a response with a blank name.\n',
410
+ title: 'Creates a request response in a collection. For a complete list of request body properties, refer to the **Response** entry in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).',
16
411
  readOnlyHint: false,
17
412
  destructiveHint: false,
18
413
  idempotentHint: false,
@@ -21,12 +416,28 @@ export async function handler(args, extra) {
21
416
  try {
22
417
  const endpoint = `/collections/${args.collectionId}/responses`;
23
418
  const query = new URLSearchParams();
24
- if (args.requestId !== undefined)
25
- query.set('requestId', String(args.requestId));
419
+ if (args.request !== undefined)
420
+ query.set('request', String(args.request));
26
421
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
27
422
  const bodyPayload = {};
28
423
  if (args.name !== undefined)
29
424
  bodyPayload.name = args.name;
425
+ if (args.originalRequest !== undefined)
426
+ bodyPayload.originalRequest = args.originalRequest;
427
+ if (args.responseTime !== undefined)
428
+ bodyPayload.responseTime = args.responseTime;
429
+ if (args.timings !== undefined)
430
+ bodyPayload.timings = args.timings;
431
+ if (args.header !== undefined)
432
+ bodyPayload.header = args.header;
433
+ if (args.cookie !== undefined)
434
+ bodyPayload.cookie = args.cookie;
435
+ if (args.body !== undefined)
436
+ bodyPayload.body = args.body;
437
+ if (args.status !== undefined)
438
+ bodyPayload.status = args.status;
439
+ if (args.code !== undefined)
440
+ bodyPayload.code = args.code;
30
441
  const options = {
31
442
  body: JSON.stringify(bodyPayload),
32
443
  contentType: ContentType.Json,
@@ -28,7 +28,7 @@ export const parameters = z.object({
28
28
  .optional(),
29
29
  });
30
30
  export const annotations = {
31
- title: 'Creates an environment.\n\n**Note:**\n\n- The request body size cannot exceed the maximum allowed size of 30MB.\n- If you receive an HTTP \\`411 Length Required\\` error response, manually pass the \\`Content-Length\\` header and its value in the request header.\n- If you do not include the \\`workspace\\` query parameter, the system creates the environment in the oldest personal Internal workspace you own.\n',
31
+ title: 'Creates an environment.',
32
32
  readOnlyHint: false,
33
33
  destructiveHint: false,
34
34
  idempotentHint: false,
@@ -26,7 +26,7 @@ export const parameters = z.object({
26
26
  .optional(),
27
27
  });
28
28
  export const annotations = {
29
- title: 'Creates a comment on a folder. To create a reply on an existing comment, include the \\`threadId\\` property in the request body.\n\n**Note:**\n\nThis endpoint accepts a max of 10,000 characters.\n',
29
+ title: 'Creates a comment on a folder. To create a reply on an existing comment, include the \\`threadId\\` property in the request body.',
30
30
  readOnlyHint: false,
31
31
  destructiveHint: false,
32
32
  idempotentHint: false,
@@ -21,7 +21,7 @@ export const parameters = z.object({
21
21
  .optional(),
22
22
  });
23
23
  export const annotations = {
24
- title: 'Creates a mock server in a collection.\n\n- Pass the collection UID (ownerId-collectionId), not the bare collection ID.\n- If you only have a \\`collectionId\\`, resolve the UID first:\n 1) Prefer GET \\`/collections/{collectionId}\\` and read \\`uid\\`, or\n 2) Construct \\`{ownerId}-{collectionId}\\` using ownerId from GET \\`/me\\`:\n - For team-owned collections: \\`ownerId = me.teamId\\`\n - For personal collections: \\`ownerId = me.user.id\\`\n- Use the \\`workspace\\` query to place the mock in a specific workspace. Prefer explicit workspace scoping.\n',
24
+ title: 'Creates a mock server in a collection.',
25
25
  readOnlyHint: false,
26
26
  destructiveHint: false,
27
27
  idempotentHint: false,
@@ -112,7 +112,7 @@ export const parameters = z.object({
112
112
  .optional(),
113
113
  });
114
114
  export const annotations = {
115
- title: 'Creates a monitor.\n\n**Note:**\n\n- You cannot create monitors for collections added to an API definition.\n- If you do not pass the \\`workspace\\` query parameter, the system creates the monitor in the oldest personal Internal workspace you own.\n',
115
+ title: 'Creates a monitor.',
116
116
  readOnlyHint: false,
117
117
  destructiveHint: false,
118
118
  idempotentHint: false,
@@ -28,7 +28,7 @@ export const parameters = z.object({
28
28
  .optional(),
29
29
  });
30
30
  export const annotations = {
31
- title: "The request ID must contain the team ID as a prefix, in \\`teamId-requestId\\` format.\n\nFor example, if you're creating a comment on collection ID \\`24585957-7b2c98f7-30db-4b67-8685-0079f48a0947\\` (note on the prefix), and\nthe collection request's ID is \\`2c450b59-9bbf-729b-6ac0-f92535a7c336\\`, then the \\`{requestId}\\` must be \\`24585957-2c450b59-9bbf-729b-6ac0-f92535a7c336\\`.\n",
31
+ title: 'The request ID must contain the team ID as a prefix, in \\`teamId-requestId\\` format.',
32
32
  readOnlyHint: false,
33
33
  destructiveHint: false,
34
34
  idempotentHint: false,
@@ -26,7 +26,7 @@ export const parameters = z.object({
26
26
  .optional(),
27
27
  });
28
28
  export const annotations = {
29
- title: 'Creates a comment on a response. To create a reply on an existing comment, include the \\`threadId\\` property in the request body.\n\n**Note:**\n\nThis endpoint accepts a max of 10,000 characters.\n',
29
+ title: 'Creates a comment on a response. To create a reply on an existing comment, include the \\`threadId\\` property in the request body.',
30
30
  readOnlyHint: false,
31
31
  destructiveHint: false,
32
32
  idempotentHint: false,
@@ -2,31 +2,43 @@ import { z } from 'zod';
2
2
  import { ContentType } from '../clients/postman.js';
3
3
  import { asMcpError, McpError } from './utils/toolHelpers.js';
4
4
  export const method = 'createSpec';
5
- export const description = "Creates an API specification in Postman's [Spec Hub](https://learning.postman.com/docs/design-apis/specifications/overview/). Specifications can be single or multi-file.\n\n**Note:**\n- Postman supports OpenAPI 2.0, OpenAPI 3.0, OpenAPI 3.1, and AsyncAPI 2.0 specifications.\n- If the file path contains a \\`/\\` (forward slash) character, then a folder is created. For example, if the path is the \\`components/schemas.json\\` value, then a \\`components\\` folder is created with the \\`schemas.json\\` file inside.\n- Multi-file specifications can only have one root file.\n- Files cannot exceed a maximum of 10 MB in size.\n";
5
+ export const description = "Creates an API specification in Postman's [Spec Hub](https://learning.postman.com/docs/design-apis/specifications/overview/). Specifications can be single or multi-file.\n\n**Note:**\n- Postman supports OpenAPI 2.0, OpenAPI 3.0, OpenAPI 3.1, AsyncAPI 2.0, protobuf 2 and 3, and GraphQL specifications.\n- If the file path contains a \\`/\\` (forward slash) character, then a folder is created. For example, if the path is the \\`components/schemas.json\\` value, then a \\`components\\` folder is created with the \\`schemas.json\\` file inside.\n- Multi-file specifications can only have one root file.\n- Files cannot exceed a maximum of 10 MB in size.\n";
6
6
  export const parameters = z.object({
7
7
  workspaceId: z.string().describe("The workspace's ID."),
8
8
  name: z.string().describe("The specification's name."),
9
9
  type: z
10
- .enum(['OPENAPI:2.0', 'OPENAPI:3.0', 'OPENAPI:3.1', 'ASYNCAPI:2.0'])
10
+ .enum([
11
+ 'OPENAPI:2.0',
12
+ 'OPENAPI:3.0',
13
+ 'OPENAPI:3.1',
14
+ 'ASYNCAPI:2.0',
15
+ 'PROTOBUF:2',
16
+ 'PROTOBUF:3',
17
+ 'GRAPHQL',
18
+ ])
11
19
  .describe("The specification's type."),
12
20
  files: z
13
21
  .array(z.union([
14
22
  z.object({
15
- path: z.string().describe("The file's path. Accepts JSON or YAML files."),
23
+ path: z
24
+ .string()
25
+ .describe("The file's path. Accepts .json, .yaml, .proto and .graphql file types."),
16
26
  content: z.string().describe("The file's stringified contents."),
17
27
  type: z
18
28
  .enum(['DEFAULT', 'ROOT'])
19
29
  .describe('The type of file. This property is required when creating multi-file specifications:\n- `ROOT` — The file containing the full OpenAPI structure. This serves as the entry point for the API spec and references other (`DEFAULT`) spec files. Multi-file specs can only have one root file.\n- `DEFAULT` — A file referenced by the `ROOT` file.\n'),
20
30
  }),
21
31
  z.object({
22
- path: z.string().describe("The file's path. Accepts JSON or YAML files."),
32
+ path: z
33
+ .string()
34
+ .describe("The file's path. Accepts .json, .yaml, .proto and .graphql file types."),
23
35
  content: z.string().describe("The file's stringified contents."),
24
36
  }),
25
37
  ]))
26
38
  .describe("A list of the specification's files and their contents."),
27
39
  });
28
40
  export const annotations = {
29
- title: "Creates an API specification in Postman's [Spec Hub](https://learning.postman.com/docs/design-apis/specifications/overview/). Specifications can be single or multi-file.\n\n**Note:**\n- Postman supports OpenAPI 2.0, OpenAPI 3.0, OpenAPI 3.1, and AsyncAPI 2.0 specifications.\n- If the file path contains a \\`/\\` (forward slash) character, then a folder is created. For example, if the path is the \\`components/schemas.json\\` value, then a \\`components\\` folder is created with the \\`schemas.json\\` file inside.\n- Multi-file specifications can only have one root file.\n- Files cannot exceed a maximum of 10 MB in size.\n",
41
+ title: "Creates an API specification in Postman's [Spec Hub](https://learning.postman.com/docs/design-apis/specifications/overview/). Specifications can be single or multi-file.",
30
42
  readOnlyHint: false,
31
43
  destructiveHint: false,
32
44
  idempotentHint: false,
@@ -9,7 +9,7 @@ export const parameters = z.object({
9
9
  content: z.string().describe("The file's stringified contents."),
10
10
  });
11
11
  export const annotations = {
12
- title: 'Creates an API specification file.\n\n**Note:**\n\n- If the file path contains a \\`/\\` (forward slash) character, then a folder is created. For example, if the path is the \\`components/schemas.json\\` value, then a \\`components\\` folder is created with the \\`schemas.json\\` file inside.\n- Creating a spec file assigns it the \\`DEFAULT\\` file type.\n- Multi-file specifications can only have one root file.\n- Files cannot exceed a maximum of 10 MB in size.\n',
12
+ title: 'Creates an API specification file.',
13
13
  readOnlyHint: false,
14
14
  destructiveHint: false,
15
15
  idempotentHint: false,
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { ContentType } from '../clients/postman.js';
3
3
  import { asMcpError, McpError } from './utils/toolHelpers.js';
4
4
  export const method = 'createWorkspace';
5
- export const description = 'Creates a new [workspace](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/).\n\n**Note:**\n\n- This endpoint returns a 403 \\`Forbidden\\` response if the user does not have permission to create workspaces. [Admins and Super Admins](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles) can configure workspace permissions to restrict users and/or user groups from creating workspaces or require approvals for the creation of team workspaces.\n- There are rate limits when publishing public workspaces.\n- Public team workspace names must be unique.\n\n### Important\n\nWe deprecated linking collections or environments between workspaces. We do not recommend that you do this.\n\nIf you have a linked collection or environment, note the following:\n- The endpoint does not create a clone of a collection or environment.\n- Any changes you make to a linked collection or environment changes them in all workspaces.\n- If you delete a collection or environment linked between workspaces, the system deletes it in all the workspaces.\n';
5
+ export const description = 'Creates a new [workspace](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/).\n\n**Note:**\n\n- This endpoint returns a 403 \\`Forbidden\\` response if the user does not have permission to create workspaces. [Admins and Super Admins](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles) can configure workspace permissions to restrict users and/or user groups from creating workspaces or require approvals for the creation of team workspaces.\n- There are rate limits when publishing public workspaces.\n- Public team workspace names must be unique.\n- The \\`teamId\\` property must be passed in the request body if [Postman Organizations](https://learning.postman.com/docs/administration/onboarding-checklist) is enabled.\n';
6
6
  export const parameters = z.object({
7
7
  workspace: z
8
8
  .object({
@@ -12,12 +12,16 @@ export const parameters = z.object({
12
12
  .describe('The type of workspace:\n- `personal`\n- `private` — Private workspaces are available on Postman [**Professional** and **Enterprise** plans](https://www.postman.com/pricing).\n- `public`\n- `team`\n- `partner` — [Partner Workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/partner-workspaces/) are available on Postman [**Professional** and **Enterprise** plans](https://www.postman.com/pricing)).\n'),
13
13
  description: z.string().describe("The workspace's description.").optional(),
14
14
  about: z.string().describe('A brief summary about the workspace.').optional(),
15
+ teamId: z
16
+ .string()
17
+ .describe('The team ID to assign to the workspace. This property is required if Postman [Organizations](https://learning.postman.com/docs/administration/managing-your-team/overview) is enabled.')
18
+ .optional(),
15
19
  })
16
20
  .describe('Information about the workspace.')
17
21
  .optional(),
18
22
  });
19
23
  export const annotations = {
20
- title: 'Creates a new [workspace](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/).\n\n**Note:**\n\n- This endpoint returns a 403 \\`Forbidden\\` response if the user does not have permission to create workspaces. [Admins and Super Admins](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles) can configure workspace permissions to restrict users and/or user groups from creating workspaces or require approvals for the creation of team workspaces.\n- There are rate limits when publishing public workspaces.\n- Public team workspace names must be unique.\n\n### Important\n\nWe deprecated linking collections or environments between workspaces. We do not recommend that you do this.\n\nIf you have a linked collection or environment, note the following:\n- The endpoint does not create a clone of a collection or environment.\n- Any changes you make to a linked collection or environment changes them in all workspaces.\n- If you delete a collection or environment linked between workspaces, the system deletes it in all the workspaces.\n',
24
+ title: 'Creates a new [workspace](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/).',
21
25
  readOnlyHint: false,
22
26
  destructiveHint: false,
23
27
  idempotentHint: false,
@@ -8,7 +8,7 @@ export const parameters = z.object({
8
8
  commentId: z.number().int().describe("The comment's ID."),
9
9
  });
10
10
  export const annotations = {
11
- title: "Deletes a comment from an API's collection. On success, this returns an HTTP \\`204 No Content\\` response.\n\n**Note:**\n\nDeleting the first comment of a thread deletes all the comments in the thread.\n",
11
+ title: "Deletes a comment from an API's collection. On success, this returns an HTTP \\`204 No Content\\` response.",
12
12
  readOnlyHint: false,
13
13
  destructiveHint: true,
14
14
  idempotentHint: true,
@@ -7,7 +7,7 @@ export const parameters = z.object({
7
7
  commentId: z.number().int().describe("The comment's ID."),
8
8
  });
9
9
  export const annotations = {
10
- title: 'Deletes a comment from a collection. On success, this returns an HTTP \\`204 No Content\\` response.\n\n**Note:**\n\nDeleting the first comment of a thread deletes all the comments in the thread.\n',
10
+ title: 'Deletes a comment from a collection. On success, this returns an HTTP \\`204 No Content\\` response.',
11
11
  readOnlyHint: false,
12
12
  destructiveHint: true,
13
13
  idempotentHint: true,
@@ -8,7 +8,7 @@ export const parameters = z.object({
8
8
  commentId: z.number().int().describe("The comment's ID."),
9
9
  });
10
10
  export const annotations = {
11
- title: 'Deletes a comment from a folder. On success, this returns an HTTP \\`204 No Content\\` response.\n\n**Note:**\n\nDeleting the first comment of a thread deletes all the comments in the thread.\n',
11
+ title: 'Deletes a comment from a folder. On success, this returns an HTTP \\`204 No Content\\` response.',
12
12
  readOnlyHint: false,
13
13
  destructiveHint: true,
14
14
  idempotentHint: true,
@@ -4,7 +4,7 @@ export const method = 'deleteMock';
4
4
  export const description = 'Deletes a mock server.\n- Resource: Mock server entity. This is destructive.\n- Ensure you are targeting the correct mock ID.\n';
5
5
  export const parameters = z.object({ mockId: z.string().describe("The mock's ID.") });
6
6
  export const annotations = {
7
- title: 'Deletes a mock server.\n- Resource: Mock server entity. This is destructive.\n- Ensure you are targeting the correct mock ID.\n',
7
+ title: 'Deletes a mock server.',
8
8
  readOnlyHint: false,
9
9
  destructiveHint: true,
10
10
  idempotentHint: true,