@postman/postman-mcp-server 2.2.0 → 2.3.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 (112) hide show
  1. package/README.md +3 -0
  2. package/dist/package.json +18 -18
  3. package/dist/src/clients/postman.js +25 -15
  4. package/dist/src/index.js +38 -50
  5. package/dist/src/tools/createCollection.js +13 -17
  6. package/dist/src/tools/createCollectionComment.js +9 -9
  7. package/dist/src/tools/createCollectionFolder.js +7 -7
  8. package/dist/src/tools/createCollectionFork.js +7 -7
  9. package/dist/src/tools/createCollectionRequest.js +7 -7
  10. package/dist/src/tools/createCollectionResponse.js +7 -7
  11. package/dist/src/tools/createEnvironment.js +6 -6
  12. package/dist/src/tools/createFolderComment.js +9 -9
  13. package/dist/src/tools/createMock.js +8 -8
  14. package/dist/src/tools/createMonitor.js +6 -6
  15. package/dist/src/tools/createRequestComment.js +9 -9
  16. package/dist/src/tools/createResponseComment.js +9 -9
  17. package/dist/src/tools/createSpec.js +10 -10
  18. package/dist/src/tools/createSpecFile.js +7 -7
  19. package/dist/src/tools/createWorkspace.js +4 -4
  20. package/dist/src/tools/deleteApiCollectionComment.js +3 -3
  21. package/dist/src/tools/deleteCollection.js +3 -3
  22. package/dist/src/tools/deleteCollectionComment.js +3 -3
  23. package/dist/src/tools/deleteCollectionFolder.js +3 -3
  24. package/dist/src/tools/deleteCollectionRequest.js +3 -3
  25. package/dist/src/tools/deleteCollectionResponse.js +3 -3
  26. package/dist/src/tools/deleteEnvironment.js +3 -3
  27. package/dist/src/tools/deleteFolderComment.js +3 -3
  28. package/dist/src/tools/deleteMock.js +5 -5
  29. package/dist/src/tools/deleteMonitor.js +3 -3
  30. package/dist/src/tools/deletePanElementOrFolder.js +3 -3
  31. package/dist/src/tools/deleteRequestComment.js +3 -3
  32. package/dist/src/tools/deleteResponseComment.js +3 -3
  33. package/dist/src/tools/deleteSpec.js +3 -3
  34. package/dist/src/tools/deleteSpecFile.js +3 -3
  35. package/dist/src/tools/deleteWorkspace.js +3 -3
  36. package/dist/src/tools/duplicateCollection.js +7 -7
  37. package/dist/src/tools/generateCollection.js +11 -11
  38. package/dist/src/tools/generateSpecFromCollection.js +9 -9
  39. package/dist/src/tools/getAllElementsAndFolders.js +28 -28
  40. package/dist/src/tools/getAllPanAddElementRequests.js +22 -22
  41. package/dist/src/tools/getAllSpecs.js +8 -8
  42. package/dist/src/tools/getAsyncSpecTaskStatus.js +3 -3
  43. package/dist/src/tools/getAuthenticatedUser.js +4 -4
  44. package/dist/src/tools/getCollection.js +7 -7
  45. package/dist/src/tools/getCollectionComments.js +3 -3
  46. package/dist/src/tools/getCollectionFolder.js +9 -9
  47. package/dist/src/tools/getCollectionForks.js +9 -9
  48. package/dist/src/tools/getCollectionRequest.js +9 -9
  49. package/dist/src/tools/getCollectionResponse.js +9 -9
  50. package/dist/src/tools/getCollectionTags.js +3 -3
  51. package/dist/src/tools/getCollectionUpdatesTasks.js +3 -3
  52. package/dist/src/tools/getCollections.js +10 -10
  53. package/dist/src/tools/getCollectionsForkedByUser.js +8 -8
  54. package/dist/src/tools/getDuplicateCollectionTaskStatus.js +3 -3
  55. package/dist/src/tools/getEnvironment.js +3 -3
  56. package/dist/src/tools/getEnvironments.js +4 -4
  57. package/dist/src/tools/getFolderComments.js +3 -3
  58. package/dist/src/tools/getGeneratedCollectionSpecs.js +3 -3
  59. package/dist/src/tools/getMock.js +5 -5
  60. package/dist/src/tools/getMocks.js +16 -10
  61. package/dist/src/tools/getMonitor.js +3 -3
  62. package/dist/src/tools/getMonitors.js +16 -16
  63. package/dist/src/tools/getRequestComments.js +3 -3
  64. package/dist/src/tools/getResponseComments.js +3 -3
  65. package/dist/src/tools/getSourceCollectionStatus.js +3 -3
  66. package/dist/src/tools/getSpec.js +3 -3
  67. package/dist/src/tools/getSpecCollections.js +7 -7
  68. package/dist/src/tools/getSpecDefinition.js +3 -3
  69. package/dist/src/tools/getSpecFile.js +3 -3
  70. package/dist/src/tools/getSpecFiles.js +3 -3
  71. package/dist/src/tools/getStatusOfAnAsyncApiTask.js +3 -3
  72. package/dist/src/tools/getTaggedEntities.js +11 -11
  73. package/dist/src/tools/getWorkspace.js +5 -5
  74. package/dist/src/tools/getWorkspaceGlobalVariables.js +3 -3
  75. package/dist/src/tools/getWorkspaceTags.js +3 -3
  76. package/dist/src/tools/getWorkspaces.js +12 -12
  77. package/dist/src/tools/mergeCollectionFork.js +8 -8
  78. package/dist/src/tools/patchCollection.js +5 -5
  79. package/dist/src/tools/patchEnvironment.js +50 -4
  80. package/dist/src/tools/postPanElementOrFolder.js +51 -3
  81. package/dist/src/tools/publishDocumentation.js +11 -11
  82. package/dist/src/tools/publishMock.js +3 -3
  83. package/dist/src/tools/pullCollectionChanges.js +3 -3
  84. package/dist/src/tools/putCollection.js +13 -17
  85. package/dist/src/tools/putEnvironment.js +5 -5
  86. package/dist/src/tools/resolveCommentThread.js +3 -3
  87. package/dist/src/tools/runMonitor.js +5 -5
  88. package/dist/src/tools/syncCollectionWithSpec.js +5 -5
  89. package/dist/src/tools/syncSpecWithCollection.js +5 -5
  90. package/dist/src/tools/transferCollectionFolders.js +10 -10
  91. package/dist/src/tools/transferCollectionRequests.js +10 -10
  92. package/dist/src/tools/transferCollectionResponses.js +10 -10
  93. package/dist/src/tools/unpublishDocumentation.js +3 -3
  94. package/dist/src/tools/unpublishMock.js +3 -3
  95. package/dist/src/tools/updateApiCollectionComment.js +7 -7
  96. package/dist/src/tools/updateCollectionComment.js +7 -7
  97. package/dist/src/tools/updateCollectionFolder.js +7 -7
  98. package/dist/src/tools/updateCollectionRequest.js +7 -7
  99. package/dist/src/tools/updateCollectionResponse.js +7 -7
  100. package/dist/src/tools/updateCollectionTags.js +5 -5
  101. package/dist/src/tools/updateFolderComment.js +7 -7
  102. package/dist/src/tools/updateMock.js +7 -7
  103. package/dist/src/tools/updateMonitor.js +5 -5
  104. package/dist/src/tools/updatePanElementOrFolder.js +62 -3
  105. package/dist/src/tools/updateRequestComment.js +7 -7
  106. package/dist/src/tools/updateResponseComment.js +7 -7
  107. package/dist/src/tools/updateSpecFile.js +9 -9
  108. package/dist/src/tools/updateSpecProperties.js +5 -5
  109. package/dist/src/tools/updateWorkspace.js +5 -5
  110. package/dist/src/tools/updateWorkspaceGlobalVariables.js +5 -5
  111. package/dist/src/tools/updateWorkspaceTags.js +5 -5
  112. package/package.json +18 -18
