import { ToolDefinition } from "./_chunks/index.mjs"; import { McpHost, McpServerInfo, callTool, errorResult, listTools, toolAnnotations } from "./_chunks/mcp-answers.mjs"; import { Server } from "@modelcontextprotocol/server"; /** * Creates an unconnected MCP server exposing the tools. * * Built on the low-level `Server` of MCP SDK v2, which the SDK marks * `@deprecated`, not on `McpServer`. `McpServer.registerTool` in 2.2.0 would * take the schema, but it answers `toString`, `constructor` and `__proto__` as * "Tool toString disabled" (a lookup that reaches `Object.prototype`), echoes a * raw tool name with newlines and escapes into its error, joins validation * failures into one line and passes a thrown message through unsanitized. * * `details` reach the client only from a tool with `output`, as `structuredContent`: * clients that see structured output prefer it over `content` and would hide * the readable answer. Every fact a follow-up call needs belongs in the text. * * A progress notification that fails to send goes to `onerror`, never to the tool. * * A client that declares `elicitation` gets `ask`, through `input_required` on both revisions. * A 2026 request carries its capabilities itself, a 2025 one declared them at `initialize`. * * `host` is an {@link McpHost}: the HTTP request on an HTTP transport, the call's `_meta` on any. * * @param info - Name, version and optional title, description, icons and website, sent as given. * @param tools - Tools to serve. * @returns {Server} Unconnected MCP server. * @throws {ToolDefinitionError} When two tools share a name. */ export declare function createMcpServer(info: McpServerInfo, tools: readonly ToolDefinition[]): Server; export { type McpHost, type McpServerInfo, callTool, errorResult, listTools, toolAnnotations };