refactor: Improve resource template support (#576)
- Provide separation of concerns between static resources and parameterized resource templates. - Add AsyncResourceTemplateSpecification and SyncResourceTemplateSpecification for both McpServerFeatures and McpStatelessServerFeatures - Change resource template storage from List to Map to acomodate the resource read handler. - Add runtime management methods: addResourceTemplate(), removeResourceTemplate(), listResourceTemplates() - Improve error handling by using IllegalArgumentException/IllegalStateException instead of McpError - Add new interfaces (Meta, Identifier) and reorganize schema hierarchy - Enhance completion request validation with better error messages - Add ResourceTemplate.Builder for easier template construction - Update all server implementations (Async, Sync, Stateless) consistently - Add type-safe constants for reference types (PromptReference.TYPE, ResourceReference.TYPE) - Add tests for new resource template management functionality - Clean up imports and remove unused dependencies Co-authored-by:Pascal Vantrepote <pascal@confluent.io> Signed-off-by:
Christian Tzolov <christian.tzolov@broadcom.com>
Loading
Please sign in to comment