import { ToolDefinition as ToolDefinition$1 } from "./_chunks/index.mjs"; import { McpHost } from "./_chunks/mcp-answers.mjs"; import { JsonSchema, ToolDefinition } from "h3-mcp"; /** An h3-mcp tool whose `inputSchema` is the plain JSON Schema `tools/list` sends. */ export type H3Tool = ToolDefinition; /** * Turns tools into h3-mcp tool definitions for `defineMcpHandler({ tools })`. * * Each entry carries what `listTools` lists, and its handler answers through * `callTool`, so the text, the validation lines and the sanitized errors are the * ones every other MCP transport gives. The schema goes out as plain JSON * Schema, which h3-mcp passes through without validating; the core validates * instead. An unknown name never reaches a handler: h3-mcp answers it itself * with a JSON-RPC error. * * `host` is an {@link McpHost} with the event's request and the call's raw `_meta`. * * `ask` reaches a client with `elicitation` on the 2026 revision only: h3-mcp has no 2025 shim. * * Imports only types from h3-mcp, so the adapter loads neither h3-mcp nor the MCP SDK. * * @param info - Server info; `name` is the word in the message for an unknown tool. * @param tools - Tools to serve. * @returns {H3Tool[]} Tool definitions in the order given. * @throws {ToolDefinitionError} When two tools share a name. */ export declare function toH3Tools(info: { readonly name: string; }, tools: readonly ToolDefinition$1[]): H3Tool[]; export type { McpHost };