@@ -1,24 +1,72 @@
1
1
  import { z } from 'zod';
2
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
2
+ import { ContentType } from '../clients/postman.js';
3
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
3
4
  function asMcpError(error) {
4
5
  const cause = error?.cause ?? String(error);
5
6
  return new McpError(ErrorCode.InternalError, cause);
6
7
  }
7
8
  export const method = 'postPanElementOrFolder';
8
9
  export const description = "Publishes a element or creates a folder in your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/). An element is a Postman API, collection, or workspace.\n\n**Note:**\n\nYou can only pass one element object type per call. For example, you cannot pass both \\`api\\` and \\`collection\\` in a single request.\n";
9
- export const parameters = z.object({});
10
+ export const parameters = z.object({
11
+ body: z.union([
12
+ z.object({
13
+ api: z
14
+ .object({
15
+ id: z.string().describe("The API's ID."),
16
+ parentFolderId: z.number().int().describe("The API's parent folder ID."),
17
+ })
18
+ .optional(),
19
+ }),
20
+ z.object({
21
+ collection: z
22
+ .object({
23
+ id: z.string().describe("The collection's ID."),
24
+ parentFolderId: z.number().int().describe("The collection's parent folder ID."),
25
+ environments: z
26
+ .array(z.string().describe("An environment's UID."))
27
+ .describe('A list of environment UIDs (`userId`-`environmentId`) to add to the collection.')
28
+ .optional(),
29
+ })
30
+ .optional(),
31
+ }),
32
+ z.object({
33
+ workspace: z
34
+ .object({
35
+ id: z.string().describe("The workspace's ID."),
36
+ parentFolderId: z.number().int().describe("The workspace's parent folder ID."),
37
+ })
38
+ .optional(),
39
+ }),
40
+ z.object({
41
+ folder: z
42
+ .object({
43
+ name: z.string().describe("The folder's name."),
44
+ description: z.string().describe("The folder's description.").optional(),
45
+ parentFolderId: z
46
+ .number()
47
+ .int()
48
+ .describe("The folder's parent folder ID. This value defaults to `0`. To create a folder at the root level, omit this property.")
49
+ .default(0),
50
+ })
51
+ .optional(),
52
+ }),
53
+ ]),
54
+ });
10
55
  export const annotations = {
11
56
  title: "Publishes a element or creates a folder in your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/). An element is a Postman API, collection, or workspace.\n\n**Note:**\n\nYou can only pass one element object type per call. For example, you cannot pass both \\`api\\` and \\`collection\\` in a single request.\n",
12
57
  readOnlyHint: false,
13
58
  destructiveHint: false,
14
59
  idempotentHint: false,
15
60
  };
