-
Notifications
You must be signed in to change notification settings - Fork 271
Improve error message for missing parameters in Kusto commands #575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances parameter validation by providing parameter names in exception messages. It adds a new overloaded method ValidateRequiredParameters that accepts named parameters as tuples, allowing for more descriptive error messages that include the parameter name when validation fails.
Key changes:
- Added overloaded
ValidateRequiredParametersmethod that accepts named parameters as tuples - Updated all
ValidateRequiredParameterscalls inKustoServiceto use the new named parameter format
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| core/Azure.Mcp.Core/src/Services/Azure/BaseAzureService.cs | Added new overloaded ValidateRequiredParameters method that accepts named parameters and provides parameter names in exception messages |
| tools/Azure.Mcp.Tools.Kusto/src/Services/KustoService.cs | Updated all ValidateRequiredParameters calls to use the new named parameter format with nameof() operator |
Co-authored-by: Copilot <[email protected]>
…hub.com/microsoft/mcp into user/prvavill/handle_missing_param_name
…soft#575) * Handling missing param name exception with parameter name * Update core/Azure.Mcp.Core/src/Services/Azure/BaseAzureService.cs Co-authored-by: Copilot <[email protected]> * fix to throw all missing params at once --------- Co-authored-by: Copilot <[email protected]>
What does this PR do?
when required parameter is not provided get cluster details tool, client sees error and the error info does not clearly say which parameter is missing
GitHub issue number?
#549
Pre-merge Checklist
servers/Azure.Mcp.Server/CHANGELOG.mdand/orservers/Fabric.Mcp.Server/CHANGELOG.mdfor product changes (features, bug fixes, UI/UX, updated dependencies)servers/Azure.Mcp.Server/README.mdand/orservers/Fabric.Mcp.Server/README.mddocumentation/docs/azmcp-commands.mdand/or/docs/fabric-commands.mdToolDescriptionEvaluatorand obtained a score of0.4or more and a top 3 ranking for all related test prompts/docs/e2eTestPrompts.mdcrypto mining, spam, data exfiltration, etc.)/azp run mcp - pullrequest - liveto run Live Test Pipeline