/** * MCP Server Registration Helpers * * Extracted from mcp-server.ts to keep it under 500 lines. * Handles resource and prompt registration with the MCP SDK. */ import type { McpServer } from '@modelcontextprotocol/server'; import type { IDatabaseAdapter } from '../database/core/interfaces.js'; import type { ServerRuntime } from '../utils/maintenance-lock.js'; import type { BriefingConfig } from '../handlers/resources/shared.js'; import type { GitHubIntegration } from '../github/github-integration/index.js'; /** Raw resource definition from getResources() */ export interface ResourceDefinition { uri: string; name: string; description?: string; mimeType?: string; icons?: { src: string; mimeType?: string; sizes?: string[]; }[]; capabilities?: { requiresTeamScope?: boolean; requiresAdminScope?: boolean; requiresAuditScope?: boolean; }; } /** Raw prompt definition from getPrompts() */ export interface PromptDefinition { name: string; description?: string; arguments?: { name: string; description: string; required?: boolean; }[]; icons?: { src: string; mimeType?: string; sizes?: string[]; }[]; capabilities?: { requiresTeamScope?: boolean; requiresAdminScope?: boolean; requiresAuditScope?: boolean; }; } /** Callback that reads a resource by URI and returns structured content. */ export type ResourceReadHandler = (uri: URL, mimeType: string) => Promise<{ contents: { uri: string; mimeType: string; text: string; annotations?: Record; }[]; }>; /** * Register all resources with the MCP server. * * Handles both static URIs and template URIs (containing `{variable}` patterns). */ export declare function registerResources(server: McpServer, resources: ResourceDefinition[], handleResourceRead: ResourceReadHandler, runtime?: ServerRuntime): void; /** * Register all prompts with the MCP server. * * Builds Zod schemas from prompt argument definitions. * Only creates argsSchema when there are actual arguments; passing an empty * shape causes the SDK to wrap it in z.object({}) which rejects undefined * when the client omits arguments (e.g. session-summary with no args). */ export declare function registerPrompts(server: McpServer, prompts: PromptDefinition[], db: IDatabaseAdapter, teamDb?: IDatabaseAdapter, runtime?: ServerRuntime, github?: GitHubIntegration, briefingConfig?: BriefingConfig): void; //# sourceMappingURL=registration.d.ts.map