16
- export async function handler(params, extra) {
61
+ export async function handler(args, extra) {
17
62
  try {
18
63
  const endpoint = `/network/private`;
19
64
  const query = new URLSearchParams();
20
65
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
66
+ const bodyPayload = args.body;
21
67
  const options = {
68
+ body: JSON.stringify(bodyPayload),
69
+ contentType: ContentType.Json,
22
70
  headers: extra.headers,
23
71
  };
24
72
  const result = await extra.client.post(url, options);
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ContentType } from '../clients/postman.js';
3
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
3
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
4
4
  function asMcpError(error) {
5
5
  const cause = error?.cause ?? String(error);
6
6
  return new McpError(ErrorCode.InternalError, cause);
@@ -90,20 +90,20 @@ export const annotations = {
90
90
  destructiveHint: false,
91
91
  idempotentHint: true,
92
92
  };
93
- export async function handler(params, extra) {
93
+ export async function handler(args, extra) {
94
94
  try {
95
- const endpoint = `/collections/${params.collectionId}/public-documentations`;
95
+ const endpoint = `/collections/${args.collectionId}/public-documentations`;
96
96
  const query = new URLSearchParams();
97
97
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
98
98
  const bodyPayload = {};
99
- if (params.environmentUid !== undefined)
100
- bodyPayload.environmentUid = params.environmentUid;
101
- if (params.customColor !== undefined)
102
- bodyPayload.customColor = params.customColor;
103
- if (params.documentationLayout !== undefined)
104
- bodyPayload.documentationLayout = params.documentationLayout;
105
- if (params.customization !== undefined)
106
- bodyPayload.customization = params.customization;
99
+ if (args.environmentUid !== undefined)
100
+ bodyPayload.environmentUid = args.environmentUid;
101
+ if (args.customColor !== undefined)
102
+ bodyPayload.customColor = args.customColor;
103
+ if (args.documentationLayout !== undefined)
104
+ bodyPayload.documentationLayout = args.documentationLayout;
105
+ if (args.customization !== undefined)
106
+ bodyPayload.customization = args.customization;
107
107
  const options = {
108
108
  body: JSON.stringify(bodyPayload),
109
109
  contentType: ContentType.Json,
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
2
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
3
3
  function asMcpError(error) {
4
4
  const cause = error?.cause ?? String(error);
5
5
  return new McpError(ErrorCode.InternalError, cause);
@@ -13,9 +13,9 @@ export const annotations = {
13
13
  destructiveHint: false,
14
14
  idempotentHint: false,
15
15
  };
16
- export async function handler(params, extra) {
16
+ export async function handler(args, extra) {
17
17
  try {
18
- const endpoint = `/mocks/${params.mockId}/publish`;
18
+ const endpoint = `/mocks/${args.mockId}/publish`;
19
19
  const query = new URLSearchParams();
20
20
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
21
21
  const options = {
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
2
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
3
3
  function asMcpError(error) {
4
4
  const cause = error?.cause ?? String(error);
5
5
  return new McpError(ErrorCode.InternalError, cause);
@@ -13,9 +13,9 @@ export const annotations = {
13
13
  destructiveHint: false,
14
14
  idempotentHint: true,
15
15
  };
16
- export async function handler(params, extra) {
16
+ export async function handler(args, extra) {
17
17
  try {
18
- const endpoint = `/collections/${params.collectionId}/pulls`;
18
+ const endpoint = `/collections/${args.collectionId}/pulls`;
19
19
  const query = new URLSearchParams();
20
20
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
21
21
  const options = {
@@ -6,7 +6,7 @@ function asMcpError(error) {
6
6
  return new McpError(ErrorCode.InternalError, cause);
7
7
  }
8
8
  export const method = 'putCollection';
9
- export const description = "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n> The maximum collection size this endpoint accepts cannot exceed 100 MB.\n\nFor a complete list of available property values for this endpoint, use the following references available in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html):\n- \\`info\\` object — Refer to the **Information** entry.\n- \\`item\\` object — Refer to the **Items** entry.\n- For all other possible values, refer to the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n\n**Note:**\n\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n";
9
+ export const description = "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n**Note:**\n\n- The maximum collection size this endpoint accepts cannot exceed 100 MB.\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n";
10
10
  export const parameters = z.object({
11
11
  collectionId: z
12
12
  .string()
@@ -60,16 +60,16 @@ export const parameters = z.object({
60
60
  key: z.string().describe("The variable's key (name).").optional(),
61
61
  description: z
62
62
  .string()
63
- .describe("The variable's description. Doesn't apply to collection-level variables.")
63
+ .max(512)
64
+ .describe("The variable's description.")
64
65
  .optional(),
65
- value: z.string().describe("The key's value.").optional(),
66
- type: z
67
- .enum(['string', 'boolean', 'integer'])
68
- .describe("The variable's type.")
66
+ value: z
67
+ .union([z.string(), z.boolean(), z.number().int()])
68
+ .describe("The key's value.")
69
69
  .optional(),
70
70
  disabled: z
71
71
  .boolean()
72
- .describe('If true, the variable is not enabled. Applies only to query parameter variables.')
72
+ .describe("If true, the variable is not enabled. Doesn't apply to path parameter variables.")
73
73
  .default(false),
74
74
  })
75
75
  .describe('Information about the variable.'))
@@ -581,18 +581,14 @@ export const parameters = z.object({
581
581
  .describe("The variable's ID. Doesn't apply to collection-level variables.")
582
582
  .optional(),
583
583
  key: z.string().describe("The variable's key (name).").optional(),
584
- description: z
585
- .string()
586
- .describe("The variable's description. Doesn't apply to collection-level variables.")
587
- .optional(),
588
- value: z.string().describe("The key's value.").optional(),
589
- type: z
590
- .enum(['string', 'boolean', 'integer'])
591
- .describe("The variable's type.")
584
+ description: z.string().max(512).describe("The variable's description.").optional(),
585
+ value: z
586
+ .union([z.string(), z.boolean(), z.number().int()])
587
+ .describe("The key's value.")
592
588
  .optional(),
593
589
  disabled: z
594
590
  .boolean()
595
- .describe('If true, the variable is not enabled. Applies only to query parameter variables.')
591
+ .describe("If true, the variable is not enabled. Doesn't apply to path parameter variables.")
596
592
  .default(false),
597
593
  })
598
594
  .describe('Information about the variable.'))
@@ -881,7 +877,7 @@ export const parameters = z.object({
881
877
  .optional(),
882
878
  });
883
879
  export const annotations = {
884
- title: "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n> The maximum collection size this endpoint accepts cannot exceed 100 MB.\n\nFor a complete list of available property values for this endpoint, use the following references available in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html):\n- \\`info\\` object — Refer to the **Information** entry.\n- \\`item\\` object — Refer to the **Items** entry.\n- For all other possible values, refer to the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n\n**Note:**\n\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n",
880
+ title: "Replaces the contents of a collection using the [Postman Collection v2.1.0 schema format](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html). Include the collection's ID values in the request body. If you do not, the endpoint removes the existing items and creates new items.\n\nTo perform an update asynchronously, use the \\`Prefer\\` header with the \\`respond-async\\` value. When performing an async update, this endpoint returns a HTTP \\`202 Accepted\\` response.\n\n**Note:**\n\n- The maximum collection size this endpoint accepts cannot exceed 100 MB.\n- If you don't include the collection items' ID values from the request body, the endpoint **removes** the existing items and recreates the items with new ID values.\n- To copy another collection's contents to the given collection, remove all ID values before you pass it in this endpoint. If you do not, this endpoint returns an error. These values include the \\`id\\`, \\`uid\\`, and \\`postman_id\\` values.\n- For protocol profile behavior, refer to Postman's [Protocol Profile Behavior documentation](https://github.com/postmanlabs/postman-runtime/blob/develop/docs/protocol-profile-behavior.md).\n",
885
881
  readOnlyHint: false,
886
882
  destructiveHint: false,
887
883
  idempotentHint: true,
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ContentType } from '../clients/postman.js';
3
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
3
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
4
4
  function asMcpError(error) {
5
5
  const cause = error?.cause ?? String(error);
6
6
  return new McpError(ErrorCode.InternalError, cause);
@@ -37,14 +37,14 @@ export const annotations = {
37
37
  destructiveHint: false,
38
38
  idempotentHint: true,
39
39
  };
40
- export async function handler(params, extra) {
40
+ export async function handler(args, extra) {
41
41
  try {
42
- const endpoint = `/environments/${params.environmentId}`;
42
+ const endpoint = `/environments/${args.environmentId}`;
43
43
  const query = new URLSearchParams();
44
44
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
45
45
  const bodyPayload = {};
46
- if (params.environment !== undefined)
47
- bodyPayload.environment = params.environment;
46
+ if (args.environment !== undefined)
47
+ bodyPayload.environment = args.environment;
48
48
  const options = {
49
49
  body: JSON.stringify(bodyPayload),
50
50
  contentType: ContentType.Json,
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
2
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
3
3
  function asMcpError(error) {
4
4
  const cause = error?.cause ?? String(error);
5
5
  return new McpError(ErrorCode.InternalError, cause);
@@ -15,9 +15,9 @@ export const annotations = {
15
15
  destructiveHint: false,
16
16
  idempotentHint: false,
17
17
  };
18
- export async function handler(params, extra) {
18
+ export async function handler(args, extra) {
19
19
  try {
20
- const endpoint = `/comments-resolutions/${params.threadId}`;
20
+ const endpoint = `/comments-resolutions/${args.threadId}`;
21
21
  const query = new URLSearchParams();
22
22
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
23
23
  const options = {
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
2
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
3
3
  function asMcpError(error) {
4
4
  const cause = error?.cause ?? String(error);
5
5
  return new McpError(ErrorCode.InternalError, cause);
@@ -19,12 +19,12 @@ export const annotations = {
19
19
  destructiveHint: false,
20
20
  idempotentHint: false,
21
21
  };
22
- export async function handler(params, extra) {
22
+ export async function handler(args, extra) {
23
23
  try {
24
- const endpoint = `/monitors/${params.monitorId}/run`;
24
+ const endpoint = `/monitors/${args.monitorId}/run`;
25
25
  const query = new URLSearchParams();
26
- if (params.async !== undefined)
27
- query.set('async', String(params.async));
26
+ if (args.async !== undefined)
27
+ query.set('async', String(args.async));
28
28
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
29
29
  const options = {
30
30
  headers: extra.headers,
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
2
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
3
3
  function asMcpError(error) {
4
4
  const cause = error?.cause ?? String(error);
5
5
  return new McpError(ErrorCode.InternalError, cause);
@@ -16,12 +16,12 @@ export const annotations = {
16
16
  destructiveHint: false,
17
17
  idempotentHint: true,
18
18
  };
19
- export async function handler(params, extra) {
19
+ export async function handler(args, extra) {
20
20
  try {
21
- const endpoint = `/collections/${params.collectionUid}/synchronizations`;
21
+ const endpoint = `/collections/${args.collectionUid}/synchronizations`;
22
22
  const query = new URLSearchParams();
23
- if (params.specId !== undefined)
24
- query.set('specId', String(params.specId));
23
+ if (args.specId !== undefined)
24
+ query.set('specId', String(args.specId));
25
25
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
26
26
  const options = {
27
27
  headers: extra.headers,
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
2
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
3
3
  function asMcpError(error) {
4
4
  const cause = error?.cause ?? String(error);
5
5
  return new McpError(ErrorCode.InternalError, cause);
@@ -16,12 +16,12 @@ export const annotations = {
16
16
  destructiveHint: false,
17
17
  idempotentHint: true,
18
18
  };
19
- export async function handler(params, extra) {
19
+ export async function handler(args, extra) {
20
20
  try {
21
- const endpoint = `/specs/${params.specId}/synchronizations`;
21
+ const endpoint = `/specs/${args.specId}/synchronizations`;
22
22
  const query = new URLSearchParams();
23
- if (params.collectionUid !== undefined)
24
- query.set('collectionUid', String(params.collectionUid));
23
+ if (args.collectionUid !== undefined)
24
+ query.set('collectionUid', String(args.collectionUid));
25
25
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
26
26
  const options = {
27
27
  headers: extra.headers,
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ContentType } from '../clients/postman.js';
3
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
3
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
4
4
  function asMcpError(error) {
5
5
  const cause = error?.cause ?? String(error);
6
6
  return new McpError(ErrorCode.InternalError, cause);
@@ -45,20 +45,20 @@ export const annotations = {
45
45
  destructiveHint: false,
46
46
  idempotentHint: false,
47
47
  };
48
- export async function handler(params, extra) {
48
+ export async function handler(args, extra) {
49
49
  try {
50
50
  const endpoint = `/collection-folders-transfers`;
51
51
  const query = new URLSearchParams();
52
52
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
53
53
  const bodyPayload = {};
54
- if (params.ids !== undefined)
55
- bodyPayload.ids = params.ids;
56
- if (params.mode !== undefined)
57
- bodyPayload.mode = params.mode;
58
- if (params.target !== undefined)
59
- bodyPayload.target = params.target;
60
- if (params.location !== undefined)
61
- bodyPayload.location = params.location;
54
+ if (args.ids !== undefined)
55
+ bodyPayload.ids = args.ids;
56
+ if (args.mode !== undefined)
57
+ bodyPayload.mode = args.mode;
58
+ if (args.target !== undefined)
59
+ bodyPayload.target = args.target;
60
+ if (args.location !== undefined)
61
+ bodyPayload.location = args.location;
62
62
  const options = {
63
63
  body: JSON.stringify(bodyPayload),
64
64
  contentType: ContentType.Json,
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ContentType } from '../clients/postman.js';
3
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
3
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
4
4
  function asMcpError(error) {
5
5
  const cause = error?.cause ?? String(error);
6
6
  return new McpError(ErrorCode.InternalError, cause);
@@ -45,20 +45,20 @@ export const annotations = {
45
45
  destructiveHint: false,
46
46
  idempotentHint: false,
47
47
  };
48
- export async function handler(params, extra) {
48
+ export async function handler(args, extra) {
49
49
  try {
50
50
  const endpoint = `/collection-requests-transfers`;
51
51
  const query = new URLSearchParams();
52
52
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
53
53
  const bodyPayload = {};
54
- if (params.ids !== undefined)
55
- bodyPayload.ids = params.ids;
56
- if (params.mode !== undefined)
57
- bodyPayload.mode = params.mode;
58
- if (params.target !== undefined)
59
- bodyPayload.target = params.target;
60
- if (params.location !== undefined)
61
- bodyPayload.location = params.location;
54
+ if (args.ids !== undefined)
55
+ bodyPayload.ids = args.ids;
56
+ if (args.mode !== undefined)
57
+ bodyPayload.mode = args.mode;
58
+ if (args.target !== undefined)
59
+ bodyPayload.target = args.target;
60
+ if (args.location !== undefined)
61
+ bodyPayload.location = args.location;
62
62
  const options = {
63
63
  body: JSON.stringify(bodyPayload),
64
64
  contentType: ContentType.Json,
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ContentType } from '../clients/postman.js';
3
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
3
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
4
4
  function asMcpError(error) {
5
5
  const cause = error?.cause ?? String(error);
6
6
  return new McpError(ErrorCode.InternalError, cause);
@@ -45,20 +45,20 @@ export const annotations = {
45
45
  destructiveHint: false,
46
46
  idempotentHint: false,
47
47
  };
48
- export async function handler(params, extra) {
48
+ export async function handler(args, extra) {
49
49
  try {
50
50
  const endpoint = `/collection-responses-transfers`;
51
51
  const query = new URLSearchParams();
52
52
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
53
53
  const bodyPayload = {};
54
- if (params.ids !== undefined)
55
- bodyPayload.ids = params.ids;
56
- if (params.mode !== undefined)
57
- bodyPayload.mode = params.mode;
58
- if (params.target !== undefined)
59
- bodyPayload.target = params.target;
60
- if (params.location !== undefined)
61
- bodyPayload.location = params.location;
54
+ if (args.ids !== undefined)
55
+ bodyPayload.ids = args.ids;
56
+ if (args.mode !== undefined)
57
+ bodyPayload.mode = args.mode;
58
+ if (args.target !== undefined)
59
+ bodyPayload.target = args.target;
60
+ if (args.location !== undefined)
61
+ bodyPayload.location = args.location;
62
62
  const options = {
63
63
  body: JSON.stringify(bodyPayload),
64
64
  contentType: ContentType.Json,
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
2
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
3
3
  function asMcpError(error) {
4
4
  const cause = error?.cause ?? String(error);
5
5
  return new McpError(ErrorCode.InternalError, cause);
@@ -15,9 +15,9 @@ export const annotations = {
15
15
  destructiveHint: true,
16
16
  idempotentHint: true,
17
17
  };
18
- export async function handler(params, extra) {
18
+ export async function handler(args, extra) {
19
19
  try {
20
- const endpoint = `/collections/${params.collectionId}/public-documentations`;
20
+ const endpoint = `/collections/${args.collectionId}/public-documentations`;
21
21
  const query = new URLSearchParams();
22
22
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
23
23
  const options = {
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
2
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
3
3
  function asMcpError(error) {
4
4
  const cause = error?.cause ?? String(error);
5
5
  return new McpError(ErrorCode.InternalError, cause);
@@ -13,9 +13,9 @@ export const annotations = {
13
13
  destructiveHint: true,
14
14
  idempotentHint: true,
15
15
  };
16
- export async function handler(params, extra) {
16
+ export async function handler(args, extra) {
17
17
  try {
18
- const endpoint = `/mocks/${params.mockId}/unpublish`;
18
+ const endpoint = `/mocks/${args.mockId}/unpublish`;
19
19
  const query = new URLSearchParams();
20
20
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
21
21
  const options = {
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ContentType } from '../clients/postman.js';
3
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
3
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
4
4
  function asMcpError(error) {
5
5
  const cause = error?.cause ?? String(error);
6
6
  return new McpError(ErrorCode.InternalError, cause);
@@ -31,16 +31,16 @@ export const annotations = {
31
31
  destructiveHint: false,
32
32
  idempotentHint: true,
33
33
  };
34
- export async function handler(params, extra) {
34
+ export async function handler(args, extra) {
35
35
  try {
36
- const endpoint = `/apis/${params.apiId}/collections/${params.collectionId}/comments/${params.commentId}`;
36
+ const endpoint = `/apis/${args.apiId}/collections/${args.collectionId}/comments/${args.commentId}`;
37
37
  const query = new URLSearchParams();
38
38
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
39
39
  const bodyPayload = {};
40
- if (params.body !== undefined)
41
- bodyPayload.body = params.body;
42
- if (params.tags !== undefined)
43
- bodyPayload.tags = params.tags;
40
+ if (args.body !== undefined)
41
+ bodyPayload.body = args.body;
42
+ if (args.tags !== undefined)
43
+ bodyPayload.tags = args.tags;
44
44
  const options = {
45
45
  body: JSON.stringify(bodyPayload),
46
46
  contentType: ContentType.Json,
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ContentType } from '../clients/postman.js';
3
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
3
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
4
4
  function asMcpError(error) {
5
5
  const cause = error?.cause ?? String(error);
6
6
  return new McpError(ErrorCode.InternalError, cause);
@@ -30,16 +30,16 @@ export const annotations = {
30
30
  destructiveHint: false,
31
31
  idempotentHint: true,
32
32
  };
33
- export async function handler(params, extra) {
33
+ export async function handler(args, extra) {
34
34
  try {
35
- const endpoint = `/collections/${params.collectionId}/comments/${params.commentId}`;
35
+ const endpoint = `/collections/${args.collectionId}/comments/${args.commentId}`;
36
36
  const query = new URLSearchParams();
37
37
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
38
38
  const bodyPayload = {};
39
- if (params.body !== undefined)
40
- bodyPayload.body = params.body;
41
- if (params.tags !== undefined)
42
- bodyPayload.tags = params.tags;
39
+ if (args.body !== undefined)
40
+ bodyPayload.body = args.body;
41
+ if (args.tags !== undefined)
42
+ bodyPayload.tags = args.tags;
43
43
  const options = {
44
44
  body: JSON.stringify(bodyPayload),
45
45
  contentType: ContentType.Json,
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ContentType } from '../clients/postman.js';
3
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
3
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
4
4
  function asMcpError(error) {
5
5
  const cause = error?.cause ?? String(error);
6
6
  return new McpError(ErrorCode.InternalError, cause);
@@ -19,16 +19,16 @@ export const annotations = {
19
19
  destructiveHint: false,
20
20
  idempotentHint: true,
21
21
  };
22
- export async function handler(params, extra) {
22
+ export async function handler(args, extra) {
23
23
  try {
24
- const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}`;
24
+ const endpoint = `/collections/${args.collectionId}/folders/${args.folderId}`;
25
25
  const query = new URLSearchParams();
26
26
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
27
27
  const bodyPayload = {};
28
- if (params.name !== undefined)
29
- bodyPayload.name = params.name;
30
- if (params.description !== undefined)
31
- bodyPayload.description = params.description;
28
+ if (args.name !== undefined)
29
+ bodyPayload.name = args.name;
30
+ if (args.description !== undefined)
31
+ bodyPayload.description = args.description;
32
32
  const options = {
33
33
  body: JSON.stringify(bodyPayload),
34
34
  contentType: ContentType.Json,
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { ContentType } from '../clients/postman.js';
3
- import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
3
+ import { McpError, ErrorCode, } from '@modelcontextprotocol/sdk/types.js';
4
4
  function asMcpError(error) {
5
5
  const cause = error?.cause ?? String(error);
6
6
  return new McpError(ErrorCode.InternalError, cause);
@@ -38,16 +38,16 @@ export const annotations = {
38
38
  destructiveHint: false,
39
39
  idempotentHint: true,
40
40
  };
41
- export async function handler(params, extra) {
41
+ export async function handler(args, extra) {
42
42
  try {
43
- const endpoint = `/collections/${params.collectionId}/requests/${params.requestId}`;
43
+ const endpoint = `/collections/${args.collectionId}/requests/${args.requestId}`;
44
44
  const query = new URLSearchParams();
45
45
  const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
46
46
  const bodyPayload = {};
47
- if (params.name !== undefined)
48
- bodyPayload.name = params.name;
49
- if (params.method !== undefined)
50
- bodyPayload.method = params.method;
47
+ if (args.name !== undefined)
48
+ bodyPayload.name = args.name;
49
+ if (args.method !== undefined)
50
+ bodyPayload.method = args.method;
51
51
  const options = {
52
52
  body: JSON.stringify(bodyPayload),
53
53
  contentType: ContentType.Json,