From the MCP Server Gap Analysis & Implementation Plan, this issue tracks the gaps and implementation steps related to Prompts.
Gap Summary
| # |
Gap |
Priority |
Spec Section |
| 6 |
Prompt title not emitted in prompts/list |
Medium |
Prompts |
| 13 |
notifications/prompts/list_changed not sent |
Low |
Prompts |
Implementation Steps
Step 3: Extract new annotation fields during deployment scanning
File: wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/deployment/MCPServerDependencyProcessor.java
3b. processPrompts() — extract from @Prompt annotation:
title from annotation.value("title")
Step 4c: prompts/list response
File: wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/server/PromptMessageHandler.java — promptsList()
Add "title" if non-empty.
Step 5: Declare listChanged in capabilities
File: wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/server/MCPMessageHandler.java
Update the capabilities declaration:
capabilities.put("prompts", Map.of("listChanged", true));
This declares that the server may send list-changed notifications. The actual sending mechanism is Step 8.
Step 8: Implement list-changed notifications
8a. Infrastructure for sending notifications to all connections
File: wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/api/ConnectionManager.java
Add a method to broadcast a notification to all active connections:
void broadcast(JsonObject notification);
8b. Send notifications/prompts/list_changed
These would be triggered when the registry changes (e.g., hot deployment of a new WAR). The WildFly deployment processor could fire these on deploy/undeploy. This is inherently tied to WildFly's deployment lifecycle.
For now, provide the infrastructure (broadcast method) and wire it into the deployment lifecycle hooks.
From the MCP Server Gap Analysis & Implementation Plan, this issue tracks the gaps and implementation steps related to Prompts.
Gap Summary
titlenot emitted inprompts/listnotifications/prompts/list_changednot sentImplementation Steps
Step 3: Extract new annotation fields during deployment scanning
File:
wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/deployment/MCPServerDependencyProcessor.java3b.
processPrompts()— extract from@Promptannotation:titlefromannotation.value("title")Step 4c:
prompts/listresponseFile:
wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/server/PromptMessageHandler.java—promptsList()Add
"title"if non-empty.Step 5: Declare
listChangedin capabilitiesFile:
wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/server/MCPMessageHandler.javaUpdate the capabilities declaration:
This declares that the server may send list-changed notifications. The actual sending mechanism is Step 8.
Step 8: Implement list-changed notifications
8a. Infrastructure for sending notifications to all connections
File:
wildfly-mcp/subsystem/src/main/java/org/wildfly/extension/mcp/api/ConnectionManager.javaAdd a method to broadcast a notification to all active connections:
8b. Send
notifications/prompts/list_changedThese would be triggered when the registry changes (e.g., hot deployment of a new WAR). The WildFly deployment processor could fire these on deploy/undeploy. This is inherently tied to WildFly's deployment lifecycle.
For now, provide the infrastructure (broadcast method) and wire it into the deployment lifecycle hooks.