Files
qwen-code/packages/core/src/prompts/mcp-prompts.ts
2025-08-25 22:04:53 +00:00

20 lines
467 B
TypeScript

/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { Config } from '../config/config.js';
import type { DiscoveredMCPPrompt } from '../tools/mcp-client.js';
export function getMCPServerPrompts(
config: Config,
serverName: string,
): DiscoveredMCPPrompt[] {
const promptRegistry = config.getPromptRegistry();
if (!promptRegistry) {
return [];
}
return promptRegistry.getPromptsByServer(serverName);
}