@mcp-b/webmcp-types 4.0.0 → 5.0.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/LICENSE +1 -1
- package/README.md +61 -175
- package/dist/common.d.ts +11 -293
- package/dist/common.d.ts.map +1 -1
- package/dist/index.d.ts +36 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/json-schema.d.ts +42 -186
- package/dist/json-schema.d.ts.map +1 -1
- package/dist/model-context.d.ts +64 -276
- package/dist/model-context.d.ts.map +1 -1
- package/dist/tool.d.ts +38 -156
- package/dist/tool.d.ts.map +1 -1
- package/package.json +10 -10
- package/src/common.ts +17 -362
- package/src/index.ts +45 -67
- package/src/json-schema.ts +62 -266
- package/src/model-context.ts +101 -378
- package/src/tool.ts +65 -212
package/dist/model-context.d.ts
CHANGED
|
@@ -1,303 +1,91 @@
|
|
|
1
|
-
import type { InputSchema,
|
|
1
|
+
import type { InputSchema, WebMcpToolInput } from './common.js';
|
|
2
2
|
import type { JsonSchemaForInference } from './json-schema.js';
|
|
3
|
-
import type { ToolDescriptor, ToolDescriptorFromSchema, ToolListItem,
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export interface ModelContextTestingToolInfo {
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
inputSchema?: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Tool info returned by Chromium's producer-facing ModelContext.getTools().
|
|
14
|
-
*/
|
|
15
|
-
export interface ModelContextToolInfo extends ModelContextTestingToolInfo {
|
|
16
|
-
title: string;
|
|
17
|
-
origin: string;
|
|
18
|
-
window: Window;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Options supported by ModelContextTesting.executeTool().
|
|
22
|
-
*/
|
|
23
|
-
export interface ModelContextTestingExecuteToolOptions {
|
|
24
|
-
signal?: AbortSignal;
|
|
3
|
+
import type { ModelContextTool, ModelContextToolFromSchema, ToolDescriptor, ToolDescriptorFromSchema, ToolListItem, WebMcpToolAnnotations } from './tool.js';
|
|
4
|
+
/** Options for tools exposed by descendant documents. */
|
|
5
|
+
export interface ModelContextGetToolOptions {
|
|
6
|
+
fromOrigins?: string[];
|
|
25
7
|
}
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
*
|
|
29
|
-
* The native runtime extends EventTarget and fires `toolchange` events.
|
|
30
|
-
*/
|
|
31
|
-
export interface ModelContextTesting extends EventTarget {
|
|
32
|
-
listTools(): ModelContextTestingToolInfo[];
|
|
33
|
-
executeTool(toolName: string, inputArgsJson: string, options?: ModelContextTestingExecuteToolOptions): Promise<string | null>;
|
|
34
|
-
getCrossDocumentScriptToolResult?(): Promise<string>;
|
|
35
|
-
ontoolchange: ((this: ModelContextTesting, ev: Event) => unknown) | null;
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated Use `addEventListener('toolchange', ...)` instead.
|
|
38
|
-
*/
|
|
39
|
-
registerToolsChangedCallback?(callback: () => void): void;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Polyfill-only testing extensions layered on top of ModelContextTesting.
|
|
43
|
-
*/
|
|
44
|
-
export interface ModelContextTestingPolyfillExtensions {
|
|
45
|
-
/**
|
|
46
|
-
* Registers a callback invoked when the tool list changes.
|
|
47
|
-
* @deprecated Use `addEventListener('toolchange', ...)` on native runtimes.
|
|
48
|
-
* Kept for polyfill backward compatibility.
|
|
49
|
-
*/
|
|
50
|
-
registerToolsChangedCallback(callback: () => void): void;
|
|
51
|
-
getToolCalls(): Array<{
|
|
52
|
-
toolName: string;
|
|
53
|
-
arguments: Record<string, unknown>;
|
|
54
|
-
timestamp: number;
|
|
55
|
-
}>;
|
|
56
|
-
clearToolCalls(): void;
|
|
57
|
-
setMockToolResponse(toolName: string, response: ToolResponse): void;
|
|
58
|
-
clearMockToolResponse(toolName: string): void;
|
|
59
|
-
clearAllMockToolResponses(): void;
|
|
60
|
-
getRegisteredTools(): ReturnType<ModelContextExtensions['listTools']>;
|
|
61
|
-
reset(): void;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Any supported tool descriptor.
|
|
65
|
-
*
|
|
66
|
-
* Uses `never` for args so descriptors with stricter argument objects remain assignable.
|
|
67
|
-
*/
|
|
68
|
-
export type AnyToolDescriptor = ToolDescriptor<never, unknown, string>;
|
|
69
|
-
/**
|
|
70
|
-
* Infers argument shape from a tool descriptor.
|
|
71
|
-
*/
|
|
72
|
-
export type InferToolArgs<TTool> = TTool extends ToolDescriptor<infer TArgs, infer _TResult, infer _TName> ? TArgs : never;
|
|
73
|
-
/**
|
|
74
|
-
* Infers result shape from a tool descriptor.
|
|
75
|
-
*/
|
|
76
|
-
export type InferToolResult<TTool> = TTool extends ToolDescriptor<infer _TArgs, infer TResult, infer _TName> ? TResult : never;
|
|
77
|
-
/**
|
|
78
|
-
* Union of tool names from a tuple/array of descriptors.
|
|
79
|
-
*/
|
|
80
|
-
export type ToolName<TTools extends readonly {
|
|
81
|
-
name: string;
|
|
82
|
-
}[]> = TTools[number]['name'];
|
|
83
|
-
/**
|
|
84
|
-
* Extracts a tool descriptor by name from a tuple/array.
|
|
85
|
-
*/
|
|
86
|
-
export type ToolByName<TTools extends readonly {
|
|
8
|
+
/** Tool metadata returned by `document.modelContext.getTools()`. */
|
|
9
|
+
export interface RegisteredTool {
|
|
87
10
|
name: string;
|
|
88
|
-
}[], TName extends ToolName<TTools>> = Extract<TTools[number], {
|
|
89
|
-
name: TName;
|
|
90
|
-
}>;
|
|
91
|
-
/**
|
|
92
|
-
* Tool argument type by tool name from a tuple/array.
|
|
93
|
-
*/
|
|
94
|
-
export type ToolArgsByName<TTools extends readonly {
|
|
95
|
-
name: string;
|
|
96
|
-
}[], TName extends ToolName<TTools>> = InferToolArgs<ToolByName<TTools, TName>>;
|
|
97
|
-
/**
|
|
98
|
-
* Tool result type by tool name from a tuple/array.
|
|
99
|
-
*/
|
|
100
|
-
export type ToolResultByName<TTools extends readonly {
|
|
101
|
-
name: string;
|
|
102
|
-
}[], TName extends ToolName<TTools>> = InferToolResult<ToolByName<TTools, TName>>;
|
|
103
|
-
/**
|
|
104
|
-
* Typed parameters for MCP-B compatibility `callTool`.
|
|
105
|
-
*
|
|
106
|
-
* When a tool has no args (`Record<string, never>`), `arguments` becomes optional.
|
|
107
|
-
*/
|
|
108
|
-
export type ToolCallParams<TName extends string = string, TArgs extends Record<string, unknown> = Record<string, never>> = {
|
|
109
|
-
name: TName;
|
|
110
|
-
} & (TArgs extends Record<string, never> ? {
|
|
111
|
-
arguments?: TArgs;
|
|
112
|
-
} : {
|
|
113
|
-
arguments: TArgs;
|
|
114
|
-
});
|
|
115
|
-
/**
|
|
116
|
-
* Event dispatched when a tool is called.
|
|
117
|
-
*/
|
|
118
|
-
export interface ToolCallEvent extends Event {
|
|
119
11
|
/**
|
|
120
|
-
*
|
|
12
|
+
* Present on every tool Chrome and `@mcp-b/webmcp-polyfill` return today --
|
|
13
|
+
* the spec defaults it to the empty string when a tool registers no title.
|
|
14
|
+
* Kept optional deliberately: webmcp#224 proposes dropping that default and
|
|
15
|
+
* omitting the member instead. Read it as `tool.title || tool.name`: today the
|
|
16
|
+
* spec default makes it an empty string, which `??` does not fall through.
|
|
121
17
|
*/
|
|
122
|
-
|
|
18
|
+
title?: string;
|
|
19
|
+
description: string;
|
|
123
20
|
/**
|
|
124
|
-
*
|
|
21
|
+
* A JSON Schema object since webmcp#241, rolling out from Chrome 154.0.8013
|
|
22
|
+
* (cross-document tools first). Chrome 149-153 -- most of the Origin Trial
|
|
23
|
+
* population -- and 154's same-document tools still return the serialized
|
|
24
|
+
* JSON string the change replaced. Consumers that support both generations
|
|
25
|
+
* must branch on `typeof` and guard the parse of the string arm.
|
|
125
26
|
*/
|
|
126
|
-
|
|
27
|
+
inputSchema?: InputSchema | string;
|
|
28
|
+
window: Window;
|
|
29
|
+
origin: string;
|
|
127
30
|
/**
|
|
128
|
-
*
|
|
31
|
+
* Absent when the tool registered no annotations -- both the spec and the
|
|
32
|
+
* polyfill omit the member rather than emitting an empty object. Each hint
|
|
33
|
+
* inside it is always populated, but the object itself is not guaranteed.
|
|
129
34
|
*/
|
|
130
|
-
|
|
35
|
+
annotations?: WebMcpToolAnnotations;
|
|
131
36
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
37
|
+
export interface ChromeModelContextExecuteToolOptions {
|
|
38
|
+
signal?: AbortSignal;
|
|
39
|
+
}
|
|
40
|
+
/** Experimental Chromium methods; feature-detect them before use. */
|
|
41
|
+
export interface ChromeModelContextExtensions {
|
|
42
|
+
executeTool?(tool: RegisteredTool, inputArguments: string, options?: ChromeModelContextExecuteToolOptions): Promise<string | null>;
|
|
43
|
+
}
|
|
44
|
+
/** @deprecated Metadata returned by `navigator.modelContextTesting`. */
|
|
45
|
+
export interface ModelContextTestingToolInfo {
|
|
139
46
|
name: string;
|
|
47
|
+
description: string;
|
|
48
|
+
inputSchema?: string;
|
|
140
49
|
}
|
|
141
|
-
/**
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
export interface ModelContextToolRegistrationHandle {
|
|
147
|
-
unregister(): void;
|
|
50
|
+
/** @deprecated Compatibility surface for Chromium's removed testing API. */
|
|
51
|
+
export interface ModelContextTesting extends EventTarget {
|
|
52
|
+
listTools(): ModelContextTestingToolInfo[];
|
|
53
|
+
executeTool(toolName: string, inputArgsJson: string, options?: ChromeModelContextExecuteToolOptions): Promise<string | null>;
|
|
54
|
+
ontoolchange: ((this: ModelContextTesting, event: Event) => unknown) | null;
|
|
148
55
|
}
|
|
149
|
-
/**
|
|
150
|
-
* @see {@link https://webmachinelearning.github.io/webmcp/#dictdef-modelcontextregistertooloptions}
|
|
151
|
-
*/
|
|
56
|
+
/** Options accepted by `ModelContext.registerTool()`. */
|
|
152
57
|
export interface ModelContextRegisterToolOptions {
|
|
153
|
-
/**
|
|
154
|
-
* An `AbortSignal` whose abortion unregisters the tool. A pre-aborted signal short-circuits registration.
|
|
155
|
-
*/
|
|
156
58
|
signal?: AbortSignal;
|
|
157
|
-
/**
|
|
158
|
-
* Origins that can observe this tool from other documents in the same tree.
|
|
159
|
-
*/
|
|
160
59
|
exposedTo?: string[];
|
|
161
60
|
}
|
|
61
|
+
type WidenedSchema<TSchema extends InputSchema> = string extends TSchema['type'] ? unknown : never;
|
|
162
62
|
/**
|
|
163
|
-
*
|
|
63
|
+
* Standard `document.modelContext` API.
|
|
64
|
+
* @see https://webmachinelearning.github.io/webmcp/#modelcontext
|
|
164
65
|
*/
|
|
165
|
-
export interface
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
*
|
|
169
|
-
* `execute(args)` is inferred from `inputSchema`, and when a literal object
|
|
170
|
-
* `outputSchema` is provided, `execute(...).structuredContent` is inferred too.
|
|
171
|
-
*/
|
|
172
|
-
registerTool<TInputSchema extends JsonSchemaForInference, TOutputSchema extends JsonSchemaForInference | undefined = undefined, TName extends string = string>(tool: ToolDescriptorFromSchema<TInputSchema, TOutputSchema, TName>, options?: ModelContextRegisterToolOptions): Promise<void>;
|
|
173
|
-
/**
|
|
174
|
-
* Registers a dynamic tool with explicitly typed args/result.
|
|
175
|
-
*/
|
|
176
|
-
registerTool<TInputSchema extends InputSchema, TArgs extends Record<string, unknown> = Record<string, unknown>, TName extends string = string>(tool: ToolDescriptor<TArgs, ToolRawResult, TName> & {
|
|
66
|
+
export interface ModelContext extends EventTarget {
|
|
67
|
+
registerTool<const TInputSchema extends JsonSchemaForInference, TResult = unknown, TName extends string = string>(tool: ModelContextToolFromSchema<TInputSchema, TResult, TName>, options?: ModelContextRegisterToolOptions): Promise<void>;
|
|
68
|
+
registerTool<TInputSchema extends InputSchema, TArgs extends WebMcpToolInput = WebMcpToolInput, TResult = unknown, TName extends string = string>(tool: ModelContextTool<TArgs, TResult, TName> & {
|
|
177
69
|
inputSchema: TInputSchema;
|
|
178
|
-
} &
|
|
179
|
-
|
|
180
|
-
* Registers a dynamic tool without an explicit inputSchema.
|
|
181
|
-
* Runtime defaults this to an empty object schema.
|
|
182
|
-
*/
|
|
183
|
-
registerTool<TArgs extends Record<string, unknown> = Record<string, unknown>, TName extends string = string>(tool: Omit<ToolDescriptor<TArgs, ToolRawResult, TName>, 'inputSchema'> & {
|
|
70
|
+
} & WidenedSchema<TInputSchema>, options?: ModelContextRegisterToolOptions): Promise<void>;
|
|
71
|
+
registerTool<TArgs extends WebMcpToolInput = Record<string, unknown>, TResult = unknown, TName extends string = string>(tool: Omit<ModelContextTool<TArgs, TResult, TName>, 'inputSchema'> & {
|
|
184
72
|
inputSchema?: undefined;
|
|
185
73
|
}, options?: ModelContextRegisterToolOptions): Promise<void>;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
* shape. Current Chromium returns JSON-stringified schemas here, matching
|
|
189
|
-
* ModelContextTesting.listTools().
|
|
190
|
-
*/
|
|
191
|
-
getTools(): Promise<ModelContextToolInfo[]>;
|
|
192
|
-
/**
|
|
193
|
-
* Executes a registered tool object returned from getTools().
|
|
194
|
-
*
|
|
195
|
-
* This mirrors Chromium's current producer-facing preview API. The testing API
|
|
196
|
-
* still executes by `(toolName, inputArgsJson)`.
|
|
197
|
-
*/
|
|
198
|
-
executeTool(tool: ModelContextToolInfo, inputArgsJson: string, options?: ModelContextTestingExecuteToolOptions): Promise<string | null>;
|
|
199
|
-
/**
|
|
200
|
-
* Handler invoked when the producer tool list changes.
|
|
201
|
-
*/
|
|
202
|
-
ontoolchange: ((this: ModelContextCore, ev: Event) => unknown) | null;
|
|
203
|
-
addEventListener(type: 'toolchange', listener: () => void, options?: boolean | AddEventListenerOptions): void;
|
|
204
|
-
removeEventListener(type: 'toolchange', listener: () => void, options?: boolean | EventListenerOptions): void;
|
|
205
|
-
dispatchEvent(event: Event): boolean;
|
|
74
|
+
getTools(options?: ModelContextGetToolOptions): Promise<RegisteredTool[]>;
|
|
75
|
+
ontoolchange: ((this: ModelContext, event: Event) => unknown) | null;
|
|
206
76
|
}
|
|
207
|
-
/**
|
|
208
|
-
* MCPB extension surface layered on top of strict WebMCP core.
|
|
209
|
-
* These members are intentionally non-standard.
|
|
210
|
-
*/
|
|
77
|
+
/** Non-standard methods exposed by MCP-B runtimes. */
|
|
211
78
|
export interface ModelContextExtensions {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
* Lists currently registered tools.
|
|
220
|
-
*/
|
|
79
|
+
registerTool<const TInputSchema extends JsonSchemaForInference, const TOutputSchema extends JsonSchemaForInference | undefined = undefined, TName extends string = string>(tool: ToolDescriptorFromSchema<TInputSchema, TOutputSchema, TName>, options?: ModelContextRegisterToolOptions): Promise<void>;
|
|
80
|
+
registerTool<TInputSchema extends InputSchema, TArgs extends WebMcpToolInput = WebMcpToolInput, TName extends string = string>(tool: ToolDescriptor<TArgs, unknown, TName> & {
|
|
81
|
+
inputSchema: TInputSchema;
|
|
82
|
+
} & WidenedSchema<TInputSchema>, options?: ModelContextRegisterToolOptions): Promise<void>;
|
|
83
|
+
registerTool<TArgs extends WebMcpToolInput = Record<string, unknown>, TName extends string = string>(tool: Omit<ToolDescriptor<TArgs, unknown, TName>, 'inputSchema'> & {
|
|
84
|
+
inputSchema?: undefined;
|
|
85
|
+
}, options?: ModelContextRegisterToolOptions): Promise<void>;
|
|
221
86
|
listTools(): ToolListItem[];
|
|
222
|
-
/**
|
|
223
|
-
* Executes a registered tool by name.
|
|
224
|
-
*
|
|
225
|
-
* @deprecated Prefer the WebMCP standard producer path: get a descriptor from
|
|
226
|
-
* `getTools()` and pass it to `executeTool(tool, inputArgsJson)`. This method
|
|
227
|
-
* remains as an MCP-B compatibility convenience.
|
|
228
|
-
*/
|
|
229
|
-
callTool<TName extends string = string, TArgs extends Record<string, unknown> = Record<string, unknown>>(params: {
|
|
230
|
-
name: TName;
|
|
231
|
-
arguments?: TArgs;
|
|
232
|
-
}): Promise<ToolResponse>;
|
|
233
|
-
/**
|
|
234
|
-
* Adds a listener for tool invocation events.
|
|
235
|
-
*/
|
|
236
|
-
addEventListener(type: 'toolcall', listener: (event: ToolCallEvent) => void | Promise<void>, options?: boolean | AddEventListenerOptions): void;
|
|
237
|
-
/**
|
|
238
|
-
* Adds a listener for tool list changes.
|
|
239
|
-
*/
|
|
240
|
-
addEventListener(type: 'toolchange', listener: () => void, options?: boolean | AddEventListenerOptions): void;
|
|
241
|
-
/**
|
|
242
|
-
* @deprecated Use `'toolchange'` instead. Will be removed in the next major.
|
|
243
|
-
*/
|
|
244
|
-
addEventListener(type: 'toolschanged', listener: () => void, options?: boolean | AddEventListenerOptions): void;
|
|
245
|
-
/**
|
|
246
|
-
* Removes a listener for tool invocation events.
|
|
247
|
-
*/
|
|
248
|
-
removeEventListener(type: 'toolcall', listener: (event: ToolCallEvent) => void | Promise<void>, options?: boolean | EventListenerOptions): void;
|
|
249
|
-
/**
|
|
250
|
-
* Removes a listener for tool list changes.
|
|
251
|
-
*/
|
|
252
|
-
removeEventListener(type: 'toolchange', listener: () => void, options?: boolean | EventListenerOptions): void;
|
|
253
|
-
/**
|
|
254
|
-
* @deprecated Use `'toolchange'` instead. Will be removed in the next major.
|
|
255
|
-
*/
|
|
256
|
-
removeEventListener(type: 'toolschanged', listener: () => void, options?: boolean | EventListenerOptions): void;
|
|
257
|
-
/**
|
|
258
|
-
* Dispatches an event.
|
|
259
|
-
*/
|
|
260
|
-
dispatchEvent(event: Event): boolean;
|
|
261
87
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
export type ModelContext = ModelContextCore;
|
|
266
|
-
/**
|
|
267
|
-
* Full runtime shape including MCPB extensions.
|
|
268
|
-
*/
|
|
269
|
-
export type ModelContextWithExtensions = ModelContextCore & ModelContextExtensions;
|
|
270
|
-
/**
|
|
271
|
-
* Strongly-typed `ModelContext` view derived from known tool descriptors.
|
|
272
|
-
*
|
|
273
|
-
* This is useful when your project has a static tool registry and you want
|
|
274
|
-
* name-aware inference for MCP-B compatibility `callTool`.
|
|
275
|
-
*/
|
|
276
|
-
export type TypedModelContext<TTools extends readonly {
|
|
277
|
-
name: string;
|
|
278
|
-
}[] = readonly ToolDescriptor[]> = ModelContextWithExtensions & {
|
|
279
|
-
/**
|
|
280
|
-
* Executes a known tool with name-aware argument and response inference.
|
|
281
|
-
*
|
|
282
|
-
* @deprecated Prefer the WebMCP standard producer path: get a descriptor from
|
|
283
|
-
* `getTools()` and pass it to `executeTool(tool, inputArgsJson)`. This typed
|
|
284
|
-
* convenience remains available for MCP-B compatibility.
|
|
285
|
-
*/
|
|
286
|
-
callTool<TName extends ToolName<TTools>>(params: ToolCallParams<TName, ToolArgsByName<TTools, TName>>): Promise<ToolResultByName<TTools, TName>>;
|
|
287
|
-
/**
|
|
288
|
-
* Fallback call signature for unknown or dynamically-discovered tools.
|
|
289
|
-
*
|
|
290
|
-
* @deprecated Prefer the WebMCP standard producer path: get a descriptor from
|
|
291
|
-
* `getTools()` and pass it to `executeTool(tool, inputArgsJson)`. This typed
|
|
292
|
-
* convenience remains available for MCP-B compatibility.
|
|
293
|
-
*/
|
|
294
|
-
callTool(params: {
|
|
295
|
-
name: string;
|
|
296
|
-
arguments?: Record<string, unknown>;
|
|
297
|
-
}): Promise<ToolResponse>;
|
|
298
|
-
/**
|
|
299
|
-
* Lists tools with a narrowed name union.
|
|
300
|
-
*/
|
|
301
|
-
listTools(): Array<ToolListItem<ToolName<TTools>>>;
|
|
302
|
-
};
|
|
88
|
+
export type ChromeModelContext = ModelContext & ChromeModelContextExtensions;
|
|
89
|
+
export type ModelContextWithExtensions = Omit<ModelContext, 'registerTool'> & ModelContextExtensions;
|
|
90
|
+
export {};
|
|
303
91
|
//# sourceMappingURL=model-context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-context.d.ts","sourceRoot":"","sources":["../src/model-context.ts"],"names":[],"mappings":"AAA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AAE,OAAO,CAAC,EACvD,KAAK,SAAS,MAAM,GAAG,MAAM,EAE7B,IAAI,EAAE,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,aAAa,CAAC,GAAG;QACjE,WAAW,CAAC,EAAE,SAAS,CAAC;KACzB,EACD,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB,SAAS,IAAI,YAAY,EAAE,CAAC;CAC7B;AAED,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,4BAA4B,CAAC;AAC7E,MAAM,MAAM,0BAA0B,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC,GACzE,sBAAsB,CAAC"}
|
package/dist/tool.d.ts
CHANGED
|
@@ -1,174 +1,56 @@
|
|
|
1
|
-
import type { CallToolResult,
|
|
1
|
+
import type { CallToolResult, InputSchema, WebMcpToolInput } from './common.js';
|
|
2
2
|
import type { InferArgsFromInputSchema, InferJsonSchema, JsonSchemaForInference } from './json-schema.js';
|
|
3
|
+
import type { ToolAnnotations as McpToolAnnotations } from '@modelcontextprotocol/server';
|
|
3
4
|
/**
|
|
4
|
-
* Annotations
|
|
5
|
-
*
|
|
6
|
-
* @see {@link https://webmachinelearning.github.io/webmcp/#dictdef-toolannotations}
|
|
7
|
-
* @see {@link https://spec.modelcontextprotocol.io/specification/server/tools/}
|
|
5
|
+
* Annotations in the WebMCP tool dictionary.
|
|
6
|
+
* @see https://webmachinelearning.github.io/webmcp/#dictdef-toolannotations
|
|
8
7
|
*/
|
|
9
|
-
export interface
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
13
|
-
title?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Indicates the tool is read-only.
|
|
16
|
-
*/
|
|
17
|
-
readOnlyHint?: boolean | 'true' | 'false';
|
|
18
|
-
/**
|
|
19
|
-
* Indicates the tool's output may include content from outside the page's trust boundary.
|
|
20
|
-
*/
|
|
21
|
-
untrustedContentHint?: boolean | 'true' | 'false';
|
|
22
|
-
/**
|
|
23
|
-
* Indicates the tool may perform destructive actions.
|
|
24
|
-
*/
|
|
25
|
-
destructiveHint?: boolean | 'true' | 'false';
|
|
26
|
-
/**
|
|
27
|
-
* Indicates the tool can be called repeatedly without changing outcome.
|
|
28
|
-
*/
|
|
29
|
-
idempotentHint?: boolean | 'true' | 'false';
|
|
30
|
-
/**
|
|
31
|
-
* Indicates the tool may reach beyond local context (network, external systems, etc.).
|
|
32
|
-
*/
|
|
33
|
-
openWorldHint?: boolean | 'true' | 'false';
|
|
8
|
+
export interface WebMcpToolAnnotations {
|
|
9
|
+
readOnlyHint?: boolean;
|
|
10
|
+
untrustedContentHint?: boolean;
|
|
34
11
|
}
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
*/
|
|
38
|
-
export type ToolRawResult = unknown;
|
|
39
|
-
/**
|
|
40
|
-
* Tool execute return value accepted by WebMCP descriptor types.
|
|
41
|
-
*/
|
|
42
|
-
export type ToolExecuteResult<TResult = ToolRawResult> = TResult extends CallToolResult ? TResult : CallToolResult | TResult;
|
|
43
|
-
/**
|
|
44
|
-
* Per-call client provided to tool handlers.
|
|
45
|
-
*/
|
|
46
|
-
export interface ModelContextClient {
|
|
47
|
-
/**
|
|
48
|
-
* Requests user interaction during the current tool call.
|
|
49
|
-
*/
|
|
50
|
-
requestUserInteraction(callback: () => Promise<unknown>): Promise<unknown>;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* MCPB extension context with additional elicitation helper.
|
|
54
|
-
*/
|
|
55
|
-
export interface ToolExecutionContext extends ModelContextClient {
|
|
56
|
-
/**
|
|
57
|
-
* Requests user input for the current tool call.
|
|
58
|
-
*
|
|
59
|
-
* This function is bound to the active tool call and should only be used
|
|
60
|
-
* during execution of that call.
|
|
61
|
-
*/
|
|
62
|
-
elicitInput(params: ElicitationParams): Promise<ElicitationResult>;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Value that may be returned synchronously or via Promise.
|
|
66
|
-
*/
|
|
12
|
+
/** MCP annotations plus WebMCP's untrusted-content hint. */
|
|
13
|
+
export type ToolAnnotations = McpToolAnnotations & WebMcpToolAnnotations;
|
|
67
14
|
export type MaybePromise<T> = T | Promise<T>;
|
|
68
15
|
/**
|
|
69
|
-
* Tool
|
|
70
|
-
*
|
|
71
|
-
* Tools are functions that AI models can call to perform actions or retrieve
|
|
72
|
-
* information. This interface uses JSON Schema for input/output typing.
|
|
73
|
-
*
|
|
74
|
-
* @template TArgs - Tool input arguments.
|
|
75
|
-
* @template TResult - Tool execution raw result shape (or full CallToolResult).
|
|
76
|
-
* @template TName - Tool name literal type.
|
|
77
|
-
*
|
|
78
|
-
* @see {@link https://spec.modelcontextprotocol.io/specification/server/tools/}
|
|
16
|
+
* Tool dictionary accepted by the standard browser API.
|
|
17
|
+
* @see https://webmachinelearning.github.io/webmcp/#dictdef-modelcontexttool
|
|
79
18
|
*/
|
|
80
|
-
export interface
|
|
81
|
-
/**
|
|
82
|
-
* Unique tool identifier.
|
|
83
|
-
*/
|
|
19
|
+
export interface ModelContextTool<TArgs extends WebMcpToolInput = Record<string, unknown>, TResult = unknown, TName extends string = string> {
|
|
84
20
|
name: TName;
|
|
85
|
-
/**
|
|
86
|
-
* Optional user-facing label.
|
|
87
|
-
*/
|
|
88
21
|
title?: string;
|
|
89
|
-
/**
|
|
90
|
-
* Human-readable summary of what the tool does.
|
|
91
|
-
*/
|
|
92
22
|
description: string;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
23
|
+
inputSchema?: InputSchema | undefined;
|
|
24
|
+
annotations?: WebMcpToolAnnotations;
|
|
25
|
+
execute: (input: TArgs) => MaybePromise<TResult>;
|
|
26
|
+
}
|
|
27
|
+
/** Standard tool dictionary with input inferred from a JSON Schema literal. */
|
|
28
|
+
export type ModelContextToolFromSchema<TInputSchema extends InputSchema, TResult = unknown, TName extends string = string> = Omit<ModelContextTool<InferArgsFromInputSchema<TInputSchema>, TResult, TName>, 'inputSchema'> & {
|
|
29
|
+
inputSchema: TInputSchema;
|
|
30
|
+
};
|
|
31
|
+
/** MCP-B tool dictionary with output metadata. */
|
|
32
|
+
export type ToolDescriptor<TArgs extends WebMcpToolInput = Record<string, unknown>, TResult = unknown, TName extends string = string> = Omit<ModelContextTool<TArgs, TResult, TName>, 'annotations'> & {
|
|
100
33
|
outputSchema?: JsonSchemaForInference;
|
|
101
|
-
/**
|
|
102
|
-
* Optional behavior hints for LLM planners.
|
|
103
|
-
*/
|
|
104
34
|
annotations?: ToolAnnotations;
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
execute: (args: TArgs, client: ModelContextClient) => MaybePromise<ToolExecuteResult<TResult>>;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Tool response shape inferred from an `outputSchema`.
|
|
112
|
-
*
|
|
113
|
-
* When a literal object output schema is provided, `structuredContent` is
|
|
114
|
-
* narrowed to the inferred schema type for wrapped MCP responses.
|
|
115
|
-
*
|
|
116
|
-
* @template TOutputSchema - Optional literal JSON object schema.
|
|
117
|
-
*/
|
|
118
|
-
export type ToolResultFromOutputSchema<TOutputSchema extends JsonSchemaForInference | undefined = undefined> = TOutputSchema extends JsonSchemaForInference ? Omit<CallToolResult, 'structuredContent'> & {
|
|
35
|
+
};
|
|
36
|
+
/** MCP response with `structuredContent` inferred from an output schema. */
|
|
37
|
+
export type ToolResultFromOutputSchema<TOutputSchema extends JsonSchemaForInference | undefined = undefined> = [TOutputSchema] extends [undefined] ? CallToolResult : TOutputSchema extends JsonSchemaForInference ? Omit<CallToolResult, 'structuredContent'> & {
|
|
119
38
|
structuredContent: InferJsonSchema<TOutputSchema>;
|
|
120
|
-
} :
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
* Tool descriptor whose `execute` args are inferred from a JSON Schema.
|
|
127
|
-
*
|
|
128
|
-
* For widened/non-literal schemas, arguments fall back to `Record<string, unknown>`.
|
|
129
|
-
* When `outputSchema` is an inferable literal object schema, `structuredContent` is inferred.
|
|
130
|
-
*
|
|
131
|
-
* @template TInputSchema - JSON Schema for tool arguments.
|
|
132
|
-
* @template TOutputSchema - Optional JSON schema for `structuredContent`.
|
|
133
|
-
* @template TName - Tool name literal type.
|
|
134
|
-
* @template TResult - Optional result type override constrained by inferred output schema.
|
|
135
|
-
*/
|
|
136
|
-
export type ToolDescriptorFromSchema<TInputSchema extends {
|
|
137
|
-
type?: string | readonly string[];
|
|
138
|
-
}, TOutputSchema extends JsonSchemaForInference | undefined = undefined, TName extends string = string> = Omit<ToolDescriptor<InferArgsFromInputSchema<TInputSchema>, ToolExecuteResultFromOutputSchema<TOutputSchema>, TName>, 'execute' | 'inputSchema' | 'outputSchema'> & {
|
|
39
|
+
} : never;
|
|
40
|
+
type ExecuteResult<TOutputSchema extends JsonSchemaForInference | undefined> = [
|
|
41
|
+
TOutputSchema
|
|
42
|
+
] extends [undefined] ? unknown : TOutputSchema extends JsonSchemaForInference ? InferJsonSchema<TOutputSchema> | ToolResultFromOutputSchema<TOutputSchema> : never;
|
|
43
|
+
/** Tool dictionary with input and output inferred from JSON Schema literals. */
|
|
44
|
+
export type ToolDescriptorFromSchema<TInputSchema extends InputSchema, TOutputSchema extends JsonSchemaForInference | undefined = undefined, TName extends string = string> = Omit<ToolDescriptor<InferArgsFromInputSchema<TInputSchema>, ExecuteResult<TOutputSchema>, TName>, 'inputSchema' | 'outputSchema'> & {
|
|
139
45
|
inputSchema: TInputSchema;
|
|
140
|
-
|
|
141
|
-
} & (TOutputSchema extends JsonSchemaForInference ? {
|
|
142
|
-
outputSchema: TOutputSchema;
|
|
143
|
-
} : {
|
|
46
|
+
} & ([TOutputSchema] extends [undefined] ? {
|
|
144
47
|
outputSchema?: undefined;
|
|
48
|
+
} : {
|
|
49
|
+
outputSchema: TOutputSchema;
|
|
145
50
|
});
|
|
146
|
-
/**
|
|
147
|
-
|
|
148
|
-
* Provides metadata about a registered tool without exposing the execute function.
|
|
149
|
-
*
|
|
150
|
-
* @template TName - Tool name literal type.
|
|
151
|
-
*/
|
|
152
|
-
export interface ToolListItem<TName extends string = string> {
|
|
153
|
-
/**
|
|
154
|
-
* Unique tool identifier.
|
|
155
|
-
*/
|
|
156
|
-
name: TName;
|
|
157
|
-
/**
|
|
158
|
-
* Human-readable summary of what the tool does.
|
|
159
|
-
*/
|
|
160
|
-
description: string;
|
|
161
|
-
/**
|
|
162
|
-
* JSON Schema describing accepted input arguments.
|
|
163
|
-
*/
|
|
51
|
+
/** Tool metadata returned by the MCP-B `listTools()` extension. */
|
|
52
|
+
export type ToolListItem<TName extends string = string> = Omit<ToolDescriptor<Record<string, unknown>, unknown, TName>, 'execute' | 'inputSchema'> & {
|
|
164
53
|
inputSchema: InputSchema;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
*/
|
|
168
|
-
outputSchema?: JsonSchemaForInference;
|
|
169
|
-
/**
|
|
170
|
-
* Optional behavior hints for LLM planners.
|
|
171
|
-
*/
|
|
172
|
-
annotations?: ToolAnnotations;
|
|
173
|
-
}
|
|
54
|
+
};
|
|
55
|
+
export {};
|
|
174
56
|
//# sourceMappingURL=tool.d.ts.map
|
package/dist/tool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"tool.d.ts","sourceRoot":"","sources":["../src/tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,KAAK,EACV,wBAAwB,EACxB,eAAe,EACf,sBAAsB,EACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,IAAI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