UNPKG

xmcp

Version:

The TypeScript MCP framework

13 lines (12 loc) • 805 B
import { McpServer } from "@modelcontextprotocol/server"; import { ZodRawShape } from "zod/v3"; import type { McpMiddleware } from "@/types/mcp-middleware"; import { ToolMetadata } from "@/types/tool"; import { ToolFile } from "./server"; /** Validates if a value is a valid Zod schema object */ export declare function isZodRawShape(value: unknown): value is ZodRawShape; export declare function pathToName(path: string): string; /** Ensures toolConfig has its own annotations object with a title */ export declare function ensureAnnotations(toolConfig: Pick<ToolMetadata, "name" | "annotations">): void; /** Loads tools and injects them into the server */ export declare function addToolsToServer(server: McpServer, toolModules: Map<string, ToolFile>, middleware?: readonly McpMiddleware[]): McpServer;