import type { ServerContext } from "./server-context.js"; import type { Envelope, Warning } from "./types.js"; export declare function ok(data: unknown, pagination?: Record, warnings?: Warning[]): Envelope; export declare function authHint(hasToken: boolean, status?: number): string; export declare function toolError(error: unknown, hasToken: boolean): Envelope; export declare function serializeEnvelope(envelope: Envelope): Envelope; export declare function handleTool(context: ServerContext, fn: () => Promise): Promise<{ content: { type: "text"; text: string; }[]; structuredContent: Envelope; }>; export declare function asToolResult(envelope: Envelope): { content: { type: "text"; text: string; }[]; structuredContent: Envelope; };