Conversation
Fix NPE on tool-call when no args are passed to the tools that expect args.
[Automated] Sync fix-tool-call-1.0.0 after 1.0.1 release
There was a problem hiding this comment.
Pull Request Overview
This PR synchronizes the 1.0.1 release with the main branch, incorporating bug fixes, error handling improvements, and dependency updates. The changes include enhanced validation for required parameters, better error propagation, and updates to the MCP package version from 1.0.0 to 1.0.1.
- Added validation for required parameters with proper error handling
- Enhanced error handling for JSON-RPC error responses
- Updated project version from 1.0.1-SNAPSHOT to 1.0.2-SNAPSHOT and synced all example dependencies to 1.0.1
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| native/src/main/java/io/ballerina/stdlib/mcp/McpServiceMethodHelper.java | Added null pointer safety check and required parameter validation with error handling |
| gradle.properties | Bumped project version from 1.0.1-SNAPSHOT to 1.0.2-SNAPSHOT |
| ballerina/utils.bal | Added JSON-RPC error handling in message extraction |
| ballerina/types.bal | Updated JsonRpcError to use closed record type and added it to JsonRpcMessage union |
| ballerina/streamable_http.bal | Enhanced HTTP response parsing to handle error payloads |
| ballerina/native_listener_helper.bal | Changed return type from Error to error for callToolForRemoteFunctions |
| ballerina/dispatcher_service.bal | Added error handling wrapper for callToolForRemoteFunctions result |
| ballerina/Ballerina.toml | Updated package version to 1.0.1 |
| ballerina/CompilerPlugin.toml | Updated compiler plugin JAR reference to 1.0.1 |
| ballerina/Dependencies.toml | Updated mcp package version to 1.0.1 |
| examples/servers/*/Ballerina.toml | Updated mcp dependency to 1.0.1 |
| examples/servers/*/Dependencies.toml | Updated mcp and other dependencies to latest versions |
| examples/clients/*/Ballerina.toml | Updated mcp dependency to 1.0.1 |
| examples/clients/*/Dependencies.toml | Updated mcp and other dependencies to latest versions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #32 +/- ##
============================================
- Coverage 18.22% 17.60% -0.63%
Complexity 3 3
============================================
Files 15 15
Lines 620 642 +22
Branches 163 170 +7
============================================
Hits 113 113
- Misses 506 528 +22
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Purpose
$title.
Examples
Checklist