import type { ToolTelemetryContext } from '../types.js';
/** MCP `_meta` key for Apify Actor run information. Namespaced per MCP spec. */
export declare const APIFY_ACTOR_RUN_META_KEY = "com.apify/ActorRun";
/**
 * Builds usage metadata for MCP response from a source object containing Apify run costs.
 * Nests fields under the `com.apify/ActorRun` namespaced key as required by the MCP `_meta` spec
 * (https://modelcontextprotocol.io/specification/2025-11-25/basic/index#_meta).
 * @returns `{ 'com.apify/ActorRun': { usageTotalUsd, usageUsd } }`, or undefined if no usage data.
 */
export declare function buildUsageMeta(source: {
    usageTotalUsd?: number;
    usageUsd?: unknown;
}): Record<string, unknown> | undefined;
/**
 * Helper to build a content response for MCP from an array of text strings.
 *
 * Status model:
 * - `isError` is MCP-visible — returned to the client.
 * - `telemetry` is server-internal — attached as `toolTelemetry` on the response,
 *   then stripped by `extractToolTelemetry()` before the response reaches the client.
 *   Contains tool outcome (toolStatus, failureCategory, etc.) used for Segment telemetry.
 */
export declare function buildMCPResponse(options: {
    texts: string[];
    isError?: boolean;
    telemetry?: ToolTelemetryContext;
    structuredContent?: unknown;
    _meta?: Record<string, unknown>;
}): {
    _meta?: Record<string, unknown> | undefined;
    structuredContent?: {} | null | undefined;
    toolTelemetry?: ToolTelemetryContext | undefined;
    content: {
        type: "text";
        text: string;
    }[];
    isError: boolean;
};
/** User-facing error text for tool execution failures with HTTP-aware hints. */
export declare function getToolCallErrorUserText(toolName: string, error: unknown): string;
//# sourceMappingURL=mcp.d.ts.map