MCPcopy Create free account
hub / github.com/echoVic/blade-code / handleListPrompts

Method handleListPrompts

src/mcp/server/MCPServer.ts:350–377  ·  view source on GitHub ↗

* 处理列出提示

(clientId: string, message: MCPMessage)

Source from the content-addressed store, hash-verified

348 * 处理列出提示
349 */
350 private async handleListPrompts(clientId: string, message: MCPMessage): Promise<void> {
351 const prompts: MCPPrompt[] = [
352 {
353 name: 'code_review',
354 description: 'Review code for quality, security, and best practices',
355 arguments: [
356 {
357 name: 'file_path',
358 description: 'Path to the file to review',
359 required: true,
360 },
361 ],
362 },
363 {
364 name: 'generate_docs',
365 description: 'Generate documentation for code',
366 arguments: [
367 {
368 name: 'file_path',
369 description: 'Path to the file to document',
370 required: true,
371 },
372 ],
373 },
374 ];
375
376 this.sendResponse(clientId, message.id, { prompts });
377 }
378
379 /**
380 * 处理获取提示

Callers 1

handleMessageMethod · 0.95

Calls 1

sendResponseMethod · 0.95

Tested by

no test coverage detected