/** * Programmatic API for OpenAPI to MCP Generator * Allows direct usage from other Node.js applications */ import { OpenAPIV3 } from 'openapi-types'; import { McpToolDefinition } from './types/index.js'; /** * Options for generating the MCP tools */ export interface GetToolsOptions { /** Optional base URL to override the one in the OpenAPI spec */ baseUrl?: string; /** Whether to dereference the OpenAPI spec */ dereference?: boolean; /** Array of operation IDs to exclude from the tools list */ excludeOperationIds?: string[]; /** Optional filter function to exclude tools based on custom criteria */ filterFn?: (tool: McpToolDefinition) => boolean; /** Default behavior for x-mcp filtering (default: true = include by default) */ defaultInclude?: boolean; /** * Allow resolving external http(s) `$ref` references in the spec. * Default false: external refs are rejected to prevent SSRF during parsing. */ allowExternalRefs?: boolean; /** * Maximum length for generated tool names (Claude Desktop limit is 64). * Default 64. */ maxToolNameLength?: number; } /** * Get a list of tools from an OpenAPI specification * * @param specPathOrUrl Path or URL to the OpenAPI specification * @param options Options for generating the tools * @returns Promise that resolves to an array of tool definitions */ export declare function getToolsFromOpenApi(specPathOrUrl: string | OpenAPIV3.Document, options?: GetToolsOptions): Promise; export { McpToolDefinition };