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.
@@ -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
+ }
@@ -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
- _meta?: Record<string, unknown>;
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
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "xmcp",
3
3
  "description": "The MCP framework",
4
- "version": "0.3.2",
4
+ "version": "0.3.3",
5
5
  "author": {
6
6
  "name": "Basement Studio",
7
7
  "email": "hello@basement.studio",