@smartbear/mcp 0.12.1 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -6
- package/dist/bugsnag/client/api/CurrentUser.js +50 -26
- package/dist/bugsnag/client/api/Error.js +156 -93
- package/dist/bugsnag/client/api/Project.js +398 -276
- package/dist/bugsnag/client/api/api.js +4087 -3837
- package/dist/bugsnag/client/api/base.js +155 -173
- package/dist/bugsnag/client/api/configuration.js +28 -25
- package/dist/bugsnag/client/filters.js +11 -20
- package/dist/bugsnag/client.js +1398 -1281
- package/dist/bugsnag/input-schemas.js +39 -57
- package/dist/collaborator/client.js +335 -371
- package/dist/common/bugsnag.js +5 -3
- package/dist/common/cache.js +50 -57
- package/dist/common/client-registry.js +106 -119
- package/dist/common/info.js +7 -3
- package/dist/common/register-clients.js +0 -16
- package/dist/common/server.js +270 -228
- package/dist/common/tools.js +19 -0
- package/dist/common/transport-http.js +252 -343
- package/dist/common/transport-stdio.js +40 -37
- package/dist/common/zod-utils.js +20 -0
- package/dist/index.js +18 -23
- package/dist/package.json.js +11 -0
- package/dist/pactflow/client/ai.js +142 -169
- package/dist/pactflow/client/base.js +41 -51
- package/dist/pactflow/client/prompt-utils.js +93 -84
- package/dist/pactflow/client/prompts.js +95 -92
- package/dist/pactflow/client/tools.js +94 -83
- package/dist/pactflow/client/utils.js +60 -64
- package/dist/pactflow/client.js +399 -320
- package/dist/qmetry/client/api/client-api.js +43 -41
- package/dist/qmetry/client/api/error-handler.js +264 -310
- package/dist/qmetry/client/auto-resolve.js +78 -99
- package/dist/qmetry/client/automation.js +139 -162
- package/dist/qmetry/client/handlers.js +49 -46
- package/dist/qmetry/client/issues.js +133 -115
- package/dist/qmetry/client/project.js +153 -174
- package/dist/qmetry/client/requirement.js +82 -70
- package/dist/qmetry/client/testcase.js +240 -208
- package/dist/qmetry/client/testsuite.js +332 -293
- package/dist/qmetry/client/tools/automation-tools.js +291 -288
- package/dist/qmetry/client/tools/index.js +16 -13
- package/dist/qmetry/client/tools/issue-tools.js +534 -543
- package/dist/qmetry/client/tools/project-tools.js +635 -656
- package/dist/qmetry/client/tools/requirement-tools.js +525 -528
- package/dist/qmetry/client/tools/testcase-tools.js +773 -786
- package/dist/qmetry/client/tools/testsuite-tools.js +1069 -1083
- package/dist/qmetry/client/utils.js +8 -14
- package/dist/qmetry/client.js +111 -109
- package/dist/qmetry/config/constants.js +48 -44
- package/dist/qmetry/config/rest-endpoints.js +51 -48
- package/dist/qmetry/types/automation.js +7 -7
- package/dist/qmetry/types/common.js +763 -1049
- package/dist/qmetry/types/issues.js +26 -19
- package/dist/qmetry/types/project.js +32 -25
- package/dist/qmetry/types/requirements.js +26 -21
- package/dist/qmetry/types/testcase.js +55 -44
- package/dist/qmetry/types/testsuite.js +66 -52
- package/dist/reflect/client.js +284 -226
- package/dist/swagger/client/api.js +645 -662
- package/dist/swagger/client/configuration.js +31 -33
- package/dist/swagger/client/portal-types.js +204 -244
- package/dist/swagger/client/registry-types.js +62 -96
- package/dist/swagger/client/tools.js +148 -158
- package/dist/swagger/client/user-management-types.js +11 -22
- package/dist/swagger/client.js +143 -135
- package/dist/swagger/config-utils.js +10 -16
- package/dist/zephyr/client.js +43 -42
- package/dist/zephyr/common/api-client.js +35 -30
- package/dist/zephyr/common/auth-service.js +16 -13
- package/dist/zephyr/common/rest-api-schemas.js +3173 -5146
- package/dist/zephyr/tool/environment/get-environments.js +66 -66
- package/dist/zephyr/tool/priority/get-priorities.js +41 -41
- package/dist/zephyr/tool/project/get-project.js +37 -37
- package/dist/zephyr/tool/project/get-projects.js +46 -46
- package/dist/zephyr/tool/status/get-statuses.js +47 -47
- package/dist/zephyr/tool/test-case/get-test-case.js +37 -37
- package/dist/zephyr/tool/test-case/get-test-cases.js +62 -62
- package/dist/zephyr/tool/test-cycle/get-test-cycle.js +37 -37
- package/dist/zephyr/tool/test-cycle/get-test-cycles.js +70 -70
- package/dist/zephyr/tool/test-execution/get-test-execution.js +37 -37
- package/dist/zephyr/tool/test-execution/get-test-executions.js +43 -43
- package/package.json +5 -5
- package/dist/bugsnag/client/api/index.js +0 -6
- package/dist/common/types.js +0 -6
- package/dist/qmetry/client/tools/types.js +0 -1
- package/dist/swagger/client/index.js +0 -6
- package/dist/tests/unit/bugsnag/utils/factories.js +0 -86
- package/dist/zephyr/tool/zephyr-tool.js +0 -1
|
@@ -1,103 +1,69 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.optional()
|
|
17
|
-
.describe("Offset for pagination (0-based, default 0)"),
|
|
18
|
-
limit: z
|
|
19
|
-
.number()
|
|
20
|
-
.min(1)
|
|
21
|
-
.max(100)
|
|
22
|
-
.optional()
|
|
23
|
-
.describe("Number of results per page (1-100, default 20)"),
|
|
24
|
-
sort: z
|
|
25
|
-
.enum(["NAME", "UPDATED", "CREATED"])
|
|
26
|
-
.optional()
|
|
27
|
-
.describe("Sort field - NAME, UPDATED, or CREATED (default NAME)"),
|
|
28
|
-
order: z
|
|
29
|
-
.enum(["ASC", "DESC"])
|
|
30
|
-
.optional()
|
|
31
|
-
.describe("Sort order - ASC or DESC (default ASC)"),
|
|
32
|
-
owner: z
|
|
33
|
-
.string()
|
|
34
|
-
.optional()
|
|
35
|
-
.describe("Filter APIs by owner (organization or user)"),
|
|
36
|
-
specType: z
|
|
37
|
-
.enum(["API", "DOMAIN"])
|
|
38
|
-
.optional()
|
|
39
|
-
.describe("Filter by specification type - API or DOMAIN (default all types)"),
|
|
2
|
+
const ApiSearchParamsSchema = z.object({
|
|
3
|
+
query: z.string().optional().describe("Search query to filter APIs by name, description, or content"),
|
|
4
|
+
state: z.enum(["ALL", "PUBLISHED", "UNPUBLISHED"]).optional().describe(
|
|
5
|
+
"Filter APIs by publication state - ALL (default), PUBLISHED, or UNPUBLISHED"
|
|
6
|
+
),
|
|
7
|
+
tag: z.string().optional().describe("Filter APIs by tag"),
|
|
8
|
+
offset: z.number().min(0).optional().describe("Offset for pagination (0-based, default 0)"),
|
|
9
|
+
limit: z.number().min(1).max(100).optional().describe("Number of results per page (1-100, default 20)"),
|
|
10
|
+
sort: z.enum(["NAME", "UPDATED", "CREATED"]).optional().describe("Sort field - NAME, UPDATED, or CREATED (default NAME)"),
|
|
11
|
+
order: z.enum(["ASC", "DESC"]).optional().describe("Sort order - ASC or DESC (default ASC)"),
|
|
12
|
+
owner: z.string().optional().describe("Filter APIs by owner (organization or user)"),
|
|
13
|
+
specType: z.enum(["API", "DOMAIN"]).optional().describe(
|
|
14
|
+
"Filter by specification type - API or DOMAIN (default all types)"
|
|
15
|
+
)
|
|
40
16
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
version
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
flatten: z
|
|
52
|
-
.boolean()
|
|
53
|
-
.optional()
|
|
54
|
-
.describe("Set to true to create models from inline schemas in OpenAPI definition (default false)"),
|
|
17
|
+
const ApiDefinitionParamsSchema = z.object({
|
|
18
|
+
owner: z.string().describe("API owner (organization or user, case-sensitive)"),
|
|
19
|
+
api: z.string().describe("API name (case-sensitive)"),
|
|
20
|
+
version: z.string().describe("Version identifier"),
|
|
21
|
+
resolved: z.boolean().optional().describe(
|
|
22
|
+
"Set to true to get the resolved version with all external $refs included (default false)"
|
|
23
|
+
),
|
|
24
|
+
flatten: z.boolean().optional().describe(
|
|
25
|
+
"Set to true to create models from inline schemas in OpenAPI definition (default false)"
|
|
26
|
+
)
|
|
55
27
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
28
|
+
const CreateApiParamsSchema = z.object({
|
|
29
|
+
owner: z.string().describe("Organization name (owner of the API)"),
|
|
30
|
+
apiName: z.string().describe("API name"),
|
|
31
|
+
definition: z.string().describe(
|
|
32
|
+
"API definition content (OpenAPI/AsyncAPI specification in JSON or YAML format). Format is automatically detected. API is created with fixed values: version 1.0.0, private visibility, automock disabled, and no project assignment."
|
|
33
|
+
)
|
|
62
34
|
});
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
.describe("Template name to use for creating the API. Format: owner/template-name/version (e.g., 'swagger-hub/petstore-template/1.0.0'). API is created with fixed values: private visibility, no project assignment, and reconciliation enabled."),
|
|
35
|
+
const ScanStandardizationParamsSchema = z.object({
|
|
36
|
+
orgName: z.string().describe("The organization name to use for standardization rules"),
|
|
37
|
+
definition: z.string().describe(
|
|
38
|
+
"API definition content (OpenAPI/AsyncAPI specification in JSON or YAML format) to scan for standardization errors"
|
|
39
|
+
)
|
|
69
40
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
41
|
+
const CreateApiFromPromptParamsSchema = z.object({
|
|
42
|
+
owner: z.string().describe("API owner (organization or user, case-sensitive)"),
|
|
43
|
+
apiName: z.string().describe("API name"),
|
|
44
|
+
prompt: z.string().describe(
|
|
45
|
+
"The prompt describing the desired API functionality (e.g., 'Create a RESTful API for managing a pet store with endpoints for pets, orders, and inventory')"
|
|
46
|
+
),
|
|
47
|
+
specType: z.enum([
|
|
48
|
+
"openapi20",
|
|
49
|
+
"openapi30x",
|
|
50
|
+
"openapi31x",
|
|
51
|
+
"asyncapi2xx",
|
|
52
|
+
"asyncapi30x"
|
|
53
|
+
]).default("openapi30x").describe(
|
|
54
|
+
"Specification type for the generated API definition. Use: 'openapi20' for OpenAPI 2.0, 'openapi30x' for OpenAPI 3.0.x (default), 'openapi31x' for OpenAPI 3.1.x, 'asyncapi2xx' for AsyncAPI 2.x, 'asyncapi30x' for AsyncAPI 3.0.x"
|
|
55
|
+
)
|
|
77
56
|
});
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
apiName: z.string().describe("API name"),
|
|
83
|
-
prompt: z
|
|
84
|
-
.string()
|
|
85
|
-
.describe("The prompt describing the desired API functionality (e.g., 'Create a RESTful API for managing a pet store with endpoints for pets, orders, and inventory')"),
|
|
86
|
-
specType: z
|
|
87
|
-
.enum([
|
|
88
|
-
"openapi20",
|
|
89
|
-
"openapi30x",
|
|
90
|
-
"openapi31x",
|
|
91
|
-
"asyncapi2xx",
|
|
92
|
-
"asyncapi30x",
|
|
93
|
-
])
|
|
94
|
-
.default("openapi30x")
|
|
95
|
-
.describe("Specification type for the generated API definition. Use: 'openapi20' for OpenAPI 2.0, 'openapi30x' for OpenAPI 3.0.x (default), 'openapi31x' for OpenAPI 3.1.x, 'asyncapi2xx' for AsyncAPI 2.x, 'asyncapi30x' for AsyncAPI 3.0.x"),
|
|
96
|
-
});
|
|
97
|
-
export const StandardizeApiParamsSchema = z.object({
|
|
98
|
-
owner: z
|
|
99
|
-
.string()
|
|
100
|
-
.describe("API owner (organization or user, case-sensitive)"),
|
|
101
|
-
api: z.string().describe("API name (case-sensitive)"),
|
|
102
|
-
version: z.string().describe("Version identifier"),
|
|
57
|
+
const StandardizeApiParamsSchema = z.object({
|
|
58
|
+
owner: z.string().describe("API owner (organization or user, case-sensitive)"),
|
|
59
|
+
api: z.string().describe("API name (case-sensitive)"),
|
|
60
|
+
version: z.string().describe("Version identifier")
|
|
103
61
|
});
|
|
62
|
+
export {
|
|
63
|
+
ApiDefinitionParamsSchema,
|
|
64
|
+
ApiSearchParamsSchema,
|
|
65
|
+
CreateApiFromPromptParamsSchema,
|
|
66
|
+
CreateApiParamsSchema,
|
|
67
|
+
ScanStandardizationParamsSchema,
|
|
68
|
+
StandardizeApiParamsSchema
|
|
69
|
+
};
|
|
@@ -1,160 +1,150 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* Defines tool configurations for Swagger operations.
|
|
5
|
-
* Each tool includes parameters, descriptions, and handler method names.
|
|
6
|
-
* This follows the pattern established in the pactflow module.
|
|
7
|
-
*/
|
|
8
|
-
import { CreatePortalArgsSchema, CreateProductArgsSchema, CreateTableOfContentsArgsSchema, DeleteTableOfContentsArgsSchema, GetDocumentArgsSchema, GetProductSectionsArgsSchema, GetTableOfContentsArgsSchema, PortalArgsSchema, ProductArgsSchema, PublishProductArgsSchema, UpdateDocumentArgsSchema, UpdatePortalArgsSchema, UpdateProductArgsSchema, } from "./portal-types.js";
|
|
9
|
-
import { ApiDefinitionParamsSchema, ApiSearchParamsSchema, CreateApiFromPromptParamsSchema, CreateApiFromTemplateParamsSchema, CreateApiParamsSchema, ScanStandardizationParamsSchema, StandardizeApiParamsSchema, } from "./registry-types.js";
|
|
1
|
+
import { CreatePortalArgsSchema, PortalArgsSchema, UpdatePortalArgsSchema, CreateProductArgsSchema, ProductArgsSchema, UpdateProductArgsSchema, PublishProductArgsSchema, GetProductSectionsArgsSchema, CreateTableOfContentsArgsSchema, GetTableOfContentsArgsSchema, DeleteTableOfContentsArgsSchema, GetDocumentArgsSchema, UpdateDocumentArgsSchema } from "./portal-types.js";
|
|
2
|
+
import { ApiSearchParamsSchema, ApiDefinitionParamsSchema, CreateApiParamsSchema, ScanStandardizationParamsSchema, CreateApiFromPromptParamsSchema, StandardizeApiParamsSchema } from "./registry-types.js";
|
|
10
3
|
import { OrganizationsQuerySchema } from "./user-management-types.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
{
|
|
155
|
-
title: "Standardize API",
|
|
156
|
-
summary: "Standardize and fix an API definition using AI to ensure compliance with governance policies. Scans the API definition for standardization errors and automatically fixes them using SmartBear AI. If errors are found, they will be sent to SmartBear AI to generate a corrected definition, which is then saved back to the registry. Returns the number of errors found and the fixed definition if successful. Use this tool when users ask to standardize, fix, govern, or ensure governance compliance of APIs.",
|
|
157
|
-
inputSchema: StandardizeApiParamsSchema,
|
|
158
|
-
handler: "standardizeApi",
|
|
159
|
-
},
|
|
4
|
+
const TOOLS = [
|
|
5
|
+
{
|
|
6
|
+
title: "List Portals",
|
|
7
|
+
summary: "Search for available portals within Swagger. Only portals where you have at least a designer role, either at the product level or organization level, are returned.",
|
|
8
|
+
parameters: [],
|
|
9
|
+
handler: "getPortals"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: "Create Portal",
|
|
13
|
+
summary: "Create a new portal within Swagger.",
|
|
14
|
+
inputSchema: CreatePortalArgsSchema,
|
|
15
|
+
handler: "createPortal"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: "Get Portal",
|
|
19
|
+
summary: "Retrieve information about a specific portal.",
|
|
20
|
+
inputSchema: PortalArgsSchema,
|
|
21
|
+
handler: "getPortal"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
title: "Update Portal",
|
|
25
|
+
summary: "Update a specific portal's configuration.",
|
|
26
|
+
inputSchema: UpdatePortalArgsSchema,
|
|
27
|
+
handler: "updatePortal"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: "List Portal Products",
|
|
31
|
+
summary: "Get products for a specific portal that match your criteria.",
|
|
32
|
+
inputSchema: PortalArgsSchema,
|
|
33
|
+
handler: "getPortalProducts"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
title: "Create Portal Product",
|
|
37
|
+
summary: "Create a new product for a specific portal.",
|
|
38
|
+
inputSchema: CreateProductArgsSchema,
|
|
39
|
+
handler: "createPortalProduct"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
title: "Get Portal Product",
|
|
43
|
+
summary: "Retrieve information about a specific product resource.",
|
|
44
|
+
inputSchema: ProductArgsSchema,
|
|
45
|
+
handler: "getPortalProduct"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
title: "Delete Portal Product",
|
|
49
|
+
summary: "Delete a product from a specific portal",
|
|
50
|
+
inputSchema: ProductArgsSchema,
|
|
51
|
+
handler: "deletePortalProduct",
|
|
52
|
+
formatResponse: () => "Product deleted successfully."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
title: "Update Portal Product",
|
|
56
|
+
summary: "Update a product's settings within a specific portal.",
|
|
57
|
+
inputSchema: UpdateProductArgsSchema,
|
|
58
|
+
handler: "updatePortalProduct"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: "Publish Portal Product",
|
|
62
|
+
summary: "Publish a product's content to make it live or as preview. This endpoint publishes the current content of a product, making it visible to portal visitors. Use preview mode to test before going live.",
|
|
63
|
+
inputSchema: PublishProductArgsSchema,
|
|
64
|
+
handler: "publishPortalProduct"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
title: "List Portal Product Sections",
|
|
68
|
+
summary: "Get sections for a specific product within a portal.",
|
|
69
|
+
inputSchema: GetProductSectionsArgsSchema,
|
|
70
|
+
handler: "getPortalProductSections"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
title: "Create Table Of Contents",
|
|
74
|
+
summary: "Create a new table of contents item in a portal product section. Supports API references, HTML content, and Markdown content types.",
|
|
75
|
+
inputSchema: CreateTableOfContentsArgsSchema,
|
|
76
|
+
handler: "createTableOfContents"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
title: "List Table Of Contents",
|
|
80
|
+
summary: "Get table of contents for a section of a product within a portal.",
|
|
81
|
+
inputSchema: GetTableOfContentsArgsSchema,
|
|
82
|
+
handler: "getTableOfContents"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
title: "Delete Table Of Contents",
|
|
86
|
+
summary: "Delete table of contents entry. Performs a soft-delete of an entry from the table of contents. Supports recursive deletion of nested items.",
|
|
87
|
+
inputSchema: DeleteTableOfContentsArgsSchema,
|
|
88
|
+
handler: "deleteTableOfContents"
|
|
89
|
+
},
|
|
90
|
+
// Document management tools
|
|
91
|
+
{
|
|
92
|
+
title: "Get Document",
|
|
93
|
+
summary: "Get document content and metadata by document ID. Useful for retrieving HTML or Markdown content from table of contents items.",
|
|
94
|
+
inputSchema: GetDocumentArgsSchema,
|
|
95
|
+
handler: "getDocument"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
title: "Update Document",
|
|
99
|
+
summary: "Update the content of an existing document. Supports both HTML and Markdown content types.",
|
|
100
|
+
inputSchema: UpdateDocumentArgsSchema,
|
|
101
|
+
handler: "updateDocument"
|
|
102
|
+
},
|
|
103
|
+
// Registry API tools for SwaggerHub Design functionality
|
|
104
|
+
{
|
|
105
|
+
title: "Search APIs and Domains",
|
|
106
|
+
summary: "Search for APIs and Domains in SwaggerHub Registry using the comprehensive /specs endpoint and retrieve metadata including owner, name, description, summary, version, and specification.",
|
|
107
|
+
inputSchema: ApiSearchParamsSchema,
|
|
108
|
+
handler: "searchApis"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
title: "Get API Definition",
|
|
112
|
+
summary: "Fetch resolved API definition from SwaggerHub Registry based on owner, API name, and version.",
|
|
113
|
+
inputSchema: ApiDefinitionParamsSchema,
|
|
114
|
+
handler: "getApiDefinition"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
title: "Create or Update API",
|
|
118
|
+
summary: "Create a new API or update an existing API in SwaggerHub Registry for Swagger Studio. The API specification type (OpenAPI, AsyncAPI) is automatically detected from the definition content. APIs are always created with fixed values: version 1.0.0, private visibility, and automock disabled (these values cannot be changed). Returns HTTP 201 for creation, HTTP 200 for update. Response includes 'operation' field indicating whether it was a 'create' or 'update' operation along with API details and SwaggerHub URL.",
|
|
119
|
+
inputSchema: CreateApiParamsSchema,
|
|
120
|
+
handler: "createOrUpdateApi"
|
|
121
|
+
},
|
|
122
|
+
// User Management API tools for organization management functionality
|
|
123
|
+
{
|
|
124
|
+
title: "List Organizations",
|
|
125
|
+
summary: "Get organizations for a user. Returns a list of organizations that the authenticating user is a member of. On-Premise admin gets a list of all organizations in the system.",
|
|
126
|
+
inputSchema: OrganizationsQuerySchema,
|
|
127
|
+
handler: "getOrganizations"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
title: "Scan API Standardization",
|
|
131
|
+
summary: "Run a standardization scan against an API definition using the organization's governance and standardization rules. Accepts a YAML or JSON OpenAPI/AsyncAPI definition and returns a list of standardization errors and validation issues. Use this tool when users ask to validate, scan, or check API governance or standardization.",
|
|
132
|
+
inputSchema: ScanStandardizationParamsSchema,
|
|
133
|
+
handler: "scanStandardization"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
title: "Create API from Prompt using SmartBear AI",
|
|
137
|
+
summary: "Generate and save an API definition based on a prompt using SmartBear AI. This tool automatically applies organization governance and standardization rules during API generation. The specType parameter determines the format of the generated definition. Use: 'openapi20' for OpenAPI 2.0, 'openapi30x' for OpenAPI 3.0.x, 'openapi31x' for OpenAPI 3.1.x, 'asyncapi2xx' for AsyncAPI 2.x, 'asyncapi30x' for AsyncAPI 3.0.x. Use this tool when creating APIs that comply with governance policies or when generating APIs from natural language descriptions. Use this tool when users ask to create, generate, or design APIs with governance or standardization requirements. Returns HTTP 201 for creation, HTTP 200 for update. Response includes 'operation' field indicating whether it was a 'create' or 'update' operation along with API details and SwaggerHub URL.",
|
|
138
|
+
inputSchema: CreateApiFromPromptParamsSchema,
|
|
139
|
+
handler: "createApiFromPrompt"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
title: "Standardize API",
|
|
143
|
+
summary: "Standardize and fix an API definition using AI to ensure compliance with governance policies. Scans the API definition for standardization errors and automatically fixes them using SmartBear AI. If errors are found, they will be sent to SmartBear AI to generate a corrected definition, which is then saved back to the registry. Returns the number of errors found and the fixed definition if successful. Use this tool when users ask to standardize, fix, govern, or ensure governance compliance of APIs.",
|
|
144
|
+
inputSchema: StandardizeApiParamsSchema,
|
|
145
|
+
handler: "standardizeApi"
|
|
146
|
+
}
|
|
160
147
|
];
|
|
148
|
+
export {
|
|
149
|
+
TOOLS
|
|
150
|
+
};
|
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.optional()
|
|
11
|
-
.describe("The property to sort the results by"),
|
|
12
|
-
order: z.enum(["ASC", "DESC"]).optional().describe("Sort order"),
|
|
13
|
-
page: z
|
|
14
|
-
.number()
|
|
15
|
-
.min(0)
|
|
16
|
-
.optional()
|
|
17
|
-
.describe("0-based index of the page to return"),
|
|
18
|
-
pageSize: z
|
|
19
|
-
.number()
|
|
20
|
-
.min(1)
|
|
21
|
-
.max(1000)
|
|
22
|
-
.optional()
|
|
23
|
-
.describe("Number of results per page to return"),
|
|
2
|
+
const OrganizationsQuerySchema = z.object({
|
|
3
|
+
q: z.string().optional().describe(
|
|
4
|
+
"Search organizations by partial or full name (case-insensitive)"
|
|
5
|
+
),
|
|
6
|
+
sortBy: z.enum(["NAME", "EMAIL"]).optional().describe("The property to sort the results by"),
|
|
7
|
+
order: z.enum(["ASC", "DESC"]).optional().describe("Sort order"),
|
|
8
|
+
page: z.number().min(0).optional().describe("0-based index of the page to return"),
|
|
9
|
+
pageSize: z.number().min(1).max(1e3).optional().describe("Number of results per page to return")
|
|
24
10
|
});
|
|
11
|
+
export {
|
|
12
|
+
OrganizationsQuerySchema
|
|
13
|
+
};
|