import type { Client } from "@modelcontextprotocol/sdk/client/index.js";
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
import { type ToolDefinition } from "@sheason/pi-coding-agent";
import type { McpClientHandle } from "./mcp-client.js";
import type { McpToolSummary } from "./types.js";
/** Matches `AgentToolResult["content"]` items from pi-agent-core. */
type AgentContentBlock = {
    type: "text";
    text: string;
} | {
    type: "image";
    data: string;
    mimeType: string;
};
export declare function buildMcpPrefixedToolName(serverName: string, toolName: string): string;
/**
 * Map MCP `CallToolResult` blocks to the agent's content block model.
 * Non-text/image blocks are coerced to text for LLM safety.
 */
export declare function mapCallToolResultToAgentContent(result: CallToolResult): AgentContentBlock[];
export type WrapMcpToolOutcome = (ToolDefinition & {
    name: string;
}) | {
    skipped: true;
    reason: string;
    toolName: string;
};
export declare function wrapMcpToolAsToolDefinition(serverName: string, client: Client, tool: McpToolSummary): WrapMcpToolOutcome;
export type McpServerBridgeSkipEntry = {
    kind: "tool" | "resource" | "prompt";
    name: string;
    reason: string;
};
/**
 * Synthesize the hub `list_resources` / `read_resource` / `list_prompts` / `get_prompt` tools
 * and merge them with server-declared tools.
 */
export declare function wrapMcpServerAsToolDefinitions(serverName: string, handle: McpClientHandle): {
    tools: ToolDefinition[];
    skipped: McpServerBridgeSkipEntry[];
};
export {};
//# sourceMappingURL=mcp-tool-bridge.d.ts.map