xmcp 0.3.2 → 0.3.3
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/cli.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/runtime/adapter-express.js +1 -1
- package/dist/runtime/adapter-nextjs.js +1 -1
- package/dist/runtime/http.js +1 -1
- package/dist/runtime/stdio.js +1 -1
- package/dist/types/openai-meta.d.ts +30 -0
- package/dist/types/tool.d.ts +6 -1
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OpenAI tool invocation metadata
|
|
3
|
+
*/
|
|
4
|
+
export interface OpenAIToolInvocation {
|
|
5
|
+
/**
|
|
6
|
+
* Message displayed while the tool is executing
|
|
7
|
+
* @example "Hand-tossing a map..."
|
|
8
|
+
*/
|
|
9
|
+
invoking?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Message displayed after the tool completes
|
|
12
|
+
* @example "Served a fresh map!"
|
|
13
|
+
*/
|
|
14
|
+
invoked?: string;
|
|
15
|
+
}
|
|
16
|
+
/** OpenAI metadata for MCP tools.*/
|
|
17
|
+
export interface OpenAIMetadata {
|
|
18
|
+
/** Tool invocation status messages */
|
|
19
|
+
toolInvocation?: OpenAIToolInvocation;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the widget is accessible in the UI
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
widgetAccessible?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the result can produce a widget
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
resultCanProduceWidget?: boolean;
|
|
30
|
+
}
|
package/dist/types/tool.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { OpenAIMetadata } from "./openai-meta";
|
|
2
3
|
export interface ToolAnnotations {
|
|
3
4
|
/** Human-readable title for the tool */
|
|
4
5
|
title?: string;
|
|
@@ -19,7 +20,11 @@ export interface ToolMetadata {
|
|
|
19
20
|
description: string;
|
|
20
21
|
/** Optional hints about tool behavior */
|
|
21
22
|
annotations?: ToolAnnotations;
|
|
22
|
-
|
|
23
|
+
/** Metadata for the tool. Supports nested OpenAI metadata and other vendor extensions. */
|
|
24
|
+
_meta?: {
|
|
25
|
+
openai?: OpenAIMetadata;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
};
|
|
23
28
|
}
|
|
24
29
|
export type ToolSchema = Record<string, z.ZodType<unknown, z.ZodTypeDef, unknown>>;
|
|
25
30
|
/**
|