xmcp 1.7.2 → 1.8.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.
@@ -1,9 +1,9 @@
1
- import type { McpMiddleware } from "@/types/mcp-middleware";
2
1
  import type { McpServer } from "@modelcontextprotocol/server";
2
+ import type { McpMiddleware, McpToolMetadata } from "@/types/mcp-middleware";
3
3
  import { type McpToolHandler } from "./transformers/tool";
4
4
  export declare function normalizeMcpMiddleware(value: unknown): McpMiddleware[];
5
5
  /** Tool middleware stays inside SDK input/output validation and tool-error handling. */
6
- export declare function wrapToolWithMiddleware(handler: McpToolHandler, name: string, middleware: readonly McpMiddleware[]): McpToolHandler;
6
+ export declare function wrapToolWithMiddleware(handler: McpToolHandler, metadata: McpToolMetadata, middleware: readonly McpMiddleware[]): McpToolHandler;
7
7
  /**
8
8
  * McpServer installs listing/completion handlers lazily during registration and
9
9
  * has no public handler getter. Decorate that public registration seam only
@@ -1,8 +1,8 @@
1
1
  import { McpServer } from "@modelcontextprotocol/server";
2
2
  import { ZodRawShape } from "zod/v3";
3
- import { ToolFile } from "./server";
4
- import { ToolMetadata } from "@/types/tool";
5
3
  import type { McpMiddleware } from "@/types/mcp-middleware";
4
+ import { ToolMetadata } from "@/types/tool";
5
+ import { ToolFile } from "./server";
6
6
  /** Validates if a value is a valid Zod schema object */
7
7
  export declare function isZodRawShape(value: unknown): value is ZodRawShape;
8
8
  export declare function pathToName(path: string): string;