@cloudbase/cloudbase-mcp 2.25.9 → 2.26.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/508.index.cjs +4 -4
- package/dist/cli.cjs +9 -3
- package/dist/index.cjs +49942 -30467
- package/dist/index.d.ts +34 -1
- package/dist/index.js +616 -102
- package/package.json +1 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import CloudBase from '@cloudbase/manager-node';
|
|
2
2
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { RegisteredTool } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
4
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
5
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
+
import type { ToolAnnotations as ToolAnnotations_2 } from '@modelcontextprotocol/sdk/types.js';
|
|
4
7
|
|
|
5
8
|
export declare const ALL_SUPPORTED_RUNTIMES: ("Nodejs20.19" | "Nodejs18.15" | "Nodejs16.13" | "Nodejs14.18" | "Nodejs12.16" | "Nodejs10.15" | "Nodejs8.9" | "Python3.10" | "Python3.9" | "Python3.7" | "Python3.6" | "Python2.7" | "Php8.0" | "Php7.4" | "Php7.2" | "Java8" | "Java11" | "Golang1")[];
|
|
6
9
|
|
|
@@ -32,6 +35,19 @@ export declare type CloudBaseOptions = CloudBaseConfigBase & {
|
|
|
32
35
|
requestFn?: CloudApiRequestFn;
|
|
33
36
|
};
|
|
34
37
|
|
|
38
|
+
/**
|
|
39
|
+
* registerTool config with CloudBase `annotations.category` retained after
|
|
40
|
+
* MCP SDK >=1.26 closed ToolAnnotations to strip unknown keys at the type level.
|
|
41
|
+
*/
|
|
42
|
+
export declare type CloudBaseRegisterToolConfig = {
|
|
43
|
+
title?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
inputSchema?: any;
|
|
46
|
+
outputSchema?: any;
|
|
47
|
+
annotations?: ToolAnnotations;
|
|
48
|
+
_meta?: Record<string, unknown>;
|
|
49
|
+
};
|
|
50
|
+
|
|
35
51
|
/**
|
|
36
52
|
* Create a manager with the provided CloudBase options, without using cache
|
|
37
53
|
* @param cloudBaseOptions Provided CloudBase options
|
|
@@ -161,7 +177,7 @@ export declare interface ExtendedMcpServer extends McpServer {
|
|
|
161
177
|
logger?: Logger;
|
|
162
178
|
enabledPlugins?: string[];
|
|
163
179
|
pluginOptions?: PluginOptions;
|
|
164
|
-
/**
|
|
180
|
+
/** Registered tools for external hosts (e.g. WeChat IDE) to re-register. */
|
|
165
181
|
toolDefs: Array<{
|
|
166
182
|
name: string;
|
|
167
183
|
description: string;
|
|
@@ -169,6 +185,11 @@ export declare interface ExtendedMcpServer extends McpServer {
|
|
|
169
185
|
handler: (input: any) => Promise<any>;
|
|
170
186
|
}>;
|
|
171
187
|
setLogger(logger: Logger): void;
|
|
188
|
+
/**
|
|
189
|
+
* Same as MCP SDK registerTool, but annotations may include CloudBase `category`.
|
|
190
|
+
* Handler typing stays intentionally loose to match existing tool call sites.
|
|
191
|
+
*/
|
|
192
|
+
registerTool(name: string, config: CloudBaseRegisterToolConfig, cb: (...args: any[]) => any): RegisteredTool;
|
|
172
193
|
}
|
|
173
194
|
|
|
174
195
|
export declare function formatRuntimeList(): string;
|
|
@@ -528,6 +549,18 @@ declare class TelemetryReporter {
|
|
|
528
549
|
|
|
529
550
|
export declare const telemetryReporter: TelemetryReporter;
|
|
530
551
|
|
|
552
|
+
export { Tool }
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* CloudBase extends MCP ToolAnnotations with a stable `category` hint used by
|
|
556
|
+
* IDE UIs for grouping. SDK >=1.26 types annotations as a closed/strip object,
|
|
557
|
+
* so we keep category via an intersection while still passing it through at
|
|
558
|
+
* runtime (listTools returns registered annotations without schema stripping).
|
|
559
|
+
*/
|
|
560
|
+
export declare type ToolAnnotations = ToolAnnotations_2 & {
|
|
561
|
+
category?: string;
|
|
562
|
+
};
|
|
563
|
+
|
|
531
564
|
export declare interface ToolResponse {
|
|
532
565
|
success: boolean;
|
|
533
566
|
[key: string]: any;
|