Add support for complex types in McpToolProperty with snippets examples #33
+204
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements support for complex data types in
McpToolProperty, enabling developers to define array, object, number, and boolean parameters instead of being limited to string types only.What's Changed
New Property Type Constants
Added comprehensive type constants in
ToolsInformation.cs:ArrayPropertyType- for arrays and listsObjectPropertyType- for complex objectsNumberPropertyType- for numeric dataBooleanPropertyType- for true/false valuesStringPropertyType- for text data (replacing genericPropertyType)Snippets-Focused Examples
Enhanced
SnippetsTool.cswith practical examples demonstrating complex type usage:Enhanced Documentation
Updated README.md with comprehensive examples showing:
Backward Compatibility
All existing code continues to work unchanged. The original
PropertyTypeconstant is preserved, and existing tools using string parameters require no modifications.This change directly addresses the original issue request for defining complex types like arrays and objects while maintaining focus on the repository's core snippet management functionality.
Fixes #28.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.