2025-07-25 20:56:33 +00:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2025-08-26 00:04:53 +02:00
|
|
|
import type { Config } from '../config/config.js';
|
|
|
|
|
import type { DiscoveredMCPPrompt } from '../tools/mcp-client.js';
|
2025-07-25 20:56:33 +00:00
|
|
|
|
|
|
|
|
export function getMCPServerPrompts(
|
|
|
|
|
config: Config,
|
|
|
|
|
serverName: string,
|
|
|
|
|
): DiscoveredMCPPrompt[] {
|
|
|
|
|
const promptRegistry = config.getPromptRegistry();
|
|
|
|
|
if (!promptRegistry) {
|
|
|
|
|
return [];
|
|
|
|
|
}
|
|
|
|
|
return promptRegistry.getPromptsByServer(serverName);
|
|
|
|
|
}
|