import type { Group, Output, PluginFactoryOptions, ResolveNameParams } from '@kubb/core' import type { contentType, Oas } from '@kubb/oas' import type { ClientImportPath, PluginClient } from '@kubb/plugin-client' import type { Exclude, Include, Override, ResolvePathOptions } from '@kubb/plugin-oas' import type { Generator } from '@kubb/plugin-oas/generators' export type Options = { /** * Specify the export location for the files and define the behavior of the output * @default { path: 'mcp', barrelType: 'named' } */ output?: Output /** * Define which contentType should be used. * By default, the first JSON valid mediaType is used */ contentType?: contentType client?: ClientImportPath & Pick /** * Transform parameter names to a specific casing format. * When set to 'camelcase', parameter names in path, query, and header params will be transformed to camelCase. * This should match the paramsCasing setting used in @kubb/plugin-ts. * @default undefined * @deprecated Removed in v5, where parameters always use camelCase names. Set `paramsCasing: 'camelcase'` now to match the v5 behavior. See https://kubb.dev/docs/5.x/migration-guide */ paramsCasing?: 'camelcase' /** * Group the mcp requests based on the provided name. */ group?: Group /** * Array containing exclude parameters to exclude/skip tags/operations/methods/paths. */ exclude?: Array /** * Array containing include parameters to include tags/operations/methods/paths. */ include?: Array /** * Array containing override parameters to override `options` based on tags/operations/methods/paths. */ override?: Array> transformers?: { /** * Customize the names based on the type that is provided by the plugin. */ name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string } /** * Define some generators next to the Mcp generators. * @deprecated Removed in v5. To add custom output, build your own plugin. See https://kubb.dev/docs/5.x/migration-guide */ generators?: Array> } type ResolvedOptions = { output: Output group: Options['group'] client: Pick paramsCasing: Options['paramsCasing'] } export type PluginMcp = PluginFactoryOptions<'plugin-mcp', Options, ResolvedOptions, never, ResolvePathOptions>