/** * MCP Tools Integration * * This file provides utilities for integrating with Model Context Protocol (MCP) servers. * * Features: * - Convert MCP tools to AI-compatible tool format * - Handle tool execution with proper result parsing * - Support for various MCP server transport types * - Azure OpenAI compatible tool naming (underscore separator instead of colon) * - Azure OpenAI compatible schema validation (ensures type: "object" for all tools) */ import { Client } from '@modelcontextprotocol/sdk/client/index.js'; export type MCPConfig = { servers: Record; transport?: 'stdio'; } | { url: string; headers?: Record; transport: 'sse' | 'streamable-http'; } | { type: 'http' | 'sse' | 'streamable-http'; url: string; headers?: Record; }>; }; export type MCPServerConfig = { name: string; transport: 'stdio' | 'sse' | 'streamable-http'; command?: string; args?: string[]; env?: Record; url?: string; headers?: Record; }; /** * Validate and fix JSON schema for Azure OpenAI compatibility * Azure requires all tool parameters to have type: "object" */ export declare function validateToolSchema(schema: any): any; /** * Convert MCP config JSON format to normalized server configs */ export declare function parseServersFromConfig(config: MCPConfig): MCPServerConfig[]; /** * Connect to an MCP server using the specified configuration */ export declare function connectMCPServer(serverConfig: MCPServerConfig): Promise; /** * Convert MCP tools to AI-compatible tool format */ export declare function mcpToolsToAiTools(client: Client, serverName: string): Promise>; //# sourceMappingURL=mcp-tools.d.ts.map