You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add validation for prompt name uniqueness across the service.
- **New `PromptUniquenessValidator`**: Detects duplicate prompt names within services
- **Updated examples**: Updated the examples to use the new naming convention.
- **Only Service and Operations support**: Since we are not able to parse the prompts at resource level in the MCP Server, updated the trait selector to allow only service or operation level definition.
Prevents runtime conflicts when services define prompts with the same name at different levels (e.g., service vs operation). This supports the established naming convention of `serviceName__prompt-name-as-defined-in-trait` which provides namespace disambiguation and aligns with MCP specification requirements.
Copy file name to clipboardExpand all lines: examples/mcp-server/src/main/resources/software/amazon/smithy/java/example/server/mcp/main.smithy
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ use smithy.ai#prompts
19
19
arguments: GetCodingStatisticsInput
20
20
preferWhen: "User wants to analyze developer productivity, review coding activity, or understand technology usage patterns"
21
21
}
22
-
employee_lookup: {
22
+
Test_employee: {
23
23
description: "General employee lookup and information retrieval service"
24
24
template: "This service provides employee information including personal details and coding statistics. Use get_employee_info for basic details or get_coding_stats for development metrics."
25
25
preferWhen: "User needs any employee-related information or wants to understand available employee data"
0 commit comments