import type { Resource } from '../../../shared/models/resource.model.js'; import type { ServerStatus } from '../../../shared/types/common.types.js'; /** * Server metadata resource content. */ export interface ServerMetadata { name: string; status: ServerStatus; toolsCount: number; tools: Record; resourcesCount: number; tags: Array>; lastHeartbeat: number; uptime: number; description: string; } /** * Generates dynamic Hub resources based on currently connected MCP servers. * * This method creates virtual resources that represent the current state of connected * servers. Each resource has a unique URI following the hub://servers/{serverName} pattern. * * The generated resources include: * - Server metadata: hub://servers/{serverName} * * @returns {Resource[]} Array of dynamically generated MCP resource objects * * @example * ```typescript * const resources = generateDynamicResources(); * console.log(`Generated ${resources.length} dynamic resources`); * ``` */ export declare function generateDynamicResources(): Resource[]; /** * Reads content from a specific Hub resource URI. * * This method provides access to dynamically generated Hub resources by parsing the URI * and returning the appropriate content based on the resource type. It supports three * types of resources: * - Server metadata: hub://servers/{serverName} * - Tools list: hub://servers/{serverName}/tools * - Resources list: hub://servers/{serverName}/resources * * The method includes comprehensive validation of URI format and server existence, * throwing descriptive errors for invalid requests. * * @param {string} uri - Resource URI to read (e.g., hub://servers/server-name) * @returns {Promise} Resource content based on URI type * @throws {Error} If URI format is invalid, server not found, or resource type unknown * * @example * ```typescript * // Read server metadata * const serverInfo = await readResource('hub://servers/my-mcp-server'); * * // Read tools list * const tools = await readResource('hub://servers/my-mcp-server/tools'); * ``` */ export declare function readResource(uri: string, language?: string): Promise; //# sourceMappingURL=resource-generator.d.ts.map