feat: prune bound parameters from exposed tool definition#70
Open
stenalpjolly wants to merge 2 commits into
Open
feat: prune bound parameters from exposed tool definition#70stenalpjolly wants to merge 2 commits into
stenalpjolly wants to merge 2 commits into
Conversation
85c981f to
0fd1494
Compare
…TP transport layers
2f1948b to
c9b8ef7
Compare
TAG=agy CONV=263b1b15-a345-462a-b572-a4183d1426f9
c9b8ef7 to
9fa103c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR implements bound parameter pruning from the exposed tool definition. When parameters are bound to a value or a dynamic supplier, they are resolved by the client, so they are removed from the exposed
ToolDefinitionthat is returned to the user or LLM.Expectation & Implementation
Toolclass to be immutable, making all configurations return a newToolinstance with the updated state.bindParam, we clone the currentToolDefinitionand filter out the bound parameter name from the parameter list.McpToolboxClientImplto support the new immutableToolpattern.ExampleUsage.javaandCymbalTransitController.java) to chain or capture the return values ofbindParamcalls.Test cases
mvn test -Dtest="*Test,!*E2ETest" -Dnet.bytebuddy.experimental=truetestBoundParameterPruningconfirming that:nullparameter definitions behaves correctly without throwing exceptions.Acceptance criteria
Tool.javaandMcpToolboxClientImpl.javaremains at 100.00%.Checkstylebuild check with 0 violations.Breaking changes
None.