import { type CompletionRequest, type CompletionResult, type McpExecutionContext, type McpModuleOptions, type PaginatedResult, type PromptGetResult, type ResourceReadResult, type ToolCallResult, type ToolListEntry } from '@nest-mcp/common'; import { McpRegistryService } from '../discovery/registry.service'; import { McpExceptionFilterRunner } from './exception-filter.runner'; export declare class McpExecutorService { private readonly registry; private readonly exceptionFilters; private readonly logger; private readonly pageSize; constructor(registry: McpRegistryService, exceptionFilters: McpExceptionFilterRunner, options: McpModuleOptions); /** * Build the full list of tool entries (unpaginated) in the same shape * surfaced by `tools/list`. Exposed so that the pipeline can insert a * catalog-presentation transform (see {@link ExposureService}) before * pagination — filtering or annotating entries post-pagination would * produce uneven page sizes. */ buildToolEntries(): ToolListEntry[]; listTools(cursor?: string): Promise>; callTool(name: string, args: Record, ctx: McpExecutionContext): Promise; /** * Walk `@UseFilters` metadata on the capability's class/method. If a filter * handles the error, render its result as an `McpError` (matches upstream * behavior — filter output flows back as a JSON-RPC error). Returns `null` * when no filter matches. */ private applyExceptionFilters; private validateInput; private normalizeToolResult; /** * Per MCP spec, validate the handler return against the tool's * `outputSchema` and stamp the parsed value onto `structuredContent`. * Falls back to the raw result object when the handler didn't pre-set * `structuredContent`. Skips quietly when there's nothing to validate. */ private attachStructuredContent; listResources(cursor?: string): Promise>>; listResourceTemplates(cursor?: string): Promise>>; readResource(uri: string, ctx: McpExecutionContext): Promise; /** * Funnel a raw user error from a resource/prompt handler through the * exception-filter pipeline. Existing protocol errors (`McpError` family) * are passed through untouched. Always returns a real `Error` subclass — * lets call sites narrow without an `unknown` cast. */ private processCapabilityError; private normalizeResourceResult; listPrompts(cursor?: string): Promise>>; getPrompt(name: string, args: Record, ctx: McpExecutionContext): Promise; complete(request: CompletionRequest): Promise; private defaultComplete; private defaultPromptComplete; private defaultResourceComplete; private normalizeCompletionResult; } //# sourceMappingURL=executor.service.d.ts.map