@postman/postman-mcp-server 2.6.1 → 2.7.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.
- package/README.md +204 -80
- package/dist/package.json +2 -1
- package/dist/src/enabledResources.js +3 -0
- package/dist/src/index.js +11 -0
- package/dist/src/tools/createCollection.js +1 -1
- package/dist/src/tools/createCollectionComment.js +1 -1
- package/dist/src/tools/createCollectionFolder.js +1 -1
- package/dist/src/tools/createCollectionRequest.js +1 -1
- package/dist/src/tools/createCollectionResponse.js +1 -1
- package/dist/src/tools/createEnvironment.js +1 -1
- package/dist/src/tools/createFolderComment.js +1 -1
- package/dist/src/tools/createMock.js +1 -1
- package/dist/src/tools/createMonitor.js +1 -1
- package/dist/src/tools/createRequestComment.js +1 -1
- package/dist/src/tools/createResponseComment.js +1 -1
- package/dist/src/tools/createSpec.js +1 -1
- package/dist/src/tools/createSpecFile.js +1 -1
- package/dist/src/tools/createWorkspace.js +1 -1
- package/dist/src/tools/deleteApiCollectionComment.js +1 -1
- package/dist/src/tools/deleteCollectionComment.js +1 -1
- package/dist/src/tools/deleteFolderComment.js +1 -1
- package/dist/src/tools/deleteMock.js +1 -1
- package/dist/src/tools/deletePanElementOrFolder.js +1 -1
- package/dist/src/tools/deleteRequestComment.js +1 -1
- package/dist/src/tools/deleteResponseComment.js +1 -1
- package/dist/src/tools/deleteWorkspace.js +1 -1
- package/dist/src/tools/duplicateCollection.js +1 -1
- package/dist/src/tools/generateCollection.js +1 -1
- package/dist/src/tools/getAllElementsAndFolders.js +1 -1
- package/dist/src/tools/getAuthenticatedUser.js +1 -1
- package/dist/src/tools/getCodeGenerationInstructions.js +6 -6
- package/dist/src/tools/getMock.js +1 -1
- package/dist/src/tools/getMocks.js +1 -1
- package/dist/src/tools/getSourceCollectionStatus.js +1 -1
- package/dist/src/tools/getTaggedEntities.js +1 -1
- package/dist/src/tools/getWorkspace.js +1 -1
- package/dist/src/tools/getWorkspaces.js +1 -1
- package/dist/src/tools/mergeCollectionFork.js +1 -1
- package/dist/src/tools/patchCollection.js +1 -1
- package/dist/src/tools/patchEnvironment.js +1 -1
- package/dist/src/tools/postPanElementOrFolder.js +1 -1
- package/dist/src/tools/publishDocumentation.js +1 -1
- package/dist/src/tools/pullCollectionChanges.js +1 -1
- package/dist/src/tools/putCollection.js +1 -1
- package/dist/src/tools/putEnvironment.js +1 -1
- package/dist/src/tools/resolveCommentThread.js +1 -1
- package/dist/src/tools/runMonitor.js +1 -1
- package/dist/src/tools/searchPostmanElements.js +38 -6
- package/dist/src/tools/syncCollectionWithSpec.js +1 -1
- package/dist/src/tools/syncSpecWithCollection.js +1 -1
- package/dist/src/tools/updateApiCollectionComment.js +1 -1
- package/dist/src/tools/updateCollectionComment.js +1 -1
- package/dist/src/tools/updateCollectionFolder.js +1 -1
- package/dist/src/tools/updateCollectionRequest.js +1 -1
- package/dist/src/tools/updateCollectionResponse.js +1 -1
- package/dist/src/tools/updateFolderComment.js +1 -1
- package/dist/src/tools/updateMock.js +1 -1
- package/dist/src/tools/updatePanElementOrFolder.js +1 -1
- package/dist/src/tools/updateRequestComment.js +1 -1
- package/dist/src/tools/updateResponseComment.js +1 -1
- package/dist/src/tools/updateSpecFile.js +1 -1
- package/dist/src/tools/updateWorkspace.js +1 -1
- package/dist/src/tools/utils/templateRenderer.js +23 -0
- package/dist/src/views/getCollections.njk +12 -0
- package/dist/src/views/getWorkspaces.njk +6 -0
- package/package.json +2 -1
|
@@ -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
|
|
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
|
|
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:
|
|
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
|
|
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,
|
|
@@ -26,7 +26,7 @@ export const parameters = z.object({
|
|
|
26
26
|
.describe("A list of the specification's files and their contents."),
|
|
27
27
|
});
|
|
28
28
|
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
|
|
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.",
|
|
30
30
|
readOnlyHint: false,
|
|
31
31
|
destructiveHint: false,
|
|
32
32
|
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
|
|
12
|
+
title: 'Creates an API specification file.',
|
|
13
13
|
readOnlyHint: false,
|
|
14
14
|
destructiveHint: false,
|
|
15
15
|
idempotentHint: false,
|
|
@@ -17,7 +17,7 @@ export const parameters = z.object({
|
|
|
17
17
|
.optional(),
|
|
18
18
|
});
|
|
19
19
|
export const annotations = {
|
|
20
|
-
title: 'Creates a new [workspace](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/)
|
|
20
|
+
title: 'Creates a new [workspace](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/creating-workspaces/).',
|
|
21
21
|
readOnlyHint: false,
|
|
22
22
|
destructiveHint: false,
|
|
23
23
|
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
|
|
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
|
|
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
|
|
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
|
|
7
|
+
title: 'Deletes a mock server.',
|
|
8
8
|
readOnlyHint: false,
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
idempotentHint: true,
|
|
@@ -9,7 +9,7 @@ export const parameters = z.object({
|
|
|
9
9
|
elementType: z.enum(['api', 'folder', 'collection', 'workspace']).describe('The element type.'),
|
|
10
10
|
});
|
|
11
11
|
export const annotations = {
|
|
12
|
-
title: "Removes an element or delete a folder from your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/)
|
|
12
|
+
title: "Removes an element or delete a folder from your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/).",
|
|
13
13
|
readOnlyHint: false,
|
|
14
14
|
destructiveHint: true,
|
|
15
15
|
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 request. On success, this returns an HTTP \\`204 No Content\\` response
|
|
11
|
+
title: 'Deletes a comment from a request. On success, this returns an HTTP \\`204 No Content\\` response.',
|
|
12
12
|
readOnlyHint: false,
|
|
13
13
|
destructiveHint: true,
|
|
14
14
|
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 response. On success, this returns an HTTP \\`204 No Content\\` response
|
|
11
|
+
title: 'Deletes a comment from a response. 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 = 'deleteWorkspace';
|
|
|
4
4
|
export const description = 'Deletes an existing workspace.\n\n### Important\n\nIf you delete a workspace that has a linked collection or environment with another workspace, this will delete the collection and environment in all workspaces.\n';
|
|
5
5
|
export const parameters = z.object({ workspaceId: z.string().describe("The workspace's ID.") });
|
|
6
6
|
export const annotations = {
|
|
7
|
-
title: 'Deletes an existing workspace
|
|
7
|
+
title: 'Deletes an existing workspace.',
|
|
8
8
|
readOnlyHint: false,
|
|
9
9
|
destructiveHint: true,
|
|
10
10
|
idempotentHint: true,
|
|
@@ -12,7 +12,7 @@ export const parameters = z.object({
|
|
|
12
12
|
.optional(),
|
|
13
13
|
});
|
|
14
14
|
export const annotations = {
|
|
15
|
-
title:
|
|
15
|
+
title: 'Creates a duplicate of the given collection in another workspace.',
|
|
16
16
|
readOnlyHint: false,
|
|
17
17
|
destructiveHint: false,
|
|
18
18
|
idempotentHint: false,
|
|
@@ -54,7 +54,7 @@ export const parameters = z.object({
|
|
|
54
54
|
.default({ enableOptionalParameters: true, folderStrategy: 'Paths' }),
|
|
55
55
|
});
|
|
56
56
|
export const annotations = {
|
|
57
|
-
title: 'Creates a collection from the given API specification
|
|
57
|
+
title: 'Creates a collection from the given API specification.',
|
|
58
58
|
readOnlyHint: false,
|
|
59
59
|
destructiveHint: false,
|
|
60
60
|
idempotentHint: false,
|
|
@@ -64,7 +64,7 @@ export const parameters = z.object({
|
|
|
64
64
|
.optional(),
|
|
65
65
|
});
|
|
66
66
|
export const annotations = {
|
|
67
|
-
title: "Gets information about the folders and their elements added to your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/)
|
|
67
|
+
title: "Gets information about the folders and their elements added to your team's [Private API Network](https://learning.postman.com/docs/collaborating-in-postman/adding-private-network/).",
|
|
68
68
|
readOnlyHint: true,
|
|
69
69
|
destructiveHint: false,
|
|
70
70
|
idempotentHint: true,
|
|
@@ -4,7 +4,7 @@ export const method = 'getAuthenticatedUser';
|
|
|
4
4
|
export const description = 'Gets information about the authenticated user.\n- This endpoint provides “current user” context (\\`user.id\\`, \\`username\\`, \\`teamId\\`, roles).\n- When a user asks for “my …” (e.g., “my workspaces, my information, etc.”), call this first to resolve the user ID.\n';
|
|
5
5
|
export const parameters = z.object({});
|
|
6
6
|
export const annotations = {
|
|
7
|
-
title: 'Gets information about the authenticated user
|
|
7
|
+
title: 'Gets information about the authenticated user.',
|
|
8
8
|
readOnlyHint: true,
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
idempotentHint: true,
|
|
@@ -48,7 +48,7 @@ First, locate the collection the user wants to work with. Determine whether the
|
|
|
48
48
|
|
|
49
49
|
Use \`searchPostmanElements\` to find public API collections:
|
|
50
50
|
|
|
51
|
-
- \`searchPostmanElements(q, entityType:
|
|
51
|
+
- \`searchPostmanElements(q, entityType: collections)\` - Search for public collections. E.g. if the user says "find the Stripe API and build a demo" then call this tool with the query "stripe" and entityType "collections". Review the collection(s) returned and select the best match. If multiple collections look viable, ask the user which one to use.
|
|
52
52
|
|
|
53
53
|
### For Internal APIs
|
|
54
54
|
|
|
@@ -250,10 +250,10 @@ JavaScript/TypeScript:
|
|
|
250
250
|
\`\`\`javascript
|
|
251
251
|
/**
|
|
252
252
|
* Generated by Postman Code
|
|
253
|
-
*
|
|
253
|
+
*
|
|
254
254
|
* Collection: Stripe API
|
|
255
255
|
* Collection UID: 12345678-1234-1234-1234-123456789abc
|
|
256
|
-
*
|
|
256
|
+
*
|
|
257
257
|
* Request: Payment Intents > Create Payment Intent
|
|
258
258
|
* Request UID: 87654321-4321-4321-4321-cba987654321
|
|
259
259
|
* Request modified at: 2024-11-10T15:45:30.000Z
|
|
@@ -337,15 +337,15 @@ switch (response.status) {
|
|
|
337
337
|
case 404:
|
|
338
338
|
console.error('Resource not found');
|
|
339
339
|
throw new NotFoundError(await response.json());
|
|
340
|
-
|
|
340
|
+
|
|
341
341
|
case 401:
|
|
342
342
|
console.error('Authentication failed');
|
|
343
343
|
throw new UnauthorizedError(await response.json());
|
|
344
|
-
|
|
344
|
+
|
|
345
345
|
case 422:
|
|
346
346
|
console.error('Validation failed');
|
|
347
347
|
throw new ValidationError(await response.json());
|
|
348
|
-
|
|
348
|
+
|
|
349
349
|
default:
|
|
350
350
|
console.error('Unexpected error');
|
|
351
351
|
throw new Error(await response.text());
|
|
@@ -4,7 +4,7 @@ export const method = 'getMock';
|
|
|
4
4
|
export const description = 'Gets information about a mock server.\n- Resource: Mock server entity. Response includes the associated \\`collection\\` UID and \\`mockUrl\\`.\n- Use the \\`collection\\` UID to navigate back to the source collection.\n';
|
|
5
5
|
export const parameters = z.object({ mockId: z.string().describe("The mock's ID.") });
|
|
6
6
|
export const annotations = {
|
|
7
|
-
title: 'Gets information about a mock server
|
|
7
|
+
title: 'Gets information about a mock server.',
|
|
8
8
|
readOnlyHint: true,
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
idempotentHint: true,
|
|
@@ -13,7 +13,7 @@ export const parameters = z.object({
|
|
|
13
13
|
.optional(),
|
|
14
14
|
});
|
|
15
15
|
export const annotations = {
|
|
16
|
-
title: 'Gets all active mock servers. By default, returns only mock servers you created across all workspaces
|
|
16
|
+
title: 'Gets all active mock servers. By default, returns only mock servers you created across all workspaces.',
|
|
17
17
|
readOnlyHint: true,
|
|
18
18
|
destructiveHint: false,
|
|
19
19
|
idempotentHint: true,
|
|
@@ -4,7 +4,7 @@ export const method = 'getSourceCollectionStatus';
|
|
|
4
4
|
export const description = 'Checks whether there is a change between the forked collection and its parent (source) collection.\n\nIf the value of the \\`isSourceAhead\\` property is \\`true\\` in the response, then there is a difference between the forked collection and its source collection.\n\n**Note:**\n\nThis endpoint may take a few minutes to return an updated \\`isSourceAhead\\` status.\n';
|
|
5
5
|
export const parameters = z.object({ collectionId: z.string().describe("The collection's ID.") });
|
|
6
6
|
export const annotations = {
|
|
7
|
-
title: 'Checks whether there is a change between the forked collection and its parent (source) collection
|
|
7
|
+
title: 'Checks whether there is a change between the forked collection and its parent (source) collection.',
|
|
8
8
|
readOnlyHint: true,
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
idempotentHint: true,
|
|
@@ -29,7 +29,7 @@ export const parameters = z.object({
|
|
|
29
29
|
.optional(),
|
|
30
30
|
});
|
|
31
31
|
export const annotations = {
|
|
32
|
-
title: 'Gets Postman elements (entities) by a given tag. Tags enable you to organize and search [workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/managing-workspaces/#tagging-a-workspace), [APIs](https://learning.postman.com/docs/designing-and-developing-your-api/managing-apis/#tagging-apis), and [collections](https://learning.postman.com/docs/collections/using-collections/#tagging-a-collection) that contain shared tags
|
|
32
|
+
title: 'Gets Postman elements (entities) by a given tag. Tags enable you to organize and search [workspaces](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/managing-workspaces/#tagging-a-workspace), [APIs](https://learning.postman.com/docs/designing-and-developing-your-api/managing-apis/#tagging-apis), and [collections](https://learning.postman.com/docs/collections/using-collections/#tagging-a-collection) that contain shared tags.',
|
|
33
33
|
readOnlyHint: true,
|
|
34
34
|
destructiveHint: false,
|
|
35
35
|
idempotentHint: true,
|
|
@@ -10,7 +10,7 @@ export const parameters = z.object({
|
|
|
10
10
|
.optional(),
|
|
11
11
|
});
|
|
12
12
|
export const annotations = {
|
|
13
|
-
title:
|
|
13
|
+
title: 'Gets information about a workspace.',
|
|
14
14
|
readOnlyHint: true,
|
|
15
15
|
destructiveHint: false,
|
|
16
16
|
idempotentHint: true,
|
|
@@ -18,7 +18,7 @@ export const parameters = z.object({
|
|
|
18
18
|
.optional(),
|
|
19
19
|
});
|
|
20
20
|
export const annotations = {
|
|
21
|
-
title:
|
|
21
|
+
title: 'Gets all workspaces you have access to.',
|
|
22
22
|
readOnlyHint: true,
|
|
23
23
|
destructiveHint: false,
|
|
24
24
|
idempotentHint: true,
|
|
@@ -12,7 +12,7 @@ export const parameters = z.object({
|
|
|
12
12
|
.default('updateSourceWithDestination'),
|
|
13
13
|
});
|
|
14
14
|
export const annotations = {
|
|
15
|
-
title: '**This endpoint is deprecated
|
|
15
|
+
title: '**This endpoint is deprecated.**',
|
|
16
16
|
readOnlyHint: false,
|
|
17
17
|
destructiveHint: false,
|
|
18
18
|
idempotentHint: false,
|
|
@@ -279,7 +279,7 @@ export const parameters = z.object({
|
|
|
279
279
|
.optional(),
|
|
280
280
|
});
|
|
281
281
|
export const annotations = {
|
|
282
|
-
title: 'Updates specific collection information, such as its name, events, or its variables. For more information, see the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html)
|
|
282
|
+
title: 'Updates specific collection information, such as its name, events, or its variables. For more information, see the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).',
|
|
283
283
|
readOnlyHint: false,
|
|
284
284
|
destructiveHint: false,
|
|
285
285
|
idempotentHint: true,
|
|
@@ -47,7 +47,7 @@ export const parameters = z.object({
|
|
|
47
47
|
]),
|
|
48
48
|
});
|
|
49
49
|
export const annotations = {
|
|
50
|
-
title: 'Updates specific environment properties, such as its name and variables
|
|
50
|
+
title: 'Updates specific environment properties, such as its name and variables.',
|
|
51
51
|
readOnlyHint: false,
|
|
52
52
|
destructiveHint: false,
|
|
53
53
|
idempotentHint: true,
|
|
@@ -49,7 +49,7 @@ export const parameters = z.object({
|
|
|
49
49
|
]),
|
|
50
50
|
});
|
|
51
51
|
export const annotations = {
|
|
52
|
-
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
|
|
52
|
+
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.",
|
|
53
53
|
readOnlyHint: false,
|
|
54
54
|
destructiveHint: false,
|
|
55
55
|
idempotentHint: false,
|
|
@@ -81,7 +81,7 @@ export const parameters = z.object({
|
|
|
81
81
|
.describe("Information about the documentation's customization."),
|
|
82
82
|
});
|
|
83
83
|
export const annotations = {
|
|
84
|
-
title: "Publishes a collection's documentation. This makes it publicly available to anyone with the link to the documentation
|
|
84
|
+
title: "Publishes a collection's documentation. This makes it publicly available to anyone with the link to the documentation.",
|
|
85
85
|
readOnlyHint: false,
|
|
86
86
|
destructiveHint: false,
|
|
87
87
|
idempotentHint: true,
|
|
@@ -4,7 +4,7 @@ export const method = 'pullCollectionChanges';
|
|
|
4
4
|
export const description = "Pulls the changes from a parent (source) collection into the forked collection. In the endpoint's response:\n\n- The \\`destinationId\\` is the ID of the forked collection.\n- The \\`sourceId\\` is the ID of the source collection.\n";
|
|
5
5
|
export const parameters = z.object({ collectionId: z.string().describe("The collection's ID.") });
|
|
6
6
|
export const annotations = {
|
|
7
|
-
title: "Pulls the changes from a parent (source) collection into the forked collection. In the endpoint's response
|
|
7
|
+
title: "Pulls the changes from a parent (source) collection into the forked collection. In the endpoint's response:",
|
|
8
8
|
readOnlyHint: false,
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
idempotentHint: true,
|
|
@@ -877,7 +877,7 @@ export const parameters = z.object({
|
|
|
877
877
|
.optional(),
|
|
878
878
|
});
|
|
879
879
|
export const annotations = {
|
|
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
|
|
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.",
|
|
881
881
|
readOnlyHint: false,
|
|
882
882
|
destructiveHint: false,
|
|
883
883
|
idempotentHint: true,
|
|
@@ -28,7 +28,7 @@ export const parameters = z.object({
|
|
|
28
28
|
.optional(),
|
|
29
29
|
});
|
|
30
30
|
export const annotations = {
|
|
31
|
-
title: 'Replaces all the contents of an environment with the given information
|
|
31
|
+
title: 'Replaces all the contents of an environment with the given information.',
|
|
32
32
|
readOnlyHint: false,
|
|
33
33
|
destructiveHint: false,
|
|
34
34
|
idempotentHint: true,
|
|
@@ -6,7 +6,7 @@ export const parameters = z.object({
|
|
|
6
6
|
threadId: z.number().int().describe("The comment's thread ID."),
|
|
7
7
|
});
|
|
8
8
|
export const annotations = {
|
|
9
|
-
title: 'Resolves a comment and any associated replies. On success, this returns an HTTP \\`204 No Content\\` response
|
|
9
|
+
title: 'Resolves a comment and any associated replies. On success, this returns an HTTP \\`204 No Content\\` response.',
|
|
10
10
|
readOnlyHint: false,
|
|
11
11
|
destructiveHint: false,
|
|
12
12
|
idempotentHint: false,
|
|
@@ -10,7 +10,7 @@ export const parameters = z.object({
|
|
|
10
10
|
.default(false),
|
|
11
11
|
});
|
|
12
12
|
export const annotations = {
|
|
13
|
-
title:
|
|
13
|
+
title: 'Runs a monitor and returns its run results.',
|
|
14
14
|
readOnlyHint: false,
|
|
15
15
|
destructiveHint: false,
|
|
16
16
|
idempotentHint: false,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { asMcpError, McpError } from './utils/toolHelpers.js';
|
|
3
3
|
export const method = 'searchPostmanElements';
|
|
4
|
-
export const description = 'Searches for Postman elements in the public network.\n\n**When to Use This Tool:**\n- When the user asks for a specific named request (e.g., "find PayPal requests", "search for Stripe API requests")\n- When the user explicitly wants to search the public network\n- Do NOT use this for searching the user\'s own workspaces or collections (use getCollections or getWorkspaces instead)\n\n**Search Scope:**\n- Only searches the public network (public workspaces and collections)\n- Does not search private workspaces, team workspaces, or personal collections\n-
|
|
4
|
+
export const description = 'Searches for Postman elements in the public network.\n\n**When to Use This Tool:**\n- When the user asks for a specific named request (e.g., "find PayPal requests", "search for Stripe API requests")\n- When the user wants to find collections (e.g., "find Stripe collections", "search for payment API collections")\n- When the user explicitly wants to search the public network\n- Do NOT use this for searching the user\'s own workspaces or collections (use getCollections or getWorkspaces instead)\n\n**Search Scope:**\n- Only searches the public network (public workspaces and collections)\n- Does not search private workspaces, team workspaces, or personal collections\n\n**Entity Types:**\n- `requests`: Search for individual API requests\n- `collections`: Search for collections (unique collections extracted from request results; pagination applies to underlying requests)\n';
|
|
5
5
|
export const parameters = z.object({
|
|
6
6
|
entityType: z
|
|
7
|
-
.
|
|
8
|
-
.describe('The type of Postman [entity](https://learning.postman.com/docs/getting-started/basics/postman-elements/)
|
|
7
|
+
.enum(['requests', 'collections'])
|
|
8
|
+
.describe('The type of Postman [entity](https://learning.postman.com/docs/getting-started/basics/postman-elements/) to search for. Use `requests` to search for individual API requests, or `collections` to search for collections (unique collections extracted from request results; pagination applies to underlying requests).'),
|
|
9
9
|
q: z
|
|
10
10
|
.string()
|
|
11
11
|
.min(1)
|
|
@@ -29,14 +29,14 @@ export const parameters = z.object({
|
|
|
29
29
|
.default(10),
|
|
30
30
|
});
|
|
31
31
|
export const annotations = {
|
|
32
|
-
title: 'Searches for Postman elements in the public network
|
|
32
|
+
title: 'Searches for Postman elements in the public network.',
|
|
33
33
|
readOnlyHint: true,
|
|
34
34
|
destructiveHint: false,
|
|
35
35
|
idempotentHint: true,
|
|
36
36
|
};
|
|
37
37
|
export async function handler(args, extra) {
|
|
38
38
|
try {
|
|
39
|
-
const endpoint =
|
|
39
|
+
const endpoint = '/search/requests';
|
|
40
40
|
const query = new URLSearchParams();
|
|
41
41
|
if (args.q !== undefined)
|
|
42
42
|
query.set('q', String(args.q));
|
|
@@ -51,11 +51,43 @@ export async function handler(args, extra) {
|
|
|
51
51
|
headers: extra.headers,
|
|
52
52
|
};
|
|
53
53
|
const result = await extra.client.get(url, options);
|
|
54
|
+
if (args.entityType === 'collections') {
|
|
55
|
+
const collectionsMap = new Map();
|
|
56
|
+
const data = result?.data || [];
|
|
57
|
+
for (const item of data) {
|
|
58
|
+
if (!collectionsMap.has(item.collection.id)) {
|
|
59
|
+
collectionsMap.set(item.collection.id, {
|
|
60
|
+
collectionId: item.collection.id,
|
|
61
|
+
collectionName: item.collection.name,
|
|
62
|
+
workspaceId: item.workspace.id,
|
|
63
|
+
workspaceName: item.workspace.name,
|
|
64
|
+
publisher: item.publisher.name,
|
|
65
|
+
publisherVerified: item.publisher.isVerified,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const collections = Array.from(collectionsMap.values());
|
|
70
|
+
return {
|
|
71
|
+
content: [
|
|
72
|
+
{
|
|
73
|
+
type: 'text',
|
|
74
|
+
text: JSON.stringify({
|
|
75
|
+
data: collections,
|
|
76
|
+
meta: {
|
|
77
|
+
nextCursor: result?.meta?.nextCursor,
|
|
78
|
+
collectionsCount: collections.length,
|
|
79
|
+
note: 'Collections extracted from request results. Pagination applies to underlying requests.',
|
|
80
|
+
},
|
|
81
|
+
}, null, 2),
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
};
|
|
85
|
+
}
|
|
54
86
|
return {
|
|
55
87
|
content: [
|
|
56
88
|
{
|
|
57
89
|
type: 'text',
|
|
58
|
-
text:
|
|
90
|
+
text: typeof result === 'string' ? result : JSON.stringify(result, null, 2),
|
|
59
91
|
},
|
|
60
92
|
],
|
|
61
93
|
};
|
|
@@ -7,7 +7,7 @@ export const parameters = z.object({
|
|
|
7
7
|
specId: z.string().describe("The spec's ID."),
|
|
8
8
|
});
|
|
9
9
|
export const annotations = {
|
|
10
|
-
title: 'Syncs a collection generated from an API specification. This is an asynchronous endpoint that returns an HTTP \\`202 Accepted\\` response
|
|
10
|
+
title: 'Syncs a collection generated from an API specification. This is an asynchronous endpoint that returns an HTTP \\`202 Accepted\\` response.',
|
|
11
11
|
readOnlyHint: false,
|
|
12
12
|
destructiveHint: false,
|
|
13
13
|
idempotentHint: true,
|
|
@@ -7,7 +7,7 @@ export const parameters = z.object({
|
|
|
7
7
|
collectionUid: z.string().describe("The collection's unique ID."),
|
|
8
8
|
});
|
|
9
9
|
export const annotations = {
|
|
10
|
-
title: 'Syncs an API specification linked to a collection. This is an asynchronous endpoint that returns an HTTP \\`202 Accepted\\` response
|
|
10
|
+
title: 'Syncs an API specification linked to a collection. This is an asynchronous endpoint that returns an HTTP \\`202 Accepted\\` response.',
|
|
11
11
|
readOnlyHint: false,
|
|
12
12
|
destructiveHint: false,
|
|
13
13
|
idempotentHint: true,
|
|
@@ -22,7 +22,7 @@ export const parameters = z.object({
|
|
|
22
22
|
.optional(),
|
|
23
23
|
});
|
|
24
24
|
export const annotations = {
|
|
25
|
-
title: "Updates a comment on an API's collection
|
|
25
|
+
title: "Updates a comment on an API's collection.",
|
|
26
26
|
readOnlyHint: false,
|
|
27
27
|
destructiveHint: false,
|
|
28
28
|
idempotentHint: true,
|
|
@@ -21,7 +21,7 @@ export const parameters = z.object({
|
|
|
21
21
|
.optional(),
|
|
22
22
|
});
|
|
23
23
|
export const annotations = {
|
|
24
|
-
title: 'Updates a comment on a collection
|
|
24
|
+
title: 'Updates a comment on a collection.',
|
|
25
25
|
readOnlyHint: false,
|
|
26
26
|
destructiveHint: false,
|
|
27
27
|
idempotentHint: true,
|
|
@@ -10,7 +10,7 @@ export const parameters = z.object({
|
|
|
10
10
|
description: z.string().describe("The folder's description.").optional(),
|
|
11
11
|
});
|
|
12
12
|
export const annotations = {
|
|
13
|
-
title: 'Updates a folder in a collection. For a complete list of properties, refer to the **Folder** entry in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html)
|
|
13
|
+
title: 'Updates a folder in a collection. For a complete list of properties, refer to the **Folder** entry in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).',
|
|
14
14
|
readOnlyHint: false,
|
|
15
15
|
destructiveHint: false,
|
|
16
16
|
idempotentHint: true,
|
|
@@ -180,7 +180,7 @@ export const parameters = z.object({
|
|
|
180
180
|
.optional(),
|
|
181
181
|
});
|
|
182
182
|
export const annotations = {
|
|
183
|
-
title: 'Updates a request in a collection. For a complete list of properties, refer to the **Request** entry in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html)
|
|
183
|
+
title: 'Updates a request in a collection. For a complete list of properties, refer to the **Request** entry in the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).',
|
|
184
184
|
readOnlyHint: false,
|
|
185
185
|
destructiveHint: false,
|
|
186
186
|
idempotentHint: true,
|
|
@@ -16,7 +16,7 @@ export const parameters = z.object({
|
|
|
16
16
|
.optional(),
|
|
17
17
|
});
|
|
18
18
|
export const annotations = {
|
|
19
|
-
title: 'Updates a response in a collection. For a complete list of properties, see the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html)
|
|
19
|
+
title: 'Updates a response in a collection. For a complete list of properties, see the [Postman Collection Format documentation](https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html).',
|
|
20
20
|
readOnlyHint: false,
|
|
21
21
|
destructiveHint: false,
|
|
22
22
|
idempotentHint: true,
|
|
@@ -22,7 +22,7 @@ export const parameters = z.object({
|
|
|
22
22
|
.optional(),
|
|
23
23
|
});
|
|
24
24
|
export const annotations = {
|
|
25
|
-
title: 'Updates a comment on a folder
|
|
25
|
+
title: 'Updates a comment on a folder.',
|
|
26
26
|
readOnlyHint: false,
|
|
27
27
|
destructiveHint: false,
|
|
28
28
|
idempotentHint: true,
|
|
@@ -32,7 +32,7 @@ export const parameters = z.object({
|
|
|
32
32
|
.optional(),
|
|
33
33
|
});
|
|
34
34
|
export const annotations = {
|
|
35
|
-
title: 'Updates a mock server
|
|
35
|
+
title: 'Updates a mock server.',
|
|
36
36
|
readOnlyHint: false,
|
|
37
37
|
destructiveHint: false,
|
|
38
38
|
idempotentHint: true,
|