import type { Env, MiddlewareHandler, ValidationTargets } from "hono/types"; import { Tool, type ToolConfig } from "../tool"; import { type ResourceConfig, type TResourceUri } from "../resource"; import type { Hono } from "hono"; import { type RouteInfo } from "jsonv-ts/hono"; import { Schema, type ObjectSchema } from "jsonv-ts"; import { McpServer } from "../server"; import { type McpOptionsBase } from "./mcp.middleware"; declare const $symbol: unique symbol; export type McpFeatureTool = { type: "tool"; tool: { name: string; config: Omit & { inputSchema?: Partial>; noErrorCodes?: number[]; }; }; }; export type McpFeatureResource = { type: "resource"; resource: { name: string; uri: TResourceUri; config: ResourceConfig; }; }; export type McpFeature = McpFeatureTool | McpFeatureResource; export type McpFeatureWithRouteInfo = T & { info: RouteInfo<{ useSchemas: true; }>; path: string; }; export declare const mcpTool: (name: string, config?: McpFeatureTool["tool"]["config"]) => MiddlewareHandler & { [$symbol]: { type: string; tool: { name: string; config: Omit & { inputSchema?: Partial>; noErrorCodes?: number[]; }; }; }; }; export declare const mcpResource: (name: string, uri: TResourceUri, config?: ResourceConfig) => MiddlewareHandler & { [$symbol]: { type: string; resource: { name: string; uri: `${string}://${string}`; config: ResourceConfig; }; }; }; export declare const replaceUrlParam: (urlString: string, params: Record) => string; export declare function infoValidationTargetsToSchema(validation?: Partial>, opts?: { noSpecialTargetKeys?: boolean; }): ObjectSchema | undefined; export declare function payloadToValidationTargetPayload(payload: object, schema: Schema): Partial>>; export declare function featureInfoToRequest(feature: McpFeatureWithRouteInfo, params: any, opts?: { headers?: Record; inputSchema?: ObjectSchema; }): Request; export declare function getMcpFeatures(hono: Hono): McpFeatureWithRouteInfo[]; export declare function getMcpServer(hono: Hono): McpServer<{}, Tool[], import("..").Resource[]>; export declare function withMcp>(hono: H, opts?: Omit): import("hono/hono-base").HonoBase<{}, import("hono/types").BlankSchema, "/">; export {};