import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { ToolHandler } from "../confluent/tools/base-tools.js"; import { ToolName } from "../confluent/tools/tool-name.js"; import { ServerRuntime } from "../server-runtime.js"; /** Properties recorded for each tool invocation. */ export interface ToolCallProps { toolName: ToolName; /** From {@linkcode McpServer.server.getClientVersion}, undefined pre-handshake. */ clientName: string | undefined; /** From {@linkcode McpServer.server.getClientVersion}, undefined pre-handshake. */ clientVersion: string | undefined; durationMs: number; status: "success" | "error"; } /** Optional callback invoked once per tool call with timing + status. */ export type TrackToolCall = (props: ToolCallProps) => void; export interface CreateMcpServerOptions { /** Surfaced via {@linkcode McpServer.server.getServerVersion}. */ serverVersion: string; /** Each entry is registered as a tool on the new server instance. */ toolHandlers: Map; /** Injected into every {@linkcode ToolHandler.handle} invocation. */ runtime: ServerRuntime; /** Per-tool-call telemetry hook. Defaults to a no-op. */ track?: TrackToolCall; } /** Builds a fresh {@link McpServer} with every supplied {@linkcode ToolHandler} registered. */ export declare function createMcpServer({ serverVersion, toolHandlers, runtime, track, }: CreateMcpServerOptions): McpServer; //# sourceMappingURL=server.d.ts.map