@toolsdk.ai/registry 1.0.97 → 1.0.99
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 +2 -0
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +16 -2
- package/dist/api/package-handler.d.ts +18 -18
- package/dist/api/package-handler.js +21 -44
- package/dist/api/package-route.d.ts +2 -2
- package/dist/api/package-route.js +67 -32
- package/dist/api/package-so.d.ts +1 -203
- package/dist/api/package-so.js +1 -1
- package/dist/api/package.test.js +1 -2
- package/dist/helper.d.ts +1 -1
- package/dist/helper.js +3 -1
- package/dist/schema.d.ts +617 -15
- package/dist/schema.js +82 -8
- package/dist/types.d.ts +11 -1
- package/dist/utils.d.ts +21 -0
- package/dist/utils.js +57 -0
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Awesome MCP Registry
|
|
2
2
|
|
|
3
|
+
[](https://www.producthunt.com/products/toolsdk-ai)
|
|
4
|
+
|
|
3
5
|

|
|
4
6
|

|
|
5
7
|
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const app:
|
|
1
|
+
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
2
|
+
declare const app: OpenAPIHono;
|
|
3
3
|
export default app;
|
package/dist/api/index.js
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import dotenv from 'dotenv';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import { Hono } from 'hono';
|
|
4
3
|
import { serve } from '@hono/node-server';
|
|
5
4
|
import { packageRoutes } from './package-route';
|
|
5
|
+
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
6
|
+
import { swaggerUI } from '@hono/swagger-ui';
|
|
6
7
|
dotenv.config({ path: path.resolve(process.cwd(), '.env.local') });
|
|
7
8
|
dotenv.config({ path: path.resolve(process.cwd(), '.env') });
|
|
8
|
-
const app = new
|
|
9
|
+
const app = new OpenAPIHono();
|
|
9
10
|
app.route('/api/v1', packageRoutes);
|
|
10
11
|
app.get('/', (c) => {
|
|
11
12
|
return c.text('MCP Registry API Server is running!');
|
|
12
13
|
});
|
|
14
|
+
app.get('/api/meta', (c) => {
|
|
15
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
16
|
+
const packageJson = require('../../package.json');
|
|
17
|
+
return c.json({ version: packageJson.version });
|
|
18
|
+
});
|
|
19
|
+
app.doc('/api/v1/doc', {
|
|
20
|
+
openapi: '3.0.0',
|
|
21
|
+
info: {
|
|
22
|
+
version: '1.0.0',
|
|
23
|
+
title: 'MCP Registry API',
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
app.get('/swagger', swaggerUI({ url: '/api/v1/doc' }));
|
|
13
27
|
app.notFound((c) => {
|
|
14
28
|
return c.json({ success: false, code: 404, message: 'Route not found' }, 404);
|
|
15
29
|
});
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { Context } from 'hono';
|
|
2
2
|
export declare const packageHandler: {
|
|
3
3
|
executeTool: (c: Context) => Promise<(globalThis.Response & import("hono").TypedResponse<never, 200, "json">) | (globalThis.Response & import("hono").TypedResponse<{
|
|
4
|
-
success:
|
|
4
|
+
success: boolean;
|
|
5
5
|
code: number;
|
|
6
6
|
message: string;
|
|
7
7
|
}, 404, "json">)>;
|
|
8
8
|
getPackageDetail: (c: Context) => Promise<(globalThis.Response & import("hono").TypedResponse<{
|
|
9
|
-
success:
|
|
9
|
+
success: boolean;
|
|
10
|
+
code: number;
|
|
11
|
+
message: string;
|
|
12
|
+
}, 404, "json">) | (globalThis.Response & import("hono").TypedResponse<{
|
|
13
|
+
success: boolean;
|
|
10
14
|
code: number;
|
|
11
15
|
message: string;
|
|
12
16
|
}, 400, "json">) | (globalThis.Response & import("hono").TypedResponse<{
|
|
@@ -17,9 +21,9 @@ export declare const packageHandler: {
|
|
|
17
21
|
type: "mcp-server";
|
|
18
22
|
packageName: string;
|
|
19
23
|
runtime: "node" | "python" | "java" | "go";
|
|
20
|
-
key?: string | undefined;
|
|
21
|
-
name?: string | undefined;
|
|
22
24
|
description?: string | undefined;
|
|
25
|
+
name?: string | undefined;
|
|
26
|
+
key?: string | undefined;
|
|
23
27
|
packageVersion?: string | undefined;
|
|
24
28
|
bin?: string | undefined;
|
|
25
29
|
binArgs?: string[] | undefined;
|
|
@@ -40,20 +44,20 @@ export declare const packageHandler: {
|
|
|
40
44
|
inputSchema: {
|
|
41
45
|
[x: string]: never;
|
|
42
46
|
type: "object";
|
|
43
|
-
required?: string[] | undefined;
|
|
44
47
|
properties?: {
|
|
45
48
|
[x: string]: never;
|
|
46
49
|
} | undefined;
|
|
50
|
+
required?: string[] | undefined;
|
|
47
51
|
};
|
|
48
52
|
description?: string | undefined;
|
|
49
53
|
title?: string | undefined;
|
|
50
54
|
outputSchema?: {
|
|
51
55
|
[x: string]: never;
|
|
52
56
|
type: "object";
|
|
53
|
-
required?: string[] | undefined;
|
|
54
57
|
properties?: {
|
|
55
58
|
[x: string]: never;
|
|
56
59
|
} | undefined;
|
|
60
|
+
required?: string[] | undefined;
|
|
57
61
|
} | undefined;
|
|
58
62
|
annotations?: {
|
|
59
63
|
[x: string]: never;
|
|
@@ -68,13 +72,13 @@ export declare const packageHandler: {
|
|
|
68
72
|
} | undefined;
|
|
69
73
|
}[] | undefined;
|
|
70
74
|
} | undefined;
|
|
71
|
-
}, 200, "json">)
|
|
72
|
-
|
|
75
|
+
}, 200, "json">)>;
|
|
76
|
+
listTools: (c: Context) => Promise<(globalThis.Response & import("hono").TypedResponse<{
|
|
77
|
+
success: boolean;
|
|
73
78
|
code: number;
|
|
74
79
|
message: string;
|
|
75
|
-
}, 404, "json">)
|
|
76
|
-
|
|
77
|
-
success: false;
|
|
80
|
+
}, 404, "json">) | (globalThis.Response & import("hono").TypedResponse<{
|
|
81
|
+
success: boolean;
|
|
78
82
|
code: number;
|
|
79
83
|
message: string;
|
|
80
84
|
}, 400, "json">) | (globalThis.Response & import("hono").TypedResponse<{
|
|
@@ -87,20 +91,20 @@ export declare const packageHandler: {
|
|
|
87
91
|
inputSchema: {
|
|
88
92
|
[x: string]: never;
|
|
89
93
|
type: "object";
|
|
90
|
-
required?: string[] | undefined;
|
|
91
94
|
properties?: {
|
|
92
95
|
[x: string]: never;
|
|
93
96
|
} | undefined;
|
|
97
|
+
required?: string[] | undefined;
|
|
94
98
|
};
|
|
95
99
|
description?: string | undefined;
|
|
96
100
|
title?: string | undefined;
|
|
97
101
|
outputSchema?: {
|
|
98
102
|
[x: string]: never;
|
|
99
103
|
type: "object";
|
|
100
|
-
required?: string[] | undefined;
|
|
101
104
|
properties?: {
|
|
102
105
|
[x: string]: never;
|
|
103
106
|
} | undefined;
|
|
107
|
+
required?: string[] | undefined;
|
|
104
108
|
} | undefined;
|
|
105
109
|
annotations?: {
|
|
106
110
|
[x: string]: never;
|
|
@@ -114,9 +118,5 @@ export declare const packageHandler: {
|
|
|
114
118
|
[x: string]: never;
|
|
115
119
|
} | undefined;
|
|
116
120
|
}[] | undefined;
|
|
117
|
-
}, 200, "json">)
|
|
118
|
-
success: false;
|
|
119
|
-
code: number;
|
|
120
|
-
message: string;
|
|
121
|
-
}, 404, "json">)>;
|
|
121
|
+
}, 200, "json">)>;
|
|
122
122
|
};
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
import { PackageSO } from './package-so';
|
|
2
|
+
import { createErrorResponse, createResponse } from '../utils';
|
|
2
3
|
export const packageHandler = {
|
|
3
4
|
executeTool: async (c) => {
|
|
4
5
|
const requestBody = await c.req.json();
|
|
5
6
|
try {
|
|
6
7
|
const toolSO = new PackageSO();
|
|
7
8
|
const result = await toolSO.executeTool(requestBody);
|
|
8
|
-
const response =
|
|
9
|
-
success: true,
|
|
10
|
-
code: 200,
|
|
11
|
-
message: 'Tool executed successfully',
|
|
12
|
-
data: result,
|
|
13
|
-
};
|
|
9
|
+
const response = createResponse(result);
|
|
14
10
|
return c.json(response, 200);
|
|
15
11
|
}
|
|
16
12
|
catch (error) {
|
|
17
|
-
if (error instanceof Error
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
if (error instanceof Error) {
|
|
14
|
+
if (error.message.includes('not found')) {
|
|
15
|
+
const errorResponse = createErrorResponse(`Package '${requestBody.packageName}' not found`, 404);
|
|
16
|
+
return c.json(errorResponse, 404);
|
|
17
|
+
}
|
|
18
|
+
if (error.message.includes('Unknown tool')) {
|
|
19
|
+
const errorResponse = createErrorResponse(`Tool '${requestBody.toolKey}' not found in package '${requestBody.packageName}`, 404);
|
|
20
|
+
return c.json(errorResponse, 404);
|
|
21
|
+
}
|
|
23
22
|
}
|
|
24
23
|
// Other errors are still thrown
|
|
25
24
|
throw error;
|
|
@@ -28,30 +27,19 @@ export const packageHandler = {
|
|
|
28
27
|
getPackageDetail: async (c) => {
|
|
29
28
|
const packageName = c.req.query('packageName');
|
|
30
29
|
if (!packageName) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
code: 400,
|
|
34
|
-
message: 'Missing packageName query parameter',
|
|
35
|
-
}, 400);
|
|
30
|
+
const errorResponse = createErrorResponse('Missing packageName query parameter', 400);
|
|
31
|
+
return c.json(errorResponse, 400);
|
|
36
32
|
}
|
|
37
33
|
try {
|
|
38
34
|
const toolSO = new PackageSO();
|
|
39
35
|
const result = await toolSO.getPackageDetail(packageName);
|
|
40
|
-
const response =
|
|
41
|
-
success: true,
|
|
42
|
-
code: 200,
|
|
43
|
-
message: 'Package detail retrieved successfully',
|
|
44
|
-
data: result,
|
|
45
|
-
};
|
|
36
|
+
const response = createResponse(result);
|
|
46
37
|
return c.json(response, 200);
|
|
47
38
|
}
|
|
48
39
|
catch (error) {
|
|
49
40
|
if (error instanceof Error && error.message.includes('not found')) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
code: 404,
|
|
53
|
-
message: `Package '${packageName}' not found`,
|
|
54
|
-
}, 404);
|
|
41
|
+
const errorResponse = createErrorResponse(`Package '${packageName}' not found`, 404);
|
|
42
|
+
return c.json(errorResponse, 404);
|
|
55
43
|
}
|
|
56
44
|
throw error;
|
|
57
45
|
}
|
|
@@ -59,30 +47,19 @@ export const packageHandler = {
|
|
|
59
47
|
listTools: async (c) => {
|
|
60
48
|
const packageName = c.req.query('packageName');
|
|
61
49
|
if (!packageName) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
code: 400,
|
|
65
|
-
message: 'Missing packageName query parameter',
|
|
66
|
-
}, 400);
|
|
50
|
+
const errorResponse = createErrorResponse('Missing packageName query parameter', 400);
|
|
51
|
+
return c.json(errorResponse, 400);
|
|
67
52
|
}
|
|
68
53
|
try {
|
|
69
54
|
const toolSO = new PackageSO();
|
|
70
55
|
const result = await toolSO.listTools(packageName);
|
|
71
|
-
const response =
|
|
72
|
-
success: true,
|
|
73
|
-
code: 200,
|
|
74
|
-
message: 'Tools list retrieved successfully',
|
|
75
|
-
data: result,
|
|
76
|
-
};
|
|
56
|
+
const response = createResponse(result);
|
|
77
57
|
return c.json(response, 200);
|
|
78
58
|
}
|
|
79
59
|
catch (error) {
|
|
80
60
|
if (error instanceof Error && error.message.includes('not found')) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
code: 404,
|
|
84
|
-
message: `Package '${packageName}' not found`,
|
|
85
|
-
}, 404);
|
|
61
|
+
const errorResponse = createErrorResponse(`Package '${packageName}' not found`, 404);
|
|
62
|
+
return c.json(errorResponse, 404);
|
|
86
63
|
}
|
|
87
64
|
throw error;
|
|
88
65
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const packageRoutes:
|
|
1
|
+
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
2
|
+
export declare const packageRoutes: OpenAPIHono;
|
|
@@ -1,37 +1,72 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
2
|
-
import { Hono } from 'hono';
|
|
3
2
|
import { packageHandler } from './package-handler';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
packageRoutes
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
data: categories,
|
|
15
|
-
};
|
|
16
|
-
return c.json(response);
|
|
17
|
-
});
|
|
18
|
-
packageRoutes.get('/config/featured', (c) => {
|
|
3
|
+
import { OpenAPIHono, createRoute } from '@hono/zod-openapi';
|
|
4
|
+
import { FeaturedResponseSchema, CategoriesResponseSchema, PackagesListResponseSchema, PackageDetailResponseSchema, ToolsResponseSchema, ToolExecuteSchema, ExecuteToolResponseSchema, packageNameQuerySchema, } from '../schema';
|
|
5
|
+
import { createResponse, createRouteResponses } from '../utils';
|
|
6
|
+
export const packageRoutes = new OpenAPIHono();
|
|
7
|
+
const featuredRoute = createRoute({
|
|
8
|
+
method: 'get',
|
|
9
|
+
path: '/config/featured',
|
|
10
|
+
responses: createRouteResponses(FeaturedResponseSchema),
|
|
11
|
+
});
|
|
12
|
+
packageRoutes.openapi(featuredRoute, (c) => {
|
|
19
13
|
const featured = require('../../config/featured.mjs').default;
|
|
20
|
-
const response =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
});
|
|
28
|
-
packageRoutes.
|
|
14
|
+
const response = createResponse(featured);
|
|
15
|
+
return c.json(response, 200);
|
|
16
|
+
});
|
|
17
|
+
const categoriesRoute = createRoute({
|
|
18
|
+
method: 'get',
|
|
19
|
+
path: '/config/categories',
|
|
20
|
+
responses: createRouteResponses(CategoriesResponseSchema),
|
|
21
|
+
});
|
|
22
|
+
packageRoutes.openapi(categoriesRoute, (c) => {
|
|
23
|
+
const categories = require('../../config/categories.mjs').default;
|
|
24
|
+
const response = createResponse(categories);
|
|
25
|
+
return c.json(response, 200);
|
|
26
|
+
});
|
|
27
|
+
const packagesListRoute = createRoute({
|
|
28
|
+
method: 'get',
|
|
29
|
+
path: '/indexes/packages-list',
|
|
30
|
+
responses: createRouteResponses(PackagesListResponseSchema),
|
|
31
|
+
});
|
|
32
|
+
packageRoutes.openapi(packagesListRoute, async (c) => {
|
|
29
33
|
const packagesList = (await import('../../indexes/packages-list.json')).default;
|
|
30
|
-
const response =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const response = createResponse(packagesList);
|
|
35
|
+
return c.json(response, 200);
|
|
36
|
+
});
|
|
37
|
+
const packageDetailRoute = createRoute({
|
|
38
|
+
method: 'get',
|
|
39
|
+
path: '/packages/detail',
|
|
40
|
+
request: { query: packageNameQuerySchema },
|
|
41
|
+
responses: createRouteResponses(PackageDetailResponseSchema, {
|
|
42
|
+
includeErrorResponses: true,
|
|
43
|
+
}),
|
|
44
|
+
});
|
|
45
|
+
packageRoutes.openapi(packageDetailRoute, packageHandler.getPackageDetail);
|
|
46
|
+
const toolsRoute = createRoute({
|
|
47
|
+
method: 'get',
|
|
48
|
+
path: '/packages/tools',
|
|
49
|
+
request: { query: packageNameQuerySchema },
|
|
50
|
+
responses: createRouteResponses(ToolsResponseSchema, {
|
|
51
|
+
includeErrorResponses: true,
|
|
52
|
+
}),
|
|
53
|
+
});
|
|
54
|
+
packageRoutes.openapi(toolsRoute, packageHandler.listTools);
|
|
55
|
+
const executeToolRoute = createRoute({
|
|
56
|
+
method: 'post',
|
|
57
|
+
path: '/packages/run',
|
|
58
|
+
request: {
|
|
59
|
+
body: {
|
|
60
|
+
content: {
|
|
61
|
+
'application/json': {
|
|
62
|
+
schema: ToolExecuteSchema,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
required: true,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
responses: createRouteResponses(ExecuteToolResponseSchema, {
|
|
69
|
+
includeErrorResponses: true,
|
|
70
|
+
}),
|
|
37
71
|
});
|
|
72
|
+
packageRoutes.openapi(executeToolRoute, packageHandler.executeTool);
|
package/dist/api/package-so.d.ts
CHANGED
|
@@ -1,209 +1,7 @@
|
|
|
1
1
|
import type { MCPServerPackageConfig, ToolExecute } from '../types';
|
|
2
2
|
import type { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
3
|
export declare class PackageSO {
|
|
4
|
-
executeTool(request: ToolExecute): Promise<
|
|
5
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
6
|
-
} & {
|
|
7
|
-
content: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
8
|
-
type: import("zod").ZodLiteral<"text">;
|
|
9
|
-
text: import("zod").ZodString;
|
|
10
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
11
|
-
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
12
|
-
type: import("zod").ZodLiteral<"text">;
|
|
13
|
-
text: import("zod").ZodString;
|
|
14
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
15
|
-
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
16
|
-
type: import("zod").ZodLiteral<"text">;
|
|
17
|
-
text: import("zod").ZodString;
|
|
18
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
19
|
-
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
20
|
-
type: import("zod").ZodLiteral<"image">;
|
|
21
|
-
data: import("zod").ZodString;
|
|
22
|
-
mimeType: import("zod").ZodString;
|
|
23
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
24
|
-
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
25
|
-
type: import("zod").ZodLiteral<"image">;
|
|
26
|
-
data: import("zod").ZodString;
|
|
27
|
-
mimeType: import("zod").ZodString;
|
|
28
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
29
|
-
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
30
|
-
type: import("zod").ZodLiteral<"image">;
|
|
31
|
-
data: import("zod").ZodString;
|
|
32
|
-
mimeType: import("zod").ZodString;
|
|
33
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
34
|
-
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
35
|
-
type: import("zod").ZodLiteral<"audio">;
|
|
36
|
-
data: import("zod").ZodString;
|
|
37
|
-
mimeType: import("zod").ZodString;
|
|
38
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
39
|
-
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
40
|
-
type: import("zod").ZodLiteral<"audio">;
|
|
41
|
-
data: import("zod").ZodString;
|
|
42
|
-
mimeType: import("zod").ZodString;
|
|
43
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
44
|
-
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
45
|
-
type: import("zod").ZodLiteral<"audio">;
|
|
46
|
-
data: import("zod").ZodString;
|
|
47
|
-
mimeType: import("zod").ZodString;
|
|
48
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
49
|
-
}, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
|
50
|
-
name: import("zod").ZodString;
|
|
51
|
-
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
52
|
-
}, {
|
|
53
|
-
uri: import("zod").ZodString;
|
|
54
|
-
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
55
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
56
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
57
|
-
}>, {
|
|
58
|
-
type: import("zod").ZodLiteral<"resource_link">;
|
|
59
|
-
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
|
60
|
-
name: import("zod").ZodString;
|
|
61
|
-
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
62
|
-
}, {
|
|
63
|
-
uri: import("zod").ZodString;
|
|
64
|
-
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
65
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
66
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
67
|
-
}>, {
|
|
68
|
-
type: import("zod").ZodLiteral<"resource_link">;
|
|
69
|
-
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<import("zod").objectUtil.extendShape<{
|
|
70
|
-
name: import("zod").ZodString;
|
|
71
|
-
title: import("zod").ZodOptional<import("zod").ZodString>;
|
|
72
|
-
}, {
|
|
73
|
-
uri: import("zod").ZodString;
|
|
74
|
-
description: import("zod").ZodOptional<import("zod").ZodString>;
|
|
75
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
76
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
77
|
-
}>, {
|
|
78
|
-
type: import("zod").ZodLiteral<"resource_link">;
|
|
79
|
-
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<{
|
|
80
|
-
type: import("zod").ZodLiteral<"resource">;
|
|
81
|
-
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
82
|
-
uri: import("zod").ZodString;
|
|
83
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
84
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
85
|
-
}, {
|
|
86
|
-
text: import("zod").ZodString;
|
|
87
|
-
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
88
|
-
uri: import("zod").ZodString;
|
|
89
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
90
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
91
|
-
}, {
|
|
92
|
-
text: import("zod").ZodString;
|
|
93
|
-
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
94
|
-
uri: import("zod").ZodString;
|
|
95
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
96
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
97
|
-
}, {
|
|
98
|
-
text: import("zod").ZodString;
|
|
99
|
-
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
100
|
-
uri: import("zod").ZodString;
|
|
101
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
102
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
103
|
-
}, {
|
|
104
|
-
blob: import("zod").ZodString;
|
|
105
|
-
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
106
|
-
uri: import("zod").ZodString;
|
|
107
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
108
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
109
|
-
}, {
|
|
110
|
-
blob: import("zod").ZodString;
|
|
111
|
-
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
112
|
-
uri: import("zod").ZodString;
|
|
113
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
114
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
115
|
-
}, {
|
|
116
|
-
blob: import("zod").ZodString;
|
|
117
|
-
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
118
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
119
|
-
}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{
|
|
120
|
-
type: import("zod").ZodLiteral<"resource">;
|
|
121
|
-
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
122
|
-
uri: import("zod").ZodString;
|
|
123
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
124
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
125
|
-
}, {
|
|
126
|
-
text: import("zod").ZodString;
|
|
127
|
-
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
128
|
-
uri: import("zod").ZodString;
|
|
129
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
130
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
131
|
-
}, {
|
|
132
|
-
text: import("zod").ZodString;
|
|
133
|
-
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
134
|
-
uri: import("zod").ZodString;
|
|
135
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
136
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
137
|
-
}, {
|
|
138
|
-
text: import("zod").ZodString;
|
|
139
|
-
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
140
|
-
uri: import("zod").ZodString;
|
|
141
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
142
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
143
|
-
}, {
|
|
144
|
-
blob: import("zod").ZodString;
|
|
145
|
-
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
146
|
-
uri: import("zod").ZodString;
|
|
147
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
148
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
149
|
-
}, {
|
|
150
|
-
blob: import("zod").ZodString;
|
|
151
|
-
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
152
|
-
uri: import("zod").ZodString;
|
|
153
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
154
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
155
|
-
}, {
|
|
156
|
-
blob: import("zod").ZodString;
|
|
157
|
-
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
158
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
159
|
-
}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{
|
|
160
|
-
type: import("zod").ZodLiteral<"resource">;
|
|
161
|
-
resource: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
162
|
-
uri: import("zod").ZodString;
|
|
163
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
164
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
165
|
-
}, {
|
|
166
|
-
text: import("zod").ZodString;
|
|
167
|
-
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
168
|
-
uri: import("zod").ZodString;
|
|
169
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
170
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
171
|
-
}, {
|
|
172
|
-
text: import("zod").ZodString;
|
|
173
|
-
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
174
|
-
uri: import("zod").ZodString;
|
|
175
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
176
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
177
|
-
}, {
|
|
178
|
-
text: import("zod").ZodString;
|
|
179
|
-
}>, import("zod").ZodTypeAny, "passthrough">>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
180
|
-
uri: import("zod").ZodString;
|
|
181
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
182
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
183
|
-
}, {
|
|
184
|
-
blob: import("zod").ZodString;
|
|
185
|
-
}>, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<import("zod").objectUtil.extendShape<{
|
|
186
|
-
uri: import("zod").ZodString;
|
|
187
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
188
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
189
|
-
}, {
|
|
190
|
-
blob: import("zod").ZodString;
|
|
191
|
-
}>, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<import("zod").objectUtil.extendShape<{
|
|
192
|
-
uri: import("zod").ZodString;
|
|
193
|
-
mimeType: import("zod").ZodOptional<import("zod").ZodString>;
|
|
194
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
195
|
-
}, {
|
|
196
|
-
blob: import("zod").ZodString;
|
|
197
|
-
}>, import("zod").ZodTypeAny, "passthrough">>]>;
|
|
198
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
199
|
-
}, import("zod").ZodTypeAny, "passthrough">>]>, "many">>;
|
|
200
|
-
structuredContent: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
201
|
-
isError: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
202
|
-
}, import("zod").ZodTypeAny, "passthrough"> | import("zod").objectOutputType<{
|
|
203
|
-
_meta: import("zod").ZodOptional<import("zod").ZodObject<{}, "passthrough", import("zod").ZodTypeAny, import("zod").objectOutputType<{}, import("zod").ZodTypeAny, "passthrough">, import("zod").objectInputType<{}, import("zod").ZodTypeAny, "passthrough">>>;
|
|
204
|
-
} & {
|
|
205
|
-
toolResult: import("zod").ZodUnknown;
|
|
206
|
-
}, import("zod").ZodTypeAny, "passthrough">>;
|
|
4
|
+
executeTool(request: ToolExecute): Promise<unknown>;
|
|
207
5
|
listTools(packageName: string): Promise<Tool[]>;
|
|
208
6
|
getPackageDetail(packageName: string): Promise<MCPServerPackageConfig>;
|
|
209
7
|
}
|
package/dist/api/package-so.js
CHANGED
|
@@ -49,7 +49,7 @@ export class PackageSO {
|
|
|
49
49
|
}
|
|
50
50
|
catch (error) {
|
|
51
51
|
console.warn(`Warn retrieving tools for package ${packageName}:`, error.message);
|
|
52
|
-
//
|
|
52
|
+
// if tools cannot be retrieved, set tools to undefined
|
|
53
53
|
tools = undefined;
|
|
54
54
|
}
|
|
55
55
|
const packageConfigWithTools = Object.assign(Object.assign({}, packageConfig), { tools });
|
package/dist/api/package.test.js
CHANGED
|
@@ -11,8 +11,7 @@ describe('PackageSO - MCP Tool Execution Service Test', () => {
|
|
|
11
11
|
envs: {},
|
|
12
12
|
};
|
|
13
13
|
const result = await toolSO.executeTool(request);
|
|
14
|
-
expect(result
|
|
15
|
-
expect(result.data).toEqual({
|
|
14
|
+
expect(result).toEqual({
|
|
16
15
|
content: [],
|
|
17
16
|
message: 'Hello, Mike!',
|
|
18
17
|
});
|
package/dist/helper.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export declare const typedAllPackagesList: Record<string, {
|
|
|
6
6
|
category?: string | undefined;
|
|
7
7
|
validated?: boolean | undefined;
|
|
8
8
|
tools?: Record<string, {
|
|
9
|
-
name?: string | undefined;
|
|
10
9
|
description?: string | undefined;
|
|
10
|
+
name?: string | undefined;
|
|
11
11
|
}> | undefined;
|
|
12
12
|
}>;
|
|
13
13
|
export declare function getPackageConfigByKey(packageKey: string): MCPServerPackageConfig;
|