@postman/postman-mcp-server 2.1.4 → 2.2.0-alpha.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/dist/package.json +1 -1
- package/dist/src/clients/postman.js +68 -29
- package/dist/src/enabledResources.js +3 -2
- package/dist/src/index.js +38 -17
- package/dist/src/tools/createCollection.js +4 -5
- package/dist/src/tools/createCollectionComment.js +5 -6
- package/dist/src/tools/createCollectionFolder.js +4 -5
- package/dist/src/tools/createCollectionFork.js +4 -5
- package/dist/src/tools/createCollectionRequest.js +4 -5
- package/dist/src/tools/createCollectionResponse.js +4 -5
- package/dist/src/tools/createEnvironment.js +13 -8
- package/dist/src/tools/createFolderComment.js +5 -6
- package/dist/src/tools/createMock.js +4 -5
- package/dist/src/tools/createMonitor.js +5 -5
- package/dist/src/tools/createRequestComment.js +5 -6
- package/dist/src/tools/createResponseComment.js +5 -6
- package/dist/src/tools/createSpec.js +17 -29
- package/dist/src/tools/createSpecFile.js +4 -5
- package/dist/src/tools/createWorkspace.js +4 -5
- package/dist/src/tools/deleteApiCollectionComment.js +3 -5
- package/dist/src/tools/deleteCollection.js +3 -5
- package/dist/src/tools/deleteCollectionComment.js +3 -5
- package/dist/src/tools/deleteCollectionFolder.js +3 -5
- package/dist/src/tools/deleteCollectionRequest.js +3 -5
- package/dist/src/tools/deleteCollectionResponse.js +3 -5
- package/dist/src/tools/deleteEnvironment.js +3 -5
- package/dist/src/tools/deleteFolderComment.js +3 -5
- package/dist/src/tools/deleteMock.js +3 -5
- package/dist/src/tools/deleteMonitor.js +3 -5
- package/dist/src/tools/deletePanElementOrFolder.js +3 -5
- package/dist/src/tools/deleteRequestComment.js +3 -5
- package/dist/src/tools/deleteResponseComment.js +3 -5
- package/dist/src/tools/deleteSpec.js +3 -5
- package/dist/src/tools/deleteSpecFile.js +3 -5
- package/dist/src/tools/deleteWorkspace.js +3 -5
- package/dist/src/tools/duplicateCollection.js +4 -5
- package/dist/src/tools/generateCollection.js +8 -5
- package/dist/src/tools/generateSpecFromCollection.js +4 -5
- package/dist/src/tools/getAllElementsAndFolders.js +3 -5
- package/dist/src/tools/getAllPanAddElementRequests.js +3 -5
- package/dist/src/tools/getAllSpecs.js +3 -5
- package/dist/src/tools/getAsyncSpecTaskStatus.js +3 -5
- package/dist/src/tools/getAuthenticatedUser.js +3 -5
- package/dist/src/tools/getCollection.js +3 -5
- package/dist/src/tools/getCollectionComments.js +3 -5
- package/dist/src/tools/getCollectionFolder.js +3 -5
- package/dist/src/tools/getCollectionForks.js +3 -5
- package/dist/src/tools/getCollectionRequest.js +3 -5
- package/dist/src/tools/getCollectionResponse.js +3 -5
- package/dist/src/tools/getCollectionTags.js +3 -5
- package/dist/src/tools/getCollectionUpdatesTasks.js +3 -5
- package/dist/src/tools/getCollections.js +3 -5
- package/dist/src/tools/getCollectionsForkedByUser.js +3 -5
- package/dist/src/tools/getDuplicateCollectionTaskStatus.js +3 -5
- package/dist/src/tools/getEnvironment.js +3 -5
- package/dist/src/tools/getEnvironments.js +3 -5
- package/dist/src/tools/getFolderComments.js +3 -5
- package/dist/src/tools/getGeneratedCollectionSpecs.js +3 -5
- package/dist/src/tools/getMock.js +3 -5
- package/dist/src/tools/getMocks.js +3 -5
- package/dist/src/tools/getMonitor.js +3 -5
- package/dist/src/tools/getMonitors.js +3 -5
- package/dist/src/tools/getRequestComments.js +3 -5
- package/dist/src/tools/getResponseComments.js +3 -5
- package/dist/src/tools/getSourceCollectionStatus.js +3 -5
- package/dist/src/tools/getSpec.js +3 -5
- package/dist/src/tools/getSpecCollections.js +3 -5
- package/dist/src/tools/getSpecDefinition.js +3 -5
- package/dist/src/tools/getSpecFile.js +3 -5
- package/dist/src/tools/getSpecFiles.js +3 -5
- package/dist/src/tools/{getStatusOfAnAsyncTask.js → getStatusOfAnAsyncApiTask.js} +4 -6
- package/dist/src/tools/getTaggedEntities.js +3 -5
- package/dist/src/tools/getWorkspace.js +3 -5
- package/dist/src/tools/getWorkspaceGlobalVariables.js +3 -5
- package/dist/src/tools/getWorkspaceTags.js +3 -5
- package/dist/src/tools/getWorkspaces.js +3 -5
- package/dist/src/tools/mergeCollectionFork.js +57 -0
- package/dist/src/tools/patchCollection.js +12 -16
- package/dist/src/tools/patchEnvironment.js +5 -7
- package/dist/src/tools/postPanElementOrFolder.js +3 -5
- package/dist/src/tools/publishDocumentation.js +4 -5
- package/dist/src/tools/publishMock.js +3 -5
- package/dist/src/tools/pullCollectionChanges.js +3 -5
- package/dist/src/tools/putCollection.js +4 -5
- package/dist/src/tools/putEnvironment.js +13 -8
- package/dist/src/tools/resolveCommentThread.js +3 -5
- package/dist/src/tools/runMonitor.js +5 -7
- package/dist/src/tools/syncCollectionWithSpec.js +3 -5
- package/dist/src/tools/syncSpecWithCollection.js +3 -5
- package/dist/src/tools/transferCollectionFolders.js +4 -5
- package/dist/src/tools/transferCollectionRequests.js +4 -5
- package/dist/src/tools/transferCollectionResponses.js +4 -5
- package/dist/src/tools/unpublishDocumentation.js +3 -5
- package/dist/src/tools/unpublishMock.js +3 -5
- package/dist/src/tools/updateApiCollectionComment.js +4 -5
- package/dist/src/tools/updateCollectionComment.js +4 -5
- package/dist/src/tools/updateCollectionFolder.js +4 -5
- package/dist/src/tools/updateCollectionRequest.js +4 -5
- package/dist/src/tools/updateCollectionResponse.js +4 -5
- package/dist/src/tools/updateCollectionTags.js +4 -5
- package/dist/src/tools/updateFolderComment.js +4 -5
- package/dist/src/tools/updateMock.js +4 -5
- package/dist/src/tools/updateMonitor.js +5 -5
- package/dist/src/tools/updatePanElementOrFolder.js +3 -5
- package/dist/src/tools/updateRequestComment.js +4 -5
- package/dist/src/tools/updateResponseComment.js +4 -5
- package/dist/src/tools/updateSpecFile.js +4 -5
- package/dist/src/tools/updateSpecProperties.js +4 -5
- package/dist/src/tools/updateWorkspace.js +4 -5
- package/dist/src/tools/updateWorkspaceGlobalVariables.js +5 -5
- package/dist/src/tools/updateWorkspaceTags.js +4 -5
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -35,13 +35,12 @@ export async function handler(params, extra) {
|
|
|
35
35
|
bodyPayload.name = params.name;
|
|
36
36
|
if (params.responseCode !== undefined)
|
|
37
37
|
bodyPayload.responseCode = params.responseCode;
|
|
38
|
-
const
|
|
39
|
-
method: 'PUT',
|
|
38
|
+
const options = {
|
|
40
39
|
body: JSON.stringify(bodyPayload),
|
|
41
40
|
contentType: ContentType.Json,
|
|
42
|
-
apiKey: extra.apiKey,
|
|
43
41
|
headers: extra.headers,
|
|
44
|
-
}
|
|
42
|
+
};
|
|
43
|
+
const result = await extra.client.put(url, options);
|
|
45
44
|
return {
|
|
46
45
|
content: [
|
|
47
46
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -38,13 +38,12 @@ export async function handler(params, extra) {
|
|
|
38
38
|
const bodyPayload = {};
|
|
39
39
|
if (params.tags !== undefined)
|
|
40
40
|
bodyPayload.tags = params.tags;
|
|
41
|
-
const
|
|
42
|
-
method: 'PUT',
|
|
41
|
+
const options = {
|
|
43
42
|
body: JSON.stringify(bodyPayload),
|
|
44
43
|
contentType: ContentType.Json,
|
|
45
|
-
apiKey: extra.apiKey,
|
|
46
44
|
headers: extra.headers,
|
|
47
|
-
}
|
|
45
|
+
};
|
|
46
|
+
const result = await extra.client.put(url, options);
|
|
48
47
|
return {
|
|
49
48
|
content: [
|
|
50
49
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -41,13 +41,12 @@ export async function handler(params, extra) {
|
|
|
41
41
|
bodyPayload.body = params.body;
|
|
42
42
|
if (params.tags !== undefined)
|
|
43
43
|
bodyPayload.tags = params.tags;
|
|
44
|
-
const
|
|
45
|
-
method: 'PUT',
|
|
44
|
+
const options = {
|
|
46
45
|
body: JSON.stringify(bodyPayload),
|
|
47
46
|
contentType: ContentType.Json,
|
|
48
|
-
apiKey: extra.apiKey,
|
|
49
47
|
headers: extra.headers,
|
|
50
|
-
}
|
|
48
|
+
};
|
|
49
|
+
const result = await extra.client.put(url, options);
|
|
51
50
|
return {
|
|
52
51
|
content: [
|
|
53
52
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -46,13 +46,12 @@ export async function handler(params, extra) {
|
|
|
46
46
|
const bodyPayload = {};
|
|
47
47
|
if (params.mock !== undefined)
|
|
48
48
|
bodyPayload.mock = params.mock;
|
|
49
|
-
const
|
|
50
|
-
method: 'PUT',
|
|
49
|
+
const options = {
|
|
51
50
|
body: JSON.stringify(bodyPayload),
|
|
52
51
|
contentType: ContentType.Json,
|
|
53
|
-
apiKey: extra.apiKey,
|
|
54
52
|
headers: extra.headers,
|
|
55
|
-
}
|
|
53
|
+
};
|
|
54
|
+
const result = await extra.client.put(url, options);
|
|
56
55
|
return {
|
|
57
56
|
content: [
|
|
58
57
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -31,6 +31,7 @@ export const parameters = z.object({
|
|
|
31
31
|
.describe('The number of times to reattempt a monitor run if it fails or errors. This may impact your [monitor usage](https://learning.postman.com/docs/monitoring-your-api/monitor-usage/#view-monitor-usage).')
|
|
32
32
|
.optional(),
|
|
33
33
|
})
|
|
34
|
+
.describe("Information about the monitor's retry settings.")
|
|
34
35
|
.optional(),
|
|
35
36
|
options: z
|
|
36
37
|
.object({
|
|
@@ -124,13 +125,12 @@ export async function handler(params, extra) {
|
|
|
124
125
|
const bodyPayload = {};
|
|
125
126
|
if (params.monitor !== undefined)
|
|
126
127
|
bodyPayload.monitor = params.monitor;
|
|
127
|
-
const
|
|
128
|
-
method: 'PUT',
|
|
128
|
+
const options = {
|
|
129
129
|
body: JSON.stringify(bodyPayload),
|
|
130
130
|
contentType: ContentType.Json,
|
|
131
|
-
apiKey: extra.apiKey,
|
|
132
131
|
headers: extra.headers,
|
|
133
|
-
}
|
|
132
|
+
};
|
|
133
|
+
const result = await extra.client.put(url, options);
|
|
134
134
|
return {
|
|
135
135
|
content: [
|
|
136
136
|
{
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { fetchPostmanAPI } from '../clients/postman.js';
|
|
3
2
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
3
|
function asMcpError(error) {
|
|
5
4
|
const cause = error?.cause ?? String(error);
|
|
@@ -24,11 +23,10 @@ export async function handler(params, extra) {
|
|
|
24
23
|
const endpoint = `/network/private/${params.elementType}/${params.elementId}`;
|
|
25
24
|
const query = new URLSearchParams();
|
|
26
25
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
27
|
-
const
|
|
28
|
-
method: 'PUT',
|
|
29
|
-
apiKey: extra.apiKey,
|
|
26
|
+
const options = {
|
|
30
27
|
headers: extra.headers,
|
|
31
|
-
}
|
|
28
|
+
};
|
|
29
|
+
const result = await extra.client.put(url, options);
|
|
32
30
|
return {
|
|
33
31
|
content: [
|
|
34
32
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -41,13 +41,12 @@ export async function handler(params, extra) {
|
|
|
41
41
|
bodyPayload.body = params.body;
|
|
42
42
|
if (params.tags !== undefined)
|
|
43
43
|
bodyPayload.tags = params.tags;
|
|
44
|
-
const
|
|
45
|
-
method: 'PUT',
|
|
44
|
+
const options = {
|
|
46
45
|
body: JSON.stringify(bodyPayload),
|
|
47
46
|
contentType: ContentType.Json,
|
|
48
|
-
apiKey: extra.apiKey,
|
|
49
47
|
headers: extra.headers,
|
|
50
|
-
}
|
|
48
|
+
};
|
|
49
|
+
const result = await extra.client.put(url, options);
|
|
51
50
|
return {
|
|
52
51
|
content: [
|
|
53
52
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -41,13 +41,12 @@ export async function handler(params, extra) {
|
|
|
41
41
|
bodyPayload.body = params.body;
|
|
42
42
|
if (params.tags !== undefined)
|
|
43
43
|
bodyPayload.tags = params.tags;
|
|
44
|
-
const
|
|
45
|
-
method: 'PUT',
|
|
44
|
+
const options = {
|
|
46
45
|
body: JSON.stringify(bodyPayload),
|
|
47
46
|
contentType: ContentType.Json,
|
|
48
|
-
apiKey: extra.apiKey,
|
|
49
47
|
headers: extra.headers,
|
|
50
|
-
}
|
|
48
|
+
};
|
|
49
|
+
const result = await extra.client.put(url, options);
|
|
51
50
|
return {
|
|
52
51
|
content: [
|
|
53
52
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -35,13 +35,12 @@ export async function handler(params, extra) {
|
|
|
35
35
|
bodyPayload.type = params.type;
|
|
36
36
|
if (params.content !== undefined)
|
|
37
37
|
bodyPayload.content = params.content;
|
|
38
|
-
const
|
|
39
|
-
method: 'PATCH',
|
|
38
|
+
const options = {
|
|
40
39
|
body: JSON.stringify(bodyPayload),
|
|
41
40
|
contentType: ContentType.Json,
|
|
42
|
-
apiKey: extra.apiKey,
|
|
43
41
|
headers: extra.headers,
|
|
44
|
-
}
|
|
42
|
+
};
|
|
43
|
+
const result = await extra.client.patch(url, options);
|
|
45
44
|
return {
|
|
46
45
|
content: [
|
|
47
46
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -25,13 +25,12 @@ export async function handler(params, extra) {
|
|
|
25
25
|
const bodyPayload = {};
|
|
26
26
|
if (params.name !== undefined)
|
|
27
27
|
bodyPayload.name = params.name;
|
|
28
|
-
const
|
|
29
|
-
method: 'PATCH',
|
|
28
|
+
const options = {
|
|
30
29
|
body: JSON.stringify(bodyPayload),
|
|
31
30
|
contentType: ContentType.Json,
|
|
32
|
-
apiKey: extra.apiKey,
|
|
33
31
|
headers: extra.headers,
|
|
34
|
-
}
|
|
32
|
+
};
|
|
33
|
+
const result = await extra.client.patch(url, options);
|
|
35
34
|
return {
|
|
36
35
|
content: [
|
|
37
36
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -35,13 +35,12 @@ export async function handler(params, extra) {
|
|
|
35
35
|
const bodyPayload = {};
|
|
36
36
|
if (params.workspace !== undefined)
|
|
37
37
|
bodyPayload.workspace = params.workspace;
|
|
38
|
-
const
|
|
39
|
-
method: 'PUT',
|
|
38
|
+
const options = {
|
|
40
39
|
body: JSON.stringify(bodyPayload),
|
|
41
40
|
contentType: ContentType.Json,
|
|
42
|
-
apiKey: extra.apiKey,
|
|
43
41
|
headers: extra.headers,
|
|
44
|
-
}
|
|
42
|
+
};
|
|
43
|
+
const result = await extra.client.put(url, options);
|
|
45
44
|
return {
|
|
46
45
|
content: [
|
|
47
46
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -19,6 +19,7 @@ export const parameters = z.object({
|
|
|
19
19
|
.optional(),
|
|
20
20
|
value: z.string().describe("The variable's value.").optional(),
|
|
21
21
|
enabled: z.boolean().describe('If true, the variable is enabled.').optional(),
|
|
22
|
+
description: z.string().max(512).describe("The variable's description.").optional(),
|
|
22
23
|
})
|
|
23
24
|
.describe('Information about the global variable.'))
|
|
24
25
|
.describe("A list of the workspace's global variables.")
|
|
@@ -38,13 +39,12 @@ export async function handler(params, extra) {
|
|
|
38
39
|
const bodyPayload = {};
|
|
39
40
|
if (params.values !== undefined)
|
|
40
41
|
bodyPayload.values = params.values;
|
|
41
|
-
const
|
|
42
|
-
method: 'PUT',
|
|
42
|
+
const options = {
|
|
43
43
|
body: JSON.stringify(bodyPayload),
|
|
44
44
|
contentType: ContentType.Json,
|
|
45
|
-
apiKey: extra.apiKey,
|
|
46
45
|
headers: extra.headers,
|
|
47
|
-
}
|
|
46
|
+
};
|
|
47
|
+
const result = await extra.client.put(url, options);
|
|
48
48
|
return {
|
|
49
49
|
content: [
|
|
50
50
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { ContentType } from '../clients/postman.js';
|
|
3
3
|
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
|
|
4
4
|
function asMcpError(error) {
|
|
5
5
|
const cause = error?.cause ?? String(error);
|
|
@@ -38,13 +38,12 @@ export async function handler(params, extra) {
|
|
|
38
38
|
const bodyPayload = {};
|
|
39
39
|
if (params.tags !== undefined)
|
|
40
40
|
bodyPayload.tags = params.tags;
|
|
41
|
-
const
|
|
42
|
-
method: 'PUT',
|
|
41
|
+
const options = {
|
|
43
42
|
body: JSON.stringify(bodyPayload),
|
|
44
43
|
contentType: ContentType.Json,
|
|
45
|
-
apiKey: extra.apiKey,
|
|
46
44
|
headers: extra.headers,
|
|
47
|
-
}
|
|
45
|
+
};
|
|
46
|
+
const result = await extra.client.put(url, options);
|
|
48
47
|
return {
|
|
49
48
|
content: [
|
|
50
49
|
{
|