@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,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);
|
|
@@ -40,11 +39,10 @@ export async function handler(params, extra) {
|
|
|
40
39
|
if (params.direction !== undefined)
|
|
41
40
|
query.set('direction', String(params.direction));
|
|
42
41
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
43
|
-
const
|
|
44
|
-
method: 'GET',
|
|
45
|
-
apiKey: extra.apiKey,
|
|
42
|
+
const options = {
|
|
46
43
|
headers: extra.headers,
|
|
47
|
-
}
|
|
44
|
+
};
|
|
45
|
+
const result = await extra.client.get(url, options);
|
|
48
46
|
return {
|
|
49
47
|
content: [
|
|
50
48
|
{
|
|
@@ -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);
|
|
@@ -37,11 +36,10 @@ export async function handler(params, extra) {
|
|
|
37
36
|
if (params.populate !== undefined)
|
|
38
37
|
query.set('populate', String(params.populate));
|
|
39
38
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
40
|
-
const
|
|
41
|
-
method: 'GET',
|
|
42
|
-
apiKey: extra.apiKey,
|
|
39
|
+
const options = {
|
|
43
40
|
headers: extra.headers,
|
|
44
|
-
}
|
|
41
|
+
};
|
|
42
|
+
const result = await extra.client.get(url, options);
|
|
45
43
|
return {
|
|
46
44
|
content: [
|
|
47
45
|
{
|
|
@@ -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);
|
|
@@ -37,11 +36,10 @@ export async function handler(params, extra) {
|
|
|
37
36
|
if (params.populate !== undefined)
|
|
38
37
|
query.set('populate', String(params.populate));
|
|
39
38
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
40
|
-
const
|
|
41
|
-
method: 'GET',
|
|
42
|
-
apiKey: extra.apiKey,
|
|
39
|
+
const options = {
|
|
43
40
|
headers: extra.headers,
|
|
44
|
-
}
|
|
41
|
+
};
|
|
42
|
+
const result = await extra.client.get(url, options);
|
|
45
43
|
return {
|
|
46
44
|
content: [
|
|
47
45
|
{
|
|
@@ -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);
|
|
@@ -21,11 +20,10 @@ export async function handler(params, extra) {
|
|
|
21
20
|
const endpoint = `/collections/${params.collectionId}/tags`;
|
|
22
21
|
const query = new URLSearchParams();
|
|
23
22
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
24
|
-
const
|
|
25
|
-
method: 'GET',
|
|
26
|
-
apiKey: extra.apiKey,
|
|
23
|
+
const options = {
|
|
27
24
|
headers: extra.headers,
|
|
28
|
-
}
|
|
25
|
+
};
|
|
26
|
+
const result = await extra.client.get(url, options);
|
|
29
27
|
return {
|
|
30
28
|
content: [
|
|
31
29
|
{
|
|
@@ -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);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/collection-updates-tasks/${params.taskId}`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -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);
|
|
@@ -40,11 +39,10 @@ export async function handler(params, extra) {
|
|
|
40
39
|
if (params.offset !== undefined)
|
|
41
40
|
query.set('offset', String(params.offset));
|
|
42
41
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
43
|
-
const
|
|
44
|
-
method: 'GET',
|
|
45
|
-
apiKey: extra.apiKey,
|
|
42
|
+
const options = {
|
|
46
43
|
headers: extra.headers,
|
|
47
|
-
}
|
|
44
|
+
};
|
|
45
|
+
const result = await extra.client.get(url, options);
|
|
48
46
|
return {
|
|
49
47
|
content: [
|
|
50
48
|
{
|
|
@@ -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);
|
|
@@ -39,11 +38,10 @@ export async function handler(params, extra) {
|
|
|
39
38
|
if (params.direction !== undefined)
|
|
40
39
|
query.set('direction', String(params.direction));
|
|
41
40
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
42
|
-
const
|
|
43
|
-
method: 'GET',
|
|
44
|
-
apiKey: extra.apiKey,
|
|
41
|
+
const options = {
|
|
45
42
|
headers: extra.headers,
|
|
46
|
-
}
|
|
43
|
+
};
|
|
44
|
+
const result = await extra.client.get(url, options);
|
|
47
45
|
return {
|
|
48
46
|
content: [
|
|
49
47
|
{
|
|
@@ -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);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/collection-duplicate-tasks/${params.taskId}`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -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);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/environments/${params.environmentId}`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -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);
|
|
@@ -23,11 +22,10 @@ export async function handler(params, extra) {
|
|
|
23
22
|
if (params.workspace !== undefined)
|
|
24
23
|
query.set('workspace', String(params.workspace));
|
|
25
24
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
26
|
-
const
|
|
27
|
-
method: 'GET',
|
|
28
|
-
apiKey: extra.apiKey,
|
|
25
|
+
const options = {
|
|
29
26
|
headers: extra.headers,
|
|
30
|
-
}
|
|
27
|
+
};
|
|
28
|
+
const result = await extra.client.get(url, options);
|
|
31
29
|
return {
|
|
32
30
|
content: [
|
|
33
31
|
{
|
|
@@ -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);
|
|
@@ -22,11 +21,10 @@ export async function handler(params, extra) {
|
|
|
22
21
|
const endpoint = `/collections/${params.collectionId}/folders/${params.folderId}/comments`;
|
|
23
22
|
const query = new URLSearchParams();
|
|
24
23
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
25
|
-
const
|
|
26
|
-
method: 'GET',
|
|
27
|
-
apiKey: extra.apiKey,
|
|
24
|
+
const options = {
|
|
28
25
|
headers: extra.headers,
|
|
29
|
-
}
|
|
26
|
+
};
|
|
27
|
+
const result = await extra.client.get(url, options);
|
|
30
28
|
return {
|
|
31
29
|
content: [
|
|
32
30
|
{
|
|
@@ -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);
|
|
@@ -22,11 +21,10 @@ export async function handler(params, extra) {
|
|
|
22
21
|
const endpoint = `/collections/${params.collectionUid}/generations/${params.elementType}`;
|
|
23
22
|
const query = new URLSearchParams();
|
|
24
23
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
25
|
-
const
|
|
26
|
-
method: 'GET',
|
|
27
|
-
apiKey: extra.apiKey,
|
|
24
|
+
const options = {
|
|
28
25
|
headers: extra.headers,
|
|
29
|
-
}
|
|
26
|
+
};
|
|
27
|
+
const result = await extra.client.get(url, options);
|
|
30
28
|
return {
|
|
31
29
|
content: [
|
|
32
30
|
{
|
|
@@ -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);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/mocks/${params.mockId}`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -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);
|
|
@@ -26,11 +25,10 @@ export async function handler(params, extra) {
|
|
|
26
25
|
if (params.workspace !== undefined)
|
|
27
26
|
query.set('workspace', String(params.workspace));
|
|
28
27
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
29
|
-
const
|
|
30
|
-
method: 'GET',
|
|
31
|
-
apiKey: extra.apiKey,
|
|
28
|
+
const options = {
|
|
32
29
|
headers: extra.headers,
|
|
33
|
-
}
|
|
30
|
+
};
|
|
31
|
+
const result = await extra.client.get(url, options);
|
|
34
32
|
return {
|
|
35
33
|
content: [
|
|
36
34
|
{
|
|
@@ -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);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/monitors/${params.monitorId}`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -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);
|
|
@@ -55,11 +54,10 @@ export async function handler(params, extra) {
|
|
|
55
54
|
if (params.limit !== undefined)
|
|
56
55
|
query.set('limit', String(params.limit));
|
|
57
56
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
58
|
-
const
|
|
59
|
-
method: 'GET',
|
|
60
|
-
apiKey: extra.apiKey,
|
|
57
|
+
const options = {
|
|
61
58
|
headers: extra.headers,
|
|
62
|
-
}
|
|
59
|
+
};
|
|
60
|
+
const result = await extra.client.get(url, options);
|
|
63
61
|
return {
|
|
64
62
|
content: [
|
|
65
63
|
{
|
|
@@ -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 = `/collections/${params.collectionId}/requests/${params.requestId}/comments`;
|
|
25
24
|
const query = new URLSearchParams();
|
|
26
25
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
27
|
-
const
|
|
28
|
-
method: 'GET',
|
|
29
|
-
apiKey: extra.apiKey,
|
|
26
|
+
const options = {
|
|
30
27
|
headers: extra.headers,
|
|
31
|
-
}
|
|
28
|
+
};
|
|
29
|
+
const result = await extra.client.get(url, options);
|
|
32
30
|
return {
|
|
33
31
|
content: [
|
|
34
32
|
{
|
|
@@ -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);
|
|
@@ -22,11 +21,10 @@ export async function handler(params, extra) {
|
|
|
22
21
|
const endpoint = `/collections/${params.collectionId}/responses/${params.responseId}/comments`;
|
|
23
22
|
const query = new URLSearchParams();
|
|
24
23
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
25
|
-
const
|
|
26
|
-
method: 'GET',
|
|
27
|
-
apiKey: extra.apiKey,
|
|
24
|
+
const options = {
|
|
28
25
|
headers: extra.headers,
|
|
29
|
-
}
|
|
26
|
+
};
|
|
27
|
+
const result = await extra.client.get(url, options);
|
|
30
28
|
return {
|
|
31
29
|
content: [
|
|
32
30
|
{
|
|
@@ -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);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/collections/${params.collectionId}/source-status`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -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);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/specs/${params.specId}`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -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);
|
|
@@ -35,11 +34,10 @@ export async function handler(params, extra) {
|
|
|
35
34
|
if (params.cursor !== undefined)
|
|
36
35
|
query.set('cursor', String(params.cursor));
|
|
37
36
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
38
|
-
const
|
|
39
|
-
method: 'GET',
|
|
40
|
-
apiKey: extra.apiKey,
|
|
37
|
+
const options = {
|
|
41
38
|
headers: extra.headers,
|
|
42
|
-
}
|
|
39
|
+
};
|
|
40
|
+
const result = await extra.client.get(url, options);
|
|
43
41
|
return {
|
|
44
42
|
content: [
|
|
45
43
|
{
|
|
@@ -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);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/specs/${params.specId}/definitions`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -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);
|
|
@@ -22,11 +21,10 @@ export async function handler(params, extra) {
|
|
|
22
21
|
const endpoint = `/specs/${params.specId}/files/${params.filePath}`;
|
|
23
22
|
const query = new URLSearchParams();
|
|
24
23
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
25
|
-
const
|
|
26
|
-
method: 'GET',
|
|
27
|
-
apiKey: extra.apiKey,
|
|
24
|
+
const options = {
|
|
28
25
|
headers: extra.headers,
|
|
29
|
-
}
|
|
26
|
+
};
|
|
27
|
+
const result = await extra.client.get(url, options);
|
|
30
28
|
return {
|
|
31
29
|
content: [
|
|
32
30
|
{
|
|
@@ -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);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/specs/${params.specId}/files`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -1,11 +1,10 @@
|
|
|
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);
|
|
6
5
|
return new McpError(ErrorCode.InternalError, cause);
|
|
7
6
|
}
|
|
8
|
-
export const method = '
|
|
7
|
+
export const method = 'getStatusOfAnAsyncApiTask';
|
|
9
8
|
export const description = 'Gets the status of an asynchronous task.';
|
|
10
9
|
export const parameters = z.object({
|
|
11
10
|
apiId: z.string().describe("The API's ID."),
|
|
@@ -25,11 +24,10 @@ export async function handler(params, extra) {
|
|
|
25
24
|
const endpoint = `/apis/${params.apiId}/tasks/${params.taskId}`;
|
|
26
25
|
const query = new URLSearchParams();
|
|
27
26
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
28
|
-
const
|
|
29
|
-
method: 'GET',
|
|
30
|
-
apiKey: extra.apiKey,
|
|
27
|
+
const options = {
|
|
31
28
|
headers: extra.headers,
|
|
32
|
-
}
|
|
29
|
+
};
|
|
30
|
+
const result = await extra.client.get(url, options);
|
|
33
31
|
return {
|
|
34
32
|
content: [
|
|
35
33
|
{
|
|
@@ -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);
|
|
@@ -52,11 +51,10 @@ export async function handler(params, extra) {
|
|
|
52
51
|
if (params.entityType !== undefined)
|
|
53
52
|
query.set('entityType', String(params.entityType));
|
|
54
53
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
55
|
-
const
|
|
56
|
-
method: 'GET',
|
|
57
|
-
apiKey: extra.apiKey,
|
|
54
|
+
const options = {
|
|
58
55
|
headers: extra.headers,
|
|
59
|
-
}
|
|
56
|
+
};
|
|
57
|
+
const result = await extra.client.get(url, options);
|
|
60
58
|
return {
|
|
61
59
|
content: [
|
|
62
60
|
{
|
|
@@ -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);
|
|
@@ -27,11 +26,10 @@ export async function handler(params, extra) {
|
|
|
27
26
|
if (params.include !== undefined)
|
|
28
27
|
query.set('include', String(params.include));
|
|
29
28
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
30
|
-
const
|
|
31
|
-
method: 'GET',
|
|
32
|
-
apiKey: extra.apiKey,
|
|
29
|
+
const options = {
|
|
33
30
|
headers: extra.headers,
|
|
34
|
-
}
|
|
31
|
+
};
|
|
32
|
+
const result = await extra.client.get(url, options);
|
|
35
33
|
return {
|
|
36
34
|
content: [
|
|
37
35
|
{
|
|
@@ -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);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/workspaces/${params.workspaceId}/global-variables`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -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);
|
|
@@ -19,11 +18,10 @@ export async function handler(params, extra) {
|
|
|
19
18
|
const endpoint = `/workspaces/${params.workspaceId}/tags`;
|
|
20
19
|
const query = new URLSearchParams();
|
|
21
20
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
22
|
-
const
|
|
23
|
-
method: 'GET',
|
|
24
|
-
apiKey: extra.apiKey,
|
|
21
|
+
const options = {
|
|
25
22
|
headers: extra.headers,
|
|
26
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const result = await extra.client.get(url, options);
|
|
27
25
|
return {
|
|
28
26
|
content: [
|
|
29
27
|
{
|
|
@@ -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);
|
|
@@ -39,11 +38,10 @@ export async function handler(params, extra) {
|
|
|
39
38
|
if (params.include !== undefined)
|
|
40
39
|
query.set('include', String(params.include));
|
|
41
40
|
const url = query.toString() ? `${endpoint}?${query.toString()}` : endpoint;
|
|
42
|
-
const
|
|
43
|
-
method: 'GET',
|
|
44
|
-
apiKey: extra.apiKey,
|
|
41
|
+
const options = {
|
|
45
42
|
headers: extra.headers,
|
|
46
|
-
}
|
|
43
|
+
};
|
|
44
|
+
const result = await extra.client.get(url, options);
|
|
47
45
|
return {
|
|
48
46
|
content: [
|
|
49
47
|
{
|