import { registerAppTool } from "@modelcontextprotocol/ext-apps/server"; import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import type { ZodRawShapeCompat } from "@modelcontextprotocol/sdk/server/zod-compat.js"; import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; import { type WithoutApps } from "../../clientApps"; import { type AppData } from "../../handlers/shared/appData"; /** The handler registerAppTool expects for this input schema. */ type AppToolHandler = Parameters>[3]; interface TomTomAppTool { name: string; title: string; description: string; inputSchema: Args; /** The app under dist/apps as "/"; it is served as ui://tomtom-//app.html. */ app: `${string}/${string}`; /** False for tools that read only data bundled with the server. */ openWorldHint?: boolean; /** True for a tool whose result is only its app, which a client without MCP Apps can't use. */ uiOnly?: boolean; /** * True for a tool its app may run again, through `tomtom-get-app-data`, for app data * missing from the result. Only for a tool that calls no TomTom API: a re-run would * be a second billed request that usage figures can't tell from the first. */ refetch?: boolean; } /** The app for every tool whose result is places, routes or a search area. */ export declare const PLACES_AND_ROUTES_APP = "map/places-and-routes"; type Extra = Parameters>[1]; /** * The full app data of app tool `name` called with `args`, for an app that * didn't get it inline. Any replica can answer, since the tool runs again. * Undefined when the tool failed. * * @throws {IncorrectError} For a tool not registered with `refetch`, or arguments the tool rejects. */ export declare function appDataOf(server: McpServer, name: string, args: unknown, extra: Extra): Promise<{ appData?: AppData; result: CallToolResult; }>; /** Registers a read-only TomTom tool and, once per server, the MCP app that renders its result. */ export declare function registerTomTomAppTool(server: McpServer, { name, title, description, inputSchema, app, openWorldHint, uiOnly, refetch, }: TomTomAppTool, handler: AppToolHandler): WithoutApps; export {}; //# sourceMappingURL=registerTomTomAppTool.d.ts